Skip to content

Instantly share code, notes, and snippets.

@pcting
Last active November 29, 2017 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcting/d0f0405d7d1fe716d41c4c90240c66cd to your computer and use it in GitHub Desktop.
Save pcting/d0f0405d7d1fe716d41c4c90240c66cd to your computer and use it in GitHub Desktop.
limit chrome memory
#!/bin/sh
cgcreate -a $USER -s 666 -g swap,memory:chrome
cgset -r memory.limit_in_bytes=4G -r memory.soft_limit_in_bytes=3800M -r memory.swappiness=5 chrome
cgexec -g memory:chrome /opt/google/chrome/google-chrome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment