Skip to content

Instantly share code, notes, and snippets.

@ronin13
Created May 4, 2014 09:47
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 ronin13/1f9156e14d50226c0b1e to your computer and use it in GitHub Desktop.
Save ronin13/1f9156e14d50226c0b1e to your computer and use it in GitHub Desktop.
[root@Archie ~]# grep 'resident' /proc/$$/limits
Max resident set unlimited unlimited bytes
[root@Archie ~]# ulimit -m 10240
[root@Archie ~]# grep 'resident' /proc/$$/limits
Max resident set 10485760 10485760 bytes
[root@Archie ~]# mkdir /sys/fs/cgroup/memory/11
[root@Archie ~]# echo $$ > /sys/fs/cgroup/memory/11/tasks
[root@Archie ~]# echo 4M > /sys/fs/cgroup/memory/11/memory.limit_in_bytes
[root@Archie ~]# cat /sys/fs/cgroup/memory/11/memory.limit_in_bytes
4194304
[root@Archie ~]# grep 'resident' /proc/$$/limits
Max resident set 10485760 10485760 bytes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment