meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux:prepare:prepare:firefox [2023/08/22 08:34] – niziak | linux:prepare:prepare:firefox [2023/10/17 07:20] (current) – niziak | ||
---|---|---|---|
Line 2: | Line 2: | ||
===== Disable Detachable Tabs in Mozilla Firefox ===== | ===== Disable Detachable Tabs in Mozilla Firefox ===== | ||
- | * `about: | + | * '' |
- | * `browser.tabs.allowTabDetach` | + | * '' |
===== limit memory usage ===== | ===== limit memory usage ===== | ||
+ | ==== cgroups ==== | ||
+ | |||
+ | References: | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | But now we have some modern systemd based tools. | ||
+ | |||
+ | ==== systemd ==== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | <file bash / | ||
+ | #!/bin/bash | ||
+ | systemd-run --user -G --scope --unit=run-firefox -p OOMPolicy=continue -p MemoryMaxigh=4G -p MemoryMax=5G -p MemorySwapMax=2G -p " | ||
+ | </ | ||
+ | |||
+ | or | ||
+ | |||
+ | <file bash / | ||
+ | #!/bin/bash | ||
+ | systemd-run --user -G --scope --unit=run-firefox -p OOMPolicy=continue -p MemoryHigh=50% -p MemoryMax=60% -p MemorySwapMax=2G -p " | ||
+ | </ | ||
+ | |||
+ | See [[https:// | ||
+ | |||
+ | Verify limits: | ||
<code bash> | <code bash> | ||
- | systemd-run --user | + | systemctl list-units --user --type scope |
+ | systemctl status | ||
+ | |||
+ | | ||
</ | </ | ||
- | See [[https://www.freedesktop.org/software/systemd/ | + | Modify limits without restarting firefox: |
+ | <code bash> | ||
+ | systemctl set-property --user run-firefox.scope MemoryMax=8G MemorySwapMax=10G | ||
+ | </ | ||
+ | |||
+ | ==== firejail ==== | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt install firejail | ||
+ | |||
+ | firejail --noprofile --rlimit-as=5g firefox | ||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | | ||
+ | Set the maximum size of the process' | ||
+ | </ | ||
+ | |||
+ | [[https://wiki.archlinux.org/title/Firejail#Using_Firejail_by_default|Using_Firejail_by_default]] | ||