On 2025-08-16 14:54:32 -0400, [email protected] wrote: > I'm going to chime in here, even though I am running some older versions of > Debian and Firefox (newest is 103).
I'm using Firefox 141 (firefox package), but issues with it are not new. > I have found that: > > * Firefox uses a lot of memory, especially when I have a lot of tabs open Same here (well, several windows and lots of tabs). Note that Firefox has a concept of "unloaded tabs" to free the memory, and I would expect that background tabs remained unloaded when starting Firefox. Still, it takes a lot of memory. YouTube also sometimes takes more and more memory, even though the video is not playing: https://bugzilla.mozilla.org/show_bug.cgi?id=1964852 > * When free memory gets low (maybe to 0), I experience the same systems > described by the OP -- everything locks up (and the hard disk light goes on > solid). This is what happened in the past when I was using swap. So I ended up by disabling swap entirely with "swapoff -a". I haven't noticed such an issue on my most recent laptop, but I have only 1 GB of swap for 32 GB of RAM. However, the OOM killer was killing random processes, in particular daemons (see above bug). I avoided this issue by installing earlyoom and running it with the --sort-by-rss option (in /etc/default/earlyoom): https://github.com/rfjakob/earlyoom/issues/344 The issue for the behavior without earlyoom and the behavior with earlyoom without the sort-by-rss option (daemons being killed rather than the broken Firefox tab) is actually due to systemd, which yields the oom_score_adj=200 value for these systemd services. > I've taken to do the following: > > * I keep a konsole window open running top with my firefox window > positioned > on top of it but offset so I can see the free memory number and the resident > memory column. > > * I pay attention especially to the free memory number, and when it gets > low ... > > * I kill firefox related tasks (not firefox itself), like (in my version > of > Firefox) "Web Content", "Isolated Web Co", "Privileged Web Co", and > "WebExtensions" (as they are named on top). > > I use a command like =killall -o 12h Content= -- the -o 12h option > in hopes of not deleting the most recent versions of those files -- > I'm not sure that works ;-) It seems that the contents of the tabs correspond to "Isolated Web Co" (this is such a process that was taking more and more memory in my case). > I then find that my tabs still exist, in most cases with the URL, but no > content displayed on the page. Yes, killing the process associated with a tab leaves the tab in place, which then shows something like "the tab has crashed". > I can press <F5> on any tab (in the window) to > reload the content. (Some tabs, especially searches (ddg and such) don't > maintain the URL.) > > As long as I do this, I avoid the symptoms the OP described. If this is a particular tab that takes much memory, I suggest to try earlyoom with the --sort-by-rss option as I did. -- Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)

