OpenVZ Forum


Home » General » Support » physpages vs oomguarpages
physpages vs oomguarpages [message #46268] Tue, 08 May 2012 04:09 Go to next message
nethubonline is currently offline  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 #46362 is a reply to message #46268] Tue, 15 May 2012 04:20 Go to previous messageGo to next message
nethubonline is currently offline  nethubonline
Messages: 26
Registered: October 2007
Junior Member
can any one help?

physpages & oomguarpages in old kernels seems the same thing, but for vSwap-enabled kernels they are different, but which one should be the original value, and what is the change for new value?


https://www.nethub.com.hk (VPS Hosting Provider in Hong Kong)
Re: physpages vs oomguarpages [message #46451 is a reply to message #46362] Tue, 22 May 2012 10:46 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

http://wiki.openvz.org/VSwap

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: physpages vs oomguarpages [message #46484 is a reply to message #46268] Wed, 23 May 2012 04:41 Go to previous message
nethubonline is currently offline  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)
Previous Topic: Possible swap problem?
Next Topic: Iptables error
Goto Forum:
  


Current Time: Fri Sep 06 02:20:42 GMT 2024

Total time taken to generate the page: 0.06315 seconds