1

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.

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.

1 Answer 1

0

You can change the amount of memory on the fly, currently you have allocated: 294151 pages (of 4k each), which translates to roughly 1.2GB.

If you want to change this to something closer to 2GB:

vzctl set VZID --vmguarpages 524288:9223372036854775807 

Or just give the VPS all the memory, by not limiting it:

vzctl set VZID --vmguarpages 9223372036854775807:9223372036854775807 

(Replace VZID with the id returned by vzlist -a)

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.