4 ms·
I designate a separate memory control group for the browser, and set both `memory.limit_in_bytes` and `memory.memsw.limit_in_bytes` to 1.5 GB. Then the browser
by goodplay 10y ago
I designate a separate memory control group for the browser, and set both `memory.limit_in_bytes` and `memory.memsw.limit_in_bytes` to 1.5 GB. Then the browser is launched within that group.
The tools are the standard cgcreate and cgexec.
When the browser depletes all its memory allowance, I use killall to kill the tab processes leaving only the chrome running. I refresh the tab I want and carry on.
Might seem convoluted, but works extremely well in practice.
edit: It should be noted that I currently use chromium. I intend to switch to firefox as soon as I can port this workflow to it or otherwise achieve a similar result.