vzsplit question [message #24398] |
Tue, 04 December 2007 17:34 |
Dietmar Maurer
Messages: 52 Registered: March 2007
|
Member |
|
|
Hi All,
I am confused about the values written by vzsplit.
> vzsplit -n 35
# Configuration file generated by vzsplit for 35 VEs
# on HN with total amount of physical mem 1011 Mb
# low memory 883 Mb, swap size 4095 Mb, Max treads 8000
# Resourse commit level 0:
# Free resource distribution. Any parameters may be increased
# Primary parameters
NUMPROC="228:228"
AVNUMPROC="64:64"
NUMTCPSOCK="228:228"
NUMOTHERSOCK="228:228"
VMGUARPAGES="155312:2147483647"
...
Note: VMGUARPAGES=606MB (606MB * 35 = 21GB guaranteed RAM?!)
but for n=36 I get resaonable results:
> vzsplit -n 36
...
# Primary parameters
NUMPROC="333:333"
AVNUMPROC="94:94"
NUMTCPSOCK="333:333"
NUMOTHERSOCK="333:333"
VMGUARPAGES="32947:2147483647"
..
Note: VMGUARPAGES=128MB (128MB * 36 = 4.5GB guaranteed RAM)
So whats wrong here?
- Dietmar
Version: vzctl version 3.0.18-1dso1 on Debian 4, kernel 2.6.22
|
|
|
|
|
Re: AW: Re: vzsplit question [message #24426 is a reply to message #24420] |
Wed, 05 December 2007 06:26 |
vaverin
Messages: 708 Registered: September 2005
|
Senior Member |
|
|
Could you please send me (probably via PM) config example generated by vzsplit -n 35?
btw, you can look at vzsplit sources here:
http://git.openvz.org/?p=vzctl;a=blob;f=src/vzsplit.c;h=6d75 2023e3266d6eb72edf83357caa86267ee236;hb=HEAD
CPULIMITS values is used to calculate VE's CPU guarantee, i.e fair share of CPU time. By using fair CPU scheduler OpenVZ kernel is able to guarantee that VE always get its share of CPU time. However if nobody uses CPU, VE can get more than guaranteed.
For example if you have 3 active VEs with equal CPUUNITS each of them should get 1/3 of CPU power.
If one of VEs is idle not uses CPU, other ones will get 1/2 CPU per VE.
If only one VE eats CPU it can get up to 100% CPU power.
But if one of the sleeping VE will awake and will request CPU -- it will be sure that it will get its share of CPU power back.
Thank you,
Vasily Averin
[Updated on: Wed, 05 December 2007 06:31] Report message to a moderator
|
|
|
|
|
Re: AW: Re: AW: Re: vzsplit question [message #24433 is a reply to message #24429] |
Wed, 05 December 2007 08:05 |
vaverin
Messages: 708 Registered: September 2005
|
Senior Member |
|
|
Dietmar Maurer wrote on Wed, 05 December 2007 09:37 | Sure, so it is enough to assign all VEs the same value, for example:
CPUUNITS=1000
but vzsplit generate value depending on 'n' - why ?
|
If the node is not overcommitted CPULIMITS can be recalculated to MHz. Some users preferes to see CPU guarantee in MHz rather in abstract "shares of node's CPU".
You can find this formula in vzsplit sources.
thank you,
Vasily Averin
|
|
|