Turns out shutting an oil well is easy, in many cases, it can be done with a few taps on an iPhone. Figuring out which to shut, and for how long, is the hard part. In the wake of a killer pandemic and the worst crude crash in history, the U.S. has become ground zero for a vast new experiment in the industry. Producers are shutting wells at a tremendous rate with oil prices sitting at historic lows. On Friday, Exxon Mobil Corp. said it will cut the number of its rigs in the Permian Basin by 75%, running just 15 by year’s end. Chevron Corp. said it’s now down to just five rigs there, a 71% drop.It’s a fetal-position strategy that could put a fifth of global crude production on the line.

“The industry’s never faced shut-ins like we’re facing right now,” said Clay Williams, chief executive officer for National Oilwell Varco Inc., the biggest U.S. maker of oilfield gear, on an April 28 call with investors. “We are on the precipice of forced well shut-ins totaling 15 to 20 million barrels of oil per day.”

Companies are deciding everything from which wells should be shut first to which should be closed for good, what the costs are, how easy it will be to restart them, and what fields may be too porous to handle a shutdown if you ease operations across hundreds, or even thousands, of wells at once.

Curtailing the output from wells is relatively straightforward. The system of choice today for new wells in the shale patch involves the use of electric submersible pumps, or ESPs, that act as surveillance systems to organize and store data in a centralized location for monitoring and control. They send data from deep within the well to a remote telemetry unit on the surface that transmits it online to production managers.

The goal of these devices is to prevent operating problems from afar before they lead to costly failures. At the same time, these systems allow managers to easily shut down a well as needed.

It’s common practice to shut a well for a month or so while a fracking job is going on in a well nearby, according to Richard Spears, a 40-year veteran of the oil patch and vice president at Spears & Associates, a Tulsa-based industry consultant.