OpenVZ Forum


Home » Mailing lists » Users » vzsplit question
vzsplit question [message #24398] Tue, 04 December 2007 17:34 Go to next message
Dietmar Maurer is currently offline  Dietmar Maurer
Messages: 52
Registered: March 2007
Member
From: openvz.org
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: vzsplit question [message #24409 is a reply to message #24398] Tue, 04 December 2007 19:33 Go to previous messageGo to next message
vaverin is currently offline  vaverin
Messages: 684
Registered: September 2005
Senior Member
From: *rev.domonet.ru
Hi Dietmar,

I would note that vmguarpages is not physical RAM guarantee, it limits virtual memory (i.e RAM + swap).
However your results really looks strange, and I'm going to investigate this issue tomorrow.

thank you,
Vasily Averin
AW: Re: vzsplit question [message #24420 is a reply to message #24409] Wed, 05 December 2007 05:24 Go to previous messageGo to next message
Dietmar Maurer is currently offline  Dietmar Maurer
Messages: 52
Registered: March 2007
Member
From: openvz.org
> I would note that vmguarpages is not physical RAM guarantee, 
> it limits virtual memory (i.e RAM + swap).

yes, RAM + swap - but that is 5GB, not 21GB im my case!

> However your results really looks strange, and  I'm going to 
> investigate this issue tomorrow.

I also do not understand the value for CPUUNITS, which changes
with the number of VMs. I though assigning a constant value would
be enough - for example 1000.

- Dietmar
Re: AW: Re: vzsplit question [message #24426 is a reply to message #24420] Wed, 05 December 2007 06:26 Go to previous messageGo to next message
vaverin is currently offline  vaverin
Messages: 684
Registered: September 2005
Senior Member
From: *sw.ru
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: vzsplit question [message #24428 is a reply to message #24426] Wed, 05 December 2007 06:38 Go to previous messageGo to next message
vaverin is currently offline  vaverin
Messages: 684
Registered: September 2005
Senior Member
From: *sw.ru
it looks like problem is here:

390 privvm = guarpg * k_privvm[sl];
391 if (privvm > PRIVVM_PVE * mem_total) {
392 privvm = PRIVVM_PVE * mem_total;
393 guarpg = privvm;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
394 }
it is not recoomend to assign privvm for VE more than 60% RAM.
But I do not understand why this limit should increase guarpages.
At least it looks incorrect.

Thank you for bugreport,
Vasily Averin
AW: Re: AW: Re: vzsplit question [message #24429 is a reply to message #24426] Wed, 05 December 2007 06:37 Go to previous messageGo to next message
Dietmar Maurer is currently offline  Dietmar Maurer
Messages: 52
Registered: March 2007
Member
From: openvz.org
> Could you please send me (probably via PM) config example 
> generated by vzsplit -n 35?
> 

done with PM

> btw, you can look at vzsplit sources here:
> http://git.openvz.org/?p=vzctl 
> ;a=blob;f=src/vzsplit.c;h=6d752023e3266d6eb72edf83357caa8626 
> 7ee236;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.

Sure, so it is enough to assign all VEs the same value, for example:

CPUUNITS=1000

but vzsplit generate value depending on 'n' - why ?

- Dietmar
Re: AW: Re: AW: Re: vzsplit question [message #24433 is a reply to message #24429] Wed, 05 December 2007 08:05 Go to previous message
vaverin is currently offline  vaverin
Messages: 684
Registered: September 2005
Senior Member
From: *sw.ru
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
Previous Topic: Venet's ips disappearing...
Next Topic: Need to kill kernel thread migrate/xxx/0 ...
Goto Forum:
  


Current Time: Fri Mar 22 12:33:23 GMT 2019