Thoughtful, detailed coverage of the Mac, iPhone, and iPad, plus the best-selling Take Control ebooks.

 

 

Pick an apple! 
 
Single Time Machine Backups

Tired of Time Machine running all the time? You can turn it off in the Time Machine preference pane, but still initiate a single backup by choosing Back Up Now from Time Machine's menu bar icon. Of course, your backup is much less likely to be up to date, but Time Machine won't be taking any resources while you're trying to work.

Submitted by
Richard Kane

 
 

AppTamer Quiets CPU-Chewing Background Apps

Send Article to a Friend

One of the huge architectural changes from Mac OS 9 to Mac OS X was the switch from cooperative multitasking to preemptive multitasking. Put simply, in a cooperative multitasking system like Mac OS 9, the frontmost application gets most of the processing time and chooses how much it will share with background applications. In contrast, in a preemptive multitasking system like Mac OS X, the operating system itself parcels out access to the CPU based on which application is frontmost, external events that may need attention, requests from individual background applications, and more.

The problem with preemptive multitasking, and one that Mac OS X definitely ran into in its early days, especially on the less-powerful Macs of the time, is that if the operating system gives too much processing time to background applications, the frontmost application feels sluggish, which irritates the user. And, as much as operating system programmers sometimes seem to forget this, it's all about the user.

Although Mac OS X's preemption policies have become more sophisticated over the years, it's still possible for a background application to use non-trivial amounts of CPU time while doing essentially nothing useful. I'm not talking about Time Machine backing up your hard disk in the background; I mean things like Safari continuing to run Flash animations while you're using another application. And if you have a bunch of tabs open in Safari, each executing its own JavaScript or Flash code even though you're not using the program, your Mac can bog down. Worse, if you're using a MacBook or MacBook Pro, as your CPU usage goes up, so does the heat output, causing the fans to come on. So now your Mac is not only slow, it's loud! Even worse, your battery life will drop precipitously as well.

Enter the deceptively simple AppTamer, written by Jon Gotow of St. Clair Software. What it does, in a nutshell, is stop (as in pause, not quit) applications that are using a lot of CPU time while in the background, but not doing anything useful with it. A Web browser with a lot of tabs open is a perfect example, and I've heard that Adobe applications also tend to chew CPU in the background. However, plenty of applications legitimately need CPU time while in the background; apart from Time Machine, which is always a background application, consider iTunes, which has to play music in the background, or iChat, which might need to maintain a voice chat while you're doing something else in the foreground. And many other programs are written such that they fall asleep on their own while in the background.

So AppTamer can't simply tell all background applications to stop processing, it has to work on a more granular level. You can therefore select which applications AppTamer should stop when they're in the background, but you don't have to do all the work. As a result, AppTamer's interface is largely informational - it tells you which applications are stopped, graphs how much CPU you're using, displays an Activity Monitor-like list of active processes, and provides details about a selected process.


Jon Gotow told me that AppTamer maintains a number of lists, including a blacklist of system processes that shouldn't be stopped (they don't even get a checkbox in AppTamer's interface), a list of programs like iChat and iTunes that get a custom warning if you try to have AppTamer stop them, and a list of helper apps that can and should be stopped and started with their parent applications, such as the Chrome Helper process that Google Chrome spawns for each open browser tab. Also, AppTamer warns you if you try to have it manage background-only applications, since they likely need to keep executing at all times.



