Folks, I have an absolutely unjustifiably absurd number of tabs open across a few windows for which the only person to blame is moi!
Before enforcing some discipline on myself, I must discipline FF - because, at the moment, it won’t open for lack of memory on a 32Gig system! And, until it does open, I can’t begin the cull.
Optimisations made to about:config
browser.tabs.unloadOnLowMemory T
browser.low_commit_space_threshold_percent 75
browser.low_commit_space_threshold_mb 21292
browser.tabs.min_inactive_duration_before_unload 600000
browser.tabs.fadeOutUnloadedTabs T
browser.tabs.fadeOutExplicitlyUnloadedTabs T
dom.ipc.processCount 4
dom.ipc.processCount.webIsolated 2
layers.acceleration.force-enabled F
gfx.webrender.all T
browser.cache.memory.capacity 38106
browser.cache.disk.parent_directory /run/user/1002/firefox
media.hardware-video-decoding.force-enabled T
I’m running leap 16.1.
After the above optimisations I started following links (eg here and here) to constrain memory with cgroups and systemd and was puzzled by lack of success.
I added cgroup_enable=memory and swapaccount=1 to kernel options though my impression is those flags are turned on by default in recent kernels.
I then followed the testing section here and discovered that these systemd/ cgroup constraints are not working:
:~> sudo cp /usr/lib/systemd/system.conf.d/20-defaults-SUSE.conf /etc/systemd/system.conf.d/20-defaults-SUSE.conf
:~> sudo nano /etc/systemd/system.conf.d/20-defaults-SUSE.conf
:~> sudo cat /etc/systemd/system.conf.d/20-defaults-SUSE.conf
[sudo] password for machine:
# This drop-in contains specific defaults used by SUSE distributions.
#
# Do not edit this file, it will be overwritten on update.
#
# If you need to override one of the options, please create your own
# drop-in in /etc/systemd with a higher priority (preferably greater
# than 70).
[Manager]
# Memory accounting incurs performance penalties. Let's keep it
# disabled by default since the actual use case for enabling it is not
# clear (jsc#PM-2229).
DefaultMemoryAccounting=yes
:~>
Which I came across completely by chance looking to use system.conf for something completely unrelated.
I discovered that compressed tabs in ‘tab groups’ might free up space in the tab bar but do not free up memory, instead they remain fully loaded in memory - so the answer, for me at least, is to not just group tabs, but to then right-click its label on the tab bar, then select ‘Save and close group’.
I ran Firefox with 1000 pinned tabs. I simply started it without network connection. It took about 2-3 GB of RAM and ~ 30s to start. Then I used it - opened new tabs, etc. Then I closed it.
I came across that setting completely by chance while changing systemd LogLevel to debug. Far from its use case being unclear, it seems its use case is pretty basic to linux system management! Why would anyone turn off? And as a default!