LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   openvz node with only one vps (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/openvz-node-with-only-one-vps-884308/)

rpereyra 06-03-2011 06:40 AM

openvz node with only one vps
 
I have an openvz server with 2Gb ram and would like to configure a vps for use all server resources (no swap).

I run:

vzsplit -n 1 -f vps1 -s 0

and have this setup:

Configuration file generated by vzsplit for 1 containers
on HN with total amount of physical mem 1998 Mb
low memory 1998 Mb, swap size 0 Mb, Max treads 8000
Resourse commit level 0:
Free resource distribution. Any parameters may be
Primary parameters

NUMPROC="10230:10230"
AVNUMPROC="5115:5115"
NUMTCPSOCK="10230:10230"
NUMOTHERSOCK="10230:10230"
VMGUARPAGES="294151:9223372036854775807"

Secondary parameters

KMEMSIZE="419090432:460999475"
TCPSNDBUF="97794730:139696810"
TCPRCVBUF="97794730:139696810"
OTHERSOCKBUF="48897365:90799445"
DGRAMRCVBUF="48897365:48897365"
OOMGUARPAGES="294151:9223372036854775807"
PRIVVMPAGES="306951:337646"

Auxiliary parameters

LOCKEDPAGES="20463:20463"
SHMPAGES="30695:30695"
PHYSPAGES="0:9223372036854775807"
NUMFILE="163680:163680"
NUMFLOCK="1000:1100"
NUMPTY="512:512"
NUMSIGINFO="1024:1024"
DCACHESIZE="91533669:94279680"
NUMIPTENT="200:200"
DISKSPACE="203811210:224192332"
DISKINODES="53798327:59178160"
CPUUNITS="139987"

When I start a new vps with this setup the vps run out of memory.

The "free" command show only 1.2 Gb ram available,

Are this setup the optimal for my vps ?

Are the memory parameters correct ?

I suspect that vzsplit is generating bad memory settings for my vps.

Thanks in advance.

roberto

wpeckham 06-03-2011 11:52 AM

OpenVZ
 
What template or OS did you use to populate this virtual? What is it running?

rpereyra 06-03-2011 04:06 PM

Hi

It's a Centos 5.6 template.

roberto

wpeckham 06-06-2011 10:10 AM

OpenVZ
 
1. Are youo using the most recent version of OVZ and the utilities?

2. I have never used '-n 1' with vzsplit. I recommend using '-n 2' for this instance to leave enough resource for the HOST to run properly. Remember, if the host has problems EVERY guest has problems!

3. I would not worry about swap. As long as swap is set up well on the host, the default settings for the guest work better (for most things) than any way you are going to manipulate them.

4. WHERE are you getting the OOM error? Is it from the guest, or from the host?

I have taken a blade with 512 Mb ram and 80Gig of hard space and made it an OpenVZ host with three guests (no X-windows, running web servers managed via web and command-line only) without errors. Your machine should not be underpowered for this unless you are running something big and nasty.

After you create your new split config, but before you create the guest, check your new file against the sample. You want to do a sanity check against the values, and make sure that none are missing in your new file. Vzsplit is a tool, not a solution: it has no way to read your mind or determine your preferences.

The OpenVZ site has forums and how-to documents (some WIKI style) that you can use as a resource for advice about values that you think may be wrong or misleading. Asking for help there may get the attention of the developers, who have the most recent data and advice.

Alas: I have NOT tried making a CentOS guest at version 5.6 using that template, so I have no test data to relate. I hope someone who does will chime it here.........


All times are GMT -5. The time now is 10:47 PM.