3 ms·
About year ago, i started to run Firefox in memory-limited cgroup (to 4 GB), so when it eats all the memory, it just locked itself (by thrashing pages at full S
by zajio1am 5y ago
About year ago, i started to run Firefox in memory-limited cgroup (to 4 GB), so when it eats all the memory, it just locked itself (by thrashing pages at full SSD speed) and not the whole machine. It is done by:
In /etc/rc.local:
cgcreate -t USERNAME -a USERNAME -g memory:firefox
echo 4294967296 > /sys/fs/cgroup/memory/firefox/memory.limit_in_bytes
echo 4294967296 > /sys/fs/cgroup/memory/firefox/memory.soft_limit_in_bytes
And then start it by script with:
cgexec -g memory:firefox /usr/bin/firefox