Introduced in OS X Mavericks, “App Nap” is an aggressive power-saving feature built deep into macOS. When you have a dozen applications open, but only one is currently visible on your screen, macOS automatically throttles the CPU usage, network access, and disk activity of all the other applications hidden in the background.
For casual users browsing the web, App Nap is fantastic because it significantly extends MacBook battery life. However, for power users, it is a nightmare. If you are rendering a massive video in Premiere Pro, compiling code in Xcode, or downloading gigabytes of data via a background SSH terminal, App Nap will frequently put those processes to sleep simply because their window is hidden behind Safari. You will return to your computer an hour later only to find that your render paused at 10%.
To ensure maximum performance for intensive background tasks, you must completely disable App Nap globally using the Terminal.
Step 1: Disable App Nap Globally
We will use the defaults command line utility to write a hidden boolean flag into the global macOS preference architecture.
- Open the Terminal app (found in Applications > Utilities, or via Spotlight search).
- Copy and paste the following command exactly as written:
defaults write NSGlobalDomain NSAppSleepDisabled -bool YES - Press Return. The command will execute silently.
Step 2: Apply the Changes
Because this command modifies the NSGlobalDomain (the core environment that dictates how the macOS window manager handles process states), the change will not affect applications that are currently running.
To apply the changes, you must either manually quit (Cmd+Q) and relaunch the specific applications you want to keep awake, or simply Restart your Mac to guarantee the new rule is applied system-wide.
How to Verify App Nap is Disabled
You can use the built-in Activity Monitor to confirm that macOS is no longer throttling your background applications.
- Open Activity Monitor (found in Applications > Utilities).
- Click on the Energy tab at the top of the window.
- Look at the column headers (App Name, Energy Impact, etc.). You should see a column explicitly labeled App Nap.
- If you minimized a heavy application, the App Nap column used to read “Yes”. With the global terminal command active, that column will permanently read “No” for every single application, guaranteeing that they are running at full CPU speed regardless of whether they are visible on your screen.
How to Re-Enable App Nap
If you are traveling, away from a charger, and desperately need to maximize your MacBook’s battery life, you should turn App Nap back on temporarily.
- Open the Terminal.
- Paste the following command to delete the override rule and restore the default behavior:
defaults delete NSGlobalDomain NSAppSleepDisabled - Press Return and restart your Mac.