Last active
November 29, 2017 08:09
-
-
Save pcting/d0f0405d7d1fe716d41c4c90240c66cd to your computer and use it in GitHub Desktop.
limit chrome memory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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