Chrome eats all RAM and freezes system

I believe you would want to use something like cgroups to limit resource usage for a individual process.

So you might want to do something like this except with

cgcreate -g memory,cpu:chromegroup cgset -r memory.limit_in_bytes=2048 chromegroup

to create chromegroup and restrict the memory usage for the group to 2048 bytes

cgclassify -g memory,cpu:chromegroup $(pidof chrome)

to move the current chrome processes into the group and restrict their memory usage to the set limit

or just launch chrome within the group like

cgexec -g memory,cpu:chromegroup chrome

However, it's pretty insane that chrome is using that much memory in the first place. Try purging reinstalling / recompiling first to see if that doesn't fix the issue, because it really should not be using that much memory to begin with, and this solution is only a band-aid over the real problem.


I believe that you can use the ulimit utility. The -d option: ulimit(3) man page

You can lower your soft limit even without root access to the server.