Temporarily “pause” all Firefox processes

ff-stopIf you browse the web like i browse the web then that means you probably have at least a dozen tabs open at any given time, and twice as many add-ons.  Now i <3 the Firefox web browser.  Hard!  But my main complaint about it is how sluggish it gets over time and with so much STUFF happening in the browser-space.  It’s borderline bloatware except that i’m the one who added a lot of the bloat to it…  Well here’s a tasty gem from commandlinefu.com that i’ve adapted into what i hope will be a very useful tool.

Here’s the post from CLFu:

$ killall -STOP -m firefox

Manually Pause/Unpause Firefox Process with POSIX-Signals.  Continue with:

$ killall -CONT -m firefox

Holds all Firefox Threads. Results in Zero CPU load.  Useful when having 100+ Tabs open and you temporarily need the power elsewhere.  Be careful – might produce RACE CONDITIONS or LOCKUPS in other processes or FF itself. matching is case sensitive.

Read on for the results and some handy aliases that make this command even better!

On my 10.5.6 MacBook Pro the main firefox process is called ‘firefox-bin’—which i found by doing

$ ps aux | grep firefox

on the command line.  Once i added ‘-bin’ to the killall command it worked immediately.  Firefox’s CPU draw instantly dropped from ~26% to 0%, although the memory allocation remains untouched at ~421MB, which is a good thing i guess for quickly killing and restarting the ‘fox without having to wait for swap files to be written or the RAM to fill up again.  Once the -STOP command has been sent the system will report that Firefox is not responding, which is true, you killed it.  So don’t worry about that.


I can totally see using this while watching videos/movies, this will prevent Growl from rudely interrupting our movie watching with it’s dings and heads up displays.  This should also prevent any of those new-fangled super-interactive sites like gmail and facebook (which are always open in tab slots 1 and 2 for me) from gobbling too much CPU and slowing down whatever it is that i’m really trying to do (besides checking gmail and facebook).  So useful do i think these 2 commands might be that i created aliases for them for quick starting and stopping.  Which i am happy to share:

$ alias ffstop="killall -STOP -m firefox-bin"
$ alias ffstart="killall -CONT -m firefox-bin"

Now i can just type ffstop to “pause” firefox while i’m doing something else that might need those CPU cycles more.  And ffstart when i want to browse the web again!

Thanks Schneckentreiber via CLFu! [Manually Pause/Unpause Firefox Process with POSIX-Signals]

1 comment to Temporarily “pause” all Firefox processes

  • No recently listened tracks.