meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
linux:prepare:prepare:firefox [2023/08/22 08:40] – niziak | linux:prepare:prepare:firefox [2023/08/22 10:42] – niziak | ||
---|---|---|---|
Line 7: | Line 7: | ||
===== limit memory usage ===== | ===== limit memory usage ===== | ||
+ | |||
+ | ==== cgroups ==== | ||
+ | |||
+ | References: | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | But now we have some modern systemd based tools. | ||
==== systemd ==== | ==== systemd ==== | ||
- | <code bash> | + | <file bash / |
- | systemd-run --user -G --scope --unit=firefox -p OOMPolicy=continue -p MemoryMax=2G -p MemorySwapMax=2G-p " | + | #!/bin/bash |
- | </code> | + | systemd-run --user -G --scope --unit=run-firefox -p OOMPolicy=continue -p MemoryMax=2G -p MemorySwapMax=2G -p " |
+ | </file> | ||
See [[https:// | See [[https:// | ||
+ | |||
+ | Verify limits: | ||
+ | <code bash> | ||
+ | systemctl list-units --user --type scope | ||
+ | systemctl status --user run-firefox.scope | ||
+ | |||
+ | | ||
+ | </ | ||
==== firejail ==== | ==== firejail ==== | ||
<code bash> | <code bash> | ||
- | sudo apt install firejail-profiles | + | sudo apt install |
+ | |||
+ | firejail --noprofile --rlimit-as=5g firefox | ||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | | ||
+ | Set the maximum size of the process' | ||
</ | </ | ||