Featured image of post Firefox eating your RAM?

Firefox eating your RAM?

Automatically Unload Inactive Tabs

I had a problem with Firefox consuming way more RAM than it should, sometimes even 28 GB on a daily basis, as I am a tab hoarder cough cough.

While looking for a solution, I stumbled upon this article

recommending tweaking the browser.low_commit_space_threshold_mb value.

BUT it didn’t help at all.

Manual unload

According to this article you can navigate to a place called about:config.

Just type about:unloads into your browser’s URL bar and hit Enter.

Here you can hit the Unload button to unload the top tab. Do this for each tab, and you’ll get to the lowest possible RAM consumption. Of course, once you reopen a tab, it will start consuming RAM again, but one at a time. The others will remain unloaded until you use them. YAY!

Automatic unload

But how do you fix it once and for all? Manual intervention can be obnoxious.

Well, according to https://wiki.archlinux.org/title/Firefox/Tweaks you can achieve this by tweaking a few more variables in about:config (type them in the URL bar and hit Enter):

browser.tabs.unloadOnLowMemory = true
# Enables automatic memory unloading

browser.low_commit_space_threshold_percent = 100
# Ensures unloading works even if you have free memory

browser.tabs.min_inactive_duration_before_unload = 3600000
# Sets how long a tab should remain inactive before unloading. 3600000 = 1 hour.
# You can set it lower if you like; I use 600000 for 10 minutes.

And viola (typo intended 😉), it works! 🎉

Life is a choice: reboot or be root


Built with Hugo
Theme Stack designed by Jimmy