“accept certificate” “self-signed certificate”
about:configbrowser.xul.error_pages.expert_bad_cert to truesecurity.certerrors.permanentOverride to trueabout:configbrowser.tabs.allowTabDetach set to trueconfig.trim_on_minimizeconfig.trim_on_minimize into search boxBoolean and click + icontruelayers.acceleration.disabled false (default) / true (use CPU: for some NVIDIA related problems)browser.sessionstore.interval: 60000 / default: 15000 The longer interval means a crash can lose up to 60 s of state instead of 15 sbrowser.sessionstore.max_windows_undo: default 5 each window keeps all its tabsbrowser.sessionstore.max_tabs_undo: default 25dom.ipc.processCount.webIsolated: 8 / default 4 preads big sites over more processesbrowser.tabs.unloadOnLowMemory set to trueReferences:
But now we have some modern systemd based tools.
#!/bin/bash systemd-run --user -G --scope --unit=run-firefox -p OOMPolicy=continue -p MemoryMaxigh=4G -p MemoryMax=5G -p MemorySwapMax=2G -p "CPUQuota=200%" /usr/bin/firefox "$@"
or
#!/bin/bash systemd-run --user -G --scope --unit=run-firefox -p OOMPolicy=continue -p MemoryHigh=50% -p MemoryMax=60% -p MemorySwapMax=2G -p "CPUQuota=200%" /usr/bin/firefox "$@"
See MemoryMax
Verify limits:
systemctl list-units --user --type scope systemctl status --user run-firefox.scope Memory: 201.3M (max: 2.0G swap max: 2.0G available: 1.8G)
Modify limits without restarting firefox:
systemctl set-property --user run-firefox.scope MemoryMax=8G MemorySwapMax=10G
apt-get install cgroup-tools sudo cgclassify -g memory,cpu::/user.slice/user-1000.slice/user@1000.service/app.slice/run-firefox.scope 20975
sudo apt install firejail firejail --noprofile --rlimit-as=5g firefox
--rlimit-as=number
Set the maximum size of the process's virtual memory (address space) in bytes. Use k(ilobyte), m(egabyte) or g(igabyte) for size suffix (base 1024).