20 GB RAM usage, pagefile takes up all space on C: - 300 tabs in Tree Tabs
First, this post is basically Congratulations for Firefox upon working almost flowlessly under this extreme heavy load without crashing. Saving/loading sessions works well. (which is unexpected but makes me _very_ happy :-)) Firefox exits properly without any exceptions, no matter how long it runs, or how many times the PC is sent to STR mode meanwhile.
Second, everything is fine, except RAM usage. No matter how many RAM is installed, Firefox takes up all of it after a few days of normal operation. I have recently upgraded my PC from 16 to 24 GB of RAM only for this sole reason to see if anything changes, but it did not produce any noticable change, except that it takes 5-7 days for Firefox to fill up all the RAM instead of the 3-4 days before. Disk space on C: drive was nullified by Firefox as the paging file went up to 50 GB.
I want to hunt down this thing. I have approx. 300 tabs, 2 addons, and Hardware Acceleration is disabled since otherwise Fox hangs several times a day (have to be killed from outside). Pics are attached. https://addons.mozilla.org/hu/firefox/addon/tree-tabs/ https://gitlab.com/kroppy/TreeTabs
I'd like to get suggestions where to start.
- Disabling or replacing the adblocker ?
- Inspecting memory usage on Process Manager (about:processes) and Task Manager (about:performance) pages ?
- Installing some external tools like Firemin ?
Please don't suggest neither safe mode nor disabling all addons, since that makes it impossible to reproduce this amount of load, which is the primary reason behind the symptom.
I PrtScr'ed Process Manager and Task Manager, see that RAM sizes per page are normal in Task Manager, but not in Process Manager (10 times more).
CPU usage is totally normal for this load, even when memory is in the heaven. See the TaskMan pic. (I suppose that's because of ad blocking)
Thanks for any ideas,
Peter B. (I'm PC enthusiast)
-- Windows 7 Ultimate SP1 64 bit Firefox 106.0.5 (latest autoupdated) no firewall nor any antivirus - since 20 years with no infection ... AMD FX-6350 Six-core ASUS M5A99FX PRO R2.0 24 GB DDR3 1600 MHz Sapphire Radeon HD 5750 1GB (AMD Catalyst 15.11.1, Nov 18, 2015)
Modified
All Replies (20)
ps. tab loading is OK as it takes place only when clicking on them. When I start Firefox, only the last visited tab loads automatically according to Task/Process Manager. When reaching max mem usage, no more than 40-50 of 300 tabs were clicked. I never use all of them simultaneously. I suspect facebook is the most ram hungry one.
Modified
Maybe should I try to reduce RAM amout in my PC for some weeks to see what happens then ?
Does Firefox have such internal memory management, checking overall system RAM usage, and eating up all only when it's free ? Is it intentional by design, that Firefox uses all available free RAM ?
Who is responsible for RAM usage, Firefox itself or the pages that it loads ?
Check about:performance and about:processes to find most ram-hungry resources. You can also go to about:memory and click the Minimize memory usage button.
about:performance = normal numbers about:processes = abnormal numbers
I'm afraid the normal RAM usage would be those numbers shown on the about:performance page. These were taken after about a week of constant daily usage. Firefox was started last on the day the original post was made.
It seems RAM usage is related to the clicked links count of each tab. Those tabs have the highest usage which were used most extensively. Looks like there's a leak on each click, or the whole full page gets saved into some buffer, which never gets flushed.
Another approach is that only specific sites eat up most of the RAM, especially these ones : facebook.com trello.com google.com Using this approach, RAM usage of sites is closely related to the company size behind the domain.
Modified
I have had intermittent RAM issues for just over a year, notably on gmail but also on two reddit subs, a stockbroker's site (a page listing links to various company reports) and a forum (a page listing unread posts). I have been unable to make any change which results in an improvement. There is a support article which may shed some light. I have no problem on Facebook as long as I use only one tab at a time.
https://support.mozilla.org/en-US/kb/firefox-uses-too-much-memory-or-cpu-resources
Modified
Terry said
https://support.mozilla.org/en-US/kb/firefox-uses-too-much-memory-or-cpu-resources
I started with that article before posting this thread. "Adding RAM will provide a huge performance boost. " - Hahahahahaha, that's really not true.
Modified
So I understand from users with 32 or 64 GB or RAM, i.e. they still have problems using Firefox.
Modified
Installed RAM = 24 GB Swap file on C: = 16 GB Free space on C: = 37 GB Pagefile set to Custom size from 16 MB to 32768 MB.
Windows has closed Firefox, +1 additional application. Firefox exited properly, session was successfully saved and restored. (which is unexpected therefore very interesting ... I expected a complete corrupted profile folder as a result, which needs to be restored from a backup (sure I have some) ... but surprisingly didn't notice any erroneous behaviour. Just like as I would have clicked the close button of the main windows. Strange ...)
Modified
See also:
Does it make a difference if you let Windows control the page file instead of setting it to a fixed value ?
Do you only have one drive (C) as 37 GB free space looks rather (worrying) low ?
cor-el said
*https://hacks.mozilla.org/2022/11/improving-firefox-stability-with-this-one-weird-trick/
Thanks for that article, very good to know it. I will re-enable hardware acceleration to see its effect.
Does it make a difference if you let Windows control the page file instead of setting it to a fixed value ?
Yes it does. Windows controlled swap file eats up all free space on C:
Do you only have one drive (C) as 37 GB free space looks rather (worrying) low ?
I have 1 SSD 480GB, and 1 HDD 3 TB. SSD has 2 partitions : C:=80GB, D:=400GB D: has a bit more free than C:, but I'm not willing to replace the swap file there, since that doesn't solve its constant increase in size, so it does not solve the problem but postpones it only. It was also unexpected that Windows did not BSOD'ed itself when run out of disk space. I never had any problems neither with RAM nor with disk space besides Firefox.
Modified
. . .
Modified
I think that best would be to locate the page file only on the 3 TB hard drive as on that drive there should be plenty space. The SSD file is best used for installing programs and not for storage of temporary data. You can possibly move the Firefox profile folder to that drive as well.
The hard drive is likely slower, but is better suited for such tasks.
cor-el said
I think that best would be to locate the page file only on the 3 TB hard drive as on that drive there should be plenty space. You can possibly move the Firefox profile folder to that drive as well.
I beg your pardon, but I don't agree with you as this would be a proper solution to the original problem.
First, no matter how many GBs of space I put under the same situation, if I don't make any changes inside Firefox, its behaviuor will eventually not change anyway. Your suggestion looks like : - My car's fuel consumption is too high, I suppose it's above normal ! - Buy more gas ! I'm afraid that's not a real solution.
Second, the HDD is not running all the time, it's in a hot-plugged mobile rack, and I switch it on only when needed. I made this setup for extending the HDD's lifespan as it is measured with start/stop cycles count by manufacturers. My PC is turned on/off 5-10 times per day (always using STR mode), with this setup I can eliminate 95% of start/stop cycles for the HDD. I've put big rarely used files on HDD, and smaller frequently used files on SSD. I will change this layout only when winning the lottery (or finding a NAS on the streets). :P
Third, I turned hardware acceleration back on this morning, after that everything is still fine. No hangs, no crashes, no problems at all. Before version 105 there have been several hangs daily, I mean Firefox was frozen completely, and had to be killed from Task Manager. I'm very curious how long it will last this time, since I already see that it's significantly faster after hardware acceleration was enabled again.
Fourth, in case enabling hardware acceleration does not change RAM consumtion significantly, I will conduct a test where I will be using as few tabs as possible, will disable Tab Kit, and see what happens then.
Both rounds will take about 1 week or so please expect valuable results approx. 2 weeks from now on.
THX Peter B.
ps. my profile folder size is 200 MB.
Modified
Enabling hardware acceleration reduced RAM usage significantly, at least by 20-30%. This time I will let Firefox run eternally to see what happens with the paging file. It is set to OS managed size now, free space on C: is 27 GB now. Pagefile size equals to the RAM size in my PC now, and haven't increased any since Firefox was started about a week ago.
Not impossible that we have solved it.
Modified
Oops, it was tooooo early to be so glad ... The same usual hang 30 secs after starting a youtube video, which was at least 10 times more common before version 105.
- -((
Terry said
Have you tried this? https://support.mozilla.org/en-US/kb/accessibility-services#w_how-do-i-disable-firefox-accessibility-service
The little standing man icon was not on the toolbar, but accessibility.force_disabled was 0, now I set it to 1, and restarted Firefox. Thanks for the tip :-)
Modified
Crash (hang) again. 2nd time youtube again. This time the same point where Fox used to hang regularly 1-2 years ago, before I turned off hw accel for this sole reason : When right-clicking in the address bar to copy the URL.
- -(
Modified
Enabling hardware acceleration significantly reduced FireFox's RAM usage, however it's unclear whether this solves the original problem or not, since the notorious error (regular hangs) why I disabled it has not disappeared, although its regularity has greatly decreased from 2-3 times/day to 2-3 times/week. Therefore, I'm unable to test hardware acceleration's effect upon swap file increasement.
Unsure how to continue testing.