Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to configure only one vps in a openvz node. The node will have only one vps.

I need help to configure the memory limits correctly.

The node have 4GB memory with 4GB swap.

I would like to use as much memory as possible without compromising the stability of node.

I have read the documentation openvz but I'm confused with the value of required parameters.

Anybody can give me a recipe or guide lines to do so?

share|improve this question
Roberto, there has been some recent simplifications / improvements in how you can configure resources on OpenVZ. In /etc/vz/conf/XXX can basically just specify MEMORY, SWAP - and that's it. All the other resources are set to unlimited. What OpenVZ kernel version do you need this for? – Aleksandr Levchuk Jun 23 '11 at 7:17

You basically need to set three values for defining the memory settings of your openvz node

vzctl set VTID --privvmpages 4G --save
vzctl set VTID --swappages 4G --save

I guess you should not use the full ram and swap you have on your physical node.

You can define also Ram values if your physical node has not enough memory check the documentation about oomguarpages,shmpages,physpages and vmguarpages

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.