Main Menu

OpenVZ free memory in container not correct

According to the recommendation on the OpenVZ page below, Table C recommends settings for 256MB RAM for a container (VE) that seems incorrect to me.

For the values of privvmpages, vmguarpages, oomguarpages, & shmpages, the values are multiplied by 4 in terms of available memory on the VE.? For this reason, the recommended values in the above link result in 1GB of memory being available to the VE instead of the 256MB that the tables states.? For this reason, I’ve made the following setting changes to limit the VE to 256MB RAM as desired.

vzctl set <veid> –save –privvmpages 65536:73228
vzctl set <veid> –save –vmguarpages 65536
vzctl set <veid> –save –oomguarpages 65536
vzctl set <veid> –save –shmpages 32768

Now when I execute the “free” command on the VE, I see the appropriate amount of total memory.? I admit that I don’t fully understand how all these variables work together, so there may be consequences to these settings.? However, for now, I’m going to play around with these values to see how they work for me.


No comments yet.

Leave a Reply

Powered by WordPress. Designed by WooThemes