Firefox heavy CPU useage - try this


#1

For those using regular firefox, and having it SLOW your system down.

Go into AppCafe, search firefox. You will see firefox-esr

remove regular firefox, and install firefox-esr. It will drop the cpu usage immensely


#2

pkg search firefox shows firefox-esr-45.8. Is than an older version (45)?


#3

it’s the “Long Term Support” version of Firefox, so yes


#4

Ahh. So just security and critical bug fixes I’m guessing.


#5

my best guess? Yes that would be correct


#6

I have a snippet from conky, displaying top memory users, Firefox seems to be memory hog aswell:
firefox-memory

I only have two tabs open and one active download:

Running CURRENT 2a2a3070d(drm-next)


#7

correct about Firefox being a memory hog. and the latest release of both firefox and firefox-esr suck equally

I have to close/kill at least once a day to get things running “smooth”.


#8

It is not that I would notice any slowdown in system responsiveness, I’m just wondering how would FF work on 4GB system, if now it consumes much more then 4gigs of ram. Or is it conky that displays strange results?


#9

it consumes that much ram. :frowning:


#10

One of the things that I’ve found that I’ve had to do with firefox is occasionally blow away the .mozilla directory, and start fresh, because over time, it just gets slower and slower, eating more and more resources - like it’s retaining information about every web page you’ve ever visited.

The other thing I did recently was start using separate firefox profiles for different things, and I created zfs datasets for each so that it’s easier to revert a profile when it gets too bogged down. That seems to have helped, but firefox is still very much not performant. My experience with chrome isn’t much better though. I’m not sure that it’s as much of a memory hog, but it gets pretty slow too - especially if you have a lot of tabs and/or windows.

I mounted my firefox profile datasets in ~/.config/firefox_profiles, and created this script:

#!/bin/sh

if [ $# -ne 1 ]; then
    echo "Missing profile argument"
    exit 1
fi

/usr/local/bin/firefox --no-remote --profile ~/.config/firefox_profiles/$1

which I then call with the name of the profile I want to use. I’ve done something similar with chrome.

I don’t know that this really improves the memory usage overall, but it’s definitely helped keep the CPU usage down.


#11

Hmmm… So I opened 8 tabs of various things from googleplus in Firefox and System Monitor showed 1640 MB usage. I opened the same 8 tabs in newly installed Chromium and it consumed 2508 MB of RAM (albeit in 200 - 500 mb processes).

All I can say is “wow”. I’m now going to close System Monitor, close this tab in my browser, and pretend that I never saw this thread.

:roll_eyes:


#12

So Firefox has a native memory tool. If you type about:memory into the location bar and hit enter it brings the tool up. Can’t make too much of it yet except that all the web pages total less than 100MB but it has a private allocation of 940 MB and a vsize of 1800. :confused:

The interweb doesn’t seem to show any better results on Debian et.al. I’ll try it on Stretch as soon as I get around to updating my Debian instance.


#13