How do you set up AppTamer? The easiest thing to do is simply to launch the program and continue about your normal usage for a while, checking CPU savings in either the AppTamer window or its system-wide menu in the menu bar (which lists running and stopped applications and background processes). AppTamer's default settings will likely save you some CPU time on their own. To see if you can save even more CPU time, click the Details tab in AppTamer to show the list of processes, choose My Windowed Processes, and then scan down the list of what's running. If you see an application that you know doesn't need to execute in the background, select its AutoStop checkbox. Continue working, and see if AppTamer's efforts make a noticeable difference in the responsiveness of your Mac. (Technically, you can have AppTamer stop non-windowed processes and those owned by other users, but it's likely that those need to be executing in the background.)

It's a little tricky to figure out which applications don't need to execute in the background. For instance, AppTamer knows that iChat does require background cycles, but doesn't know that Skype does as well. And while it's obvious that iTunes needs to keep playing music even when it's not in the foreground, it might be less obvious that Twitter applications need to update themselves in the background on a regular basis. Plus, there's no need to stop applications that are already well-behaved in the background, like BBEdit. As a result, another trick I use to determine what's worth stopping is to sort AppTamer's process list by the %Avg column, which shows the average CPU use over 15 seconds. Processes at the top of that list, like Firefox and Safari, are prime candidates for stopping.

AppTamer also has a Gaming Mode checkbox that, when selected, stops all windowed applications except the active one to ensure that the frontmost application gets as much CPU time as possible. This is relevant only for people playing games, where the game needs lots of processor power and you aren't interested in anything else happening while you're playing.

There is one confusion in AppTamer with regard to CPU usage numbers. AppTamer reports CPU usage for an individual app normalized to a single processor because that's the way Apple's Activity Monitor does it. That's why you can have an app using 107 percent of CPU on a dual-core Mac - it's really using some portion of each core such that the portions add up to 107 percent out of 200 percent.

But where it gets weird is that AppTamer calculates the estimated CPU savings by adding up the last average CPU usage value for each stopped application and dividing it across all processors. So if Safari is shown to be using 10 percent of the CPU on a dual-core Mac on its own, your overall savings is reported as only 5 percent, which may make AppTamer look like it's less useful. Jon Gotow said he's continuing to think about better ways to present this data.

Regardless of what the numbers say, I've found that it's obvious that having numerous tabs open in Firefox, Safari, or Chrome in the background can result in slower foreground responsiveness in other applications. On my 13-inch unibody aluminum MacBook, AppTamer definitely reduces CPU usage and translates that into cooler and quieter operation (and although I've been working on wall power, I presume battery life would also be improved). On my 8-core Mac Pro, AppTamer's overall performance improvement is less noticeable, since the machine has so much more processing power.

There are two slightly disconcerting side effects of using AppTamer. Since stopped apps appear to Mac OS X to be crashed, you'll generally see the spinning pizza of death when you move the mouse pointer over their windows in some cases. Similarly, Activity Monitor reports stopped applications as "Not Responding." Both of those indicate the application is stopped, not that it is crashed, and as soon as you click a stopped application's window or Dock icon, it wakes up instantly. Of course, truly crashed applications will look the same as stopped applications until you realize they aren't responding to clicks, which might be briefly confusing.

In the end, only you can determine if AppTamer will help save CPU cycles given your particular applications and usage patterns. I could, for instance, stop keeping lots of tabs open in Firefox to reduce its processor usage, but since I seem incapable of doing that, AppTamer is helpful to me. You can try AppTamer for 15 days for free, and if you find that it's helpful during that time, it costs $14.95 for a single-user license.

 

Updated! PDFpen for iPad 1.7: Designed for iOS 7, faster, and
better-looking. Edit your PDFs anywhere. Sign contracts, make
changes, fill forms, and more. All while you’re on the move.
Syncs via iCloud and Dropbox. <http://smle.us/tbpdfpen-ipad>
 

Comments about AppTamer Quiets CPU-Chewing Background Apps
(Comments are closed.)

Jim Rea  2010-09-28 11:16
I've been using this for a week or so. So far the only app I have it stopping in the background is Safari. I tend to have a lot of Safari windows open so this is pretty helpful. Sometimes I find I can't bring Safari to the front by clicking on the dock icon -- I have to click on a window or use Command-Tab. But that's no big deal.

On item that concerned me is that App Tamer shows that kernal_task is using huge amounts of processor time (typically over 150%). I corresponded with Jon Gotow and he says that most of this is idle time and isn't really slowing my system down. I'm using 10.5, apparently 10.6 works a bit differently and App Tamer only repors a small CPU percentage for kernal_task on Snow Leopard. Activity Monitor on my 10.5 machine only shows 0.2% usage, apparently they are adjusting to remove the idle time, Jon said he was going to try to figure out how they do that. I tried Peek-a-Boo, and it also shows high CPU usage for kernal_task.
Jim Rea  2010-09-29 22:13
Follow up -- I can switch to Safari by clicking on the dock, what can't be done is to right click on the dock and switch to a specific Safari window. In fact, the windows aren't listed at all. Not AppTamers fault, of course.
connectionfailure  2010-10-03 19:58
Not long ago I bought Blitz while looking for a replacement for the one donelleschi used to make. However it has some issues. AppTamer looks good, and seems to work better, but needs an Advanced mode for power users. donelleschi's used to let me select multiple apps and freeze them, I dont think AppTamer can do that. Keep it up Jon, we love DefaultFolder!