Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.