OpenVZ Forum


Home » General » Support » Trying to learn and asking some questions
Trying to learn and asking some questions [message #33391] Fri, 10 October 2008 19:33 Go to next message
timgerr is currently offline  timgerr
Messages: 11
Registered: September 2008
Junior Member
Hello all, I am new to Openvz but loving it. I run 3 VMware clusters containing about 163 VM's. I have been playing around with Openvz for special non production projects and I want to learn more on how to create VM's better suited for my needs.

Lets take a server that I have, it is a dual / quad core server with 4 gb of ram.

Do I allocate processor on % or process time or sockets or cores.
What would be an example of setting by cores and % or overall process time?

Here is what I have for one of my VM's
# UBC parameters (in form of barrier:limit)
KMEMSIZE="1073741824:1073741824"
LOCKEDPAGES="256:256"
PRIVVMPAGES="262144:262144"
SHMPAGES="21504:21504"
NUMPROC="240:240"
PHYSPAGES="0:2147483647"
VMGUARPAGES="33792:2147483647"
OOMGUARPAGES="26112:2147483647"
NUMTCPSOCK="360:360"
NUMFLOCK="188:206"
NUMPTY="16:16"
NUMSIGINFO="256:256"
TCPSNDBUF="1720320:2703360"
TCPRCVBUF="32768000:32768000"
OTHERSOCKBUF="1126080:2097152"
DGRAMRCVBUF="262144:262144"
NUMOTHERSOCK="360:360"
DCACHESIZE="3409920:3624960"
NUMFILE="9312:9312"
AVNUMPROC="180:180"
NUMIPTENT="128:128"

# CPU fair sheduler parameter
CPUUNITS="1000"



Do people edit all these entries, if so how do you determine what/ how to edit them? What parameters do you change and not change?

I know how to add disk space but what do I have to do in order to correlate disk space to # of inodes? If I have set this
 --diskspace 15000M --save

what should I set the # of inodes to?

Is there a way to set min/max amount of memory or cpu?

I know that explanations of the given code is in the manual but I am in need of seeing some code and what that code means.

Thanks for taking the time to read this post,
have a good one.

timgerr

Re: Trying to learn and asking some questions [message #33584 is a reply to message #33391] Fri, 24 October 2008 05:22 Go to previous message
locutius is currently offline  locutius
Messages: 125
Registered: August 2007
Senior Member
use vzsplit to divide the hardware into chunks

e.g. if you have 8GB of memory use vzsplit to create config of 8ths and 16ths and 32nds then you get an idea of what you have available at 1GB RAM, 512MB RAM and 256MB RAM

you might want to use a sample config of 32nds and set the RAM and disk size separately

vzsplit -n 32 -f vps.32
cd /etc/sysconfig/vz-scripts
vzcfgvalidate ve-vps.32.conf-sample

here is how to set RAM:

(512MB or 131072 pages)
vzctl set $VEID --privvmpages 512m:512m --save
vzctl set $VEID --vmguarpages 512m:512m --save
vzctl set $VEID --oomguarpages 512m:512m --save
vzctl set $VEID --shmpages 13106:13106 --save

and disk size:

(3GB = 3145728 = 3 x 1048576 = 3 x 1024 x 1024)
vzctl set $VEID --diskspace 3145728:3145728 --save

(6GB = 6291456 = 6 x 1048576 = 6 x 1024 x 1024)
vzctl set $VEID --diskspace 6291456:6291456 --save

(10GB = 10485760 = 10 x 1048576 = 10 x 1024 x 1024)
vzctl set $VEID --diskspace 10485760:10485760 --save

(i have never had to adjust the disk nodes from the default but i run websites which dont use the disks much)

watch the beancounters for any further adjustments you might need (according to your hardware)

[Updated on: Fri, 24 October 2008 05:25]

Report message to a moderator

Previous Topic: Can not suspend VE: Device or resource busy
Next Topic: OpenVZ/Virtuozzo - SOLVED
Goto Forum:
  


Current Time: Sun Jul 14 11:57:43 GMT 2024

Total time taken to generate the page: 0.03017 seconds