physpages vs oomguarpages [message #46268] |
Tue, 08 May 2012 04:09  |
nethubonline
Messages: 26 Registered: October 2007
|
Junior Member |
|
|
Hi all,
In my limited knowledge, for vSwap-enabled kernels, physpages can limit total size of physical RAM used by a container, for old kernels physpages is just for accounting purpose.
oomguarpages is to limit current amount of RAM + swap + kernel memory (kmemsize) + socket buffers used by container, if container exceeds this limit, its process may be killed.
Hence, for old kernels, if there is no memory being swapped, physpages will be equal or similar to oomguarpages.
However for vSwap-enabled kernels, oomguarpages seems are always less than physpages, sometimes oomguarpages is just 10% of physpages......
Anyone can let me know why?
Secondly, while physpages reachs 1G, but oomguarpages is still 400MB, how can we limit the container 1G RAM, so that this container's process being killed while exceed 1G RAM?
https://www.nethub.com.hk (VPS Hosting Provider in Hong Kong)
|
|
|
|
|
Re: physpages vs oomguarpages [message #46484 is a reply to message #46268] |
Wed, 23 May 2012 04:41  |
nethubonline
Messages: 26 Registered: October 2007
|
Junior Member |
|
|
Thanks a lot kir!!
Actually I read that wiki before, but still do not understand.
Since oomguarpages is used to kill process if memory usage over its value, if I set oomguarpages as unlimited, and set "vzctl set 777 --ram 1G --swap 0G --save" , will the process be killed while container is over 1G memory? Or I still need to set oomguarpages?
https://www.nethub.com.hk (VPS Hosting Provider in Hong Kong)
|
|
|