OpenVZ Forum


Home » Mailing lists » Users » Memory calculations
Memory calculations [message #25393] Sat, 22 December 2007 00:01 Go to next message
Jeff Blasius is currently offline  Jeff Blasius
Messages: 6
Registered: December 2007
Junior Member
VZ users-
Can someone explain to me how vzcalc calculates the current and max
Mem? I initially thought Promised% was based upon VMGUAR and Max% was
based upon PRIVVM, but that doesn't seem to be the case. I believe I'm
allowing 128MB of guaranteed mem and 512MB burstable using the
parameters below. Is that true? The HN below has 32GB ram 64GB swap.

$  /etc/vz/conf/3166.conf
VMGUARPAGES="31250:9223372036854775807"
OOMGUARPAGES="31250:9223372036854775807"
PRIVVMPAGES="125000:150000"

$ vzcalc -v 3166
Resource     Current(%)  Promised(%)  Max(%)
Low Mem          0.04       0.53       0.53
Total RAM        0.10        n/a        n/a
Mem + Swap       0.03       0.20        n/a
Alloc. Mem       0.05       0.20       0.68
Num. Proc        0.00        n/a       0.15
--------------------------------------------
Memory           0.10       0.53       0.68


Thank You for the great software! It has dramatically improved the way we work.
                     -jeff

-- 
Jeff Blasius / jeff.blasius@yale.edu
Phone: (203)432-9940  51 Prospect Rm. 011
High Performance Computing (HPC)
UNIX Systems Administrator, Linux Systems Design & Support (LSDS)
Yale University Information Technology Services (ITS)
Re: Memory calculations [message #25422 is a reply to message #25393] Mon, 24 December 2007 10:59 Go to previous messageGo to next message
vaverin is currently offline  vaverin
Messages: 708
Registered: September 2005
Senior Member
http://wiki.openvz.org/UBC_systemwide_configuration
man vzcalc
Re: Re: Memory calculations [message #25635 is a reply to message #25422] Fri, 04 January 2008 18:36 Go to previous messageGo to next message
Jeff Blasius is currently offline  Jeff Blasius
Messages: 6
Registered: December 2007
Junior Member
Hello Vaverin,
Yes, believe me, I've read the documentation and it's generally very
good. But, for this particular point I just don't follow it. Maybe
it's just me.

So, man vzcalc says little more than: (resourses should be resources btw)
Promised - shows the resourses soft limit values "promised" for a given VE.
Max - shows the resourses hard limit values "promised" for a given VE.

This basically just redefines the terms promised and max, but doesn't
relate them to openvz beancounters in any way. From my numbers it
appears that
Promised = PRIVVMPAGES * 4096 / Ram + Swap
and
Max = (PRIVVMPAGES * 4096 / Ram + Swap) + Num. Proc

Assuming Num. Proc relates to the beancounter numproc,
Num. Proc = Num. of processes within the VE / 16000 (from
http://wiki.openvz.org/Numproc#numproc)
Is this correct?

I think my problems with the above are two things.
1. I'm not certain where max comes from and if it does come from the
above inferred formulas why it's really useful. I mean it's the
maximum of two seemingly independent beancounters. and
2. Promised seems like a misleading word (if in fact it does relate to
PRIVVMPAGES) since VMGUARPAGES is actually the "allocation guarantee".

Thanks,
                 jeff

On Dec 24, 2007 5:59 AM, vaverin <vvs@sw.ru> wrote:
>
>
> http://wiki.openvz.org/UBC_systemwide_configuration
> man vzcalc
-- 
Jeff Blasius / jeff.blasius@yale.edu
Phone: (203)432-9940  51 Prospect Rm. 011
High Performance Computing (HPC)
UNIX Systems Administrator, Linux Systems Design & Support (LSDS)
Yale University Information Technology Services (ITS)
Re: Re: Memory calculations [message #25744 is a reply to message #25635] Tue, 08 January 2008 12:42 Go to previous message
vaverin is currently offline  vaverin
Messages: 708
Registered: September 2005
Senior Member
Hi Jeff,

Jeff Blasius wrote on Fri, 04 January 2008 21:36

So, man vzcalc says little more than: (resourses should be resources btw)


thank you, I've fixed this typo

Quote:

This basically just redefines the terms promised and max, but doesn't relate them to openvz beancounters in any way. 

Is this correct?


You can take a look at the sources of vzcalc here:
http://git.openvz.org/?p=vzctl;a=blob;f=src/vzcalc.c;h=073ad d43e95f173fbe8ffb9e9e4ada405cbf4d51;hb=HEAD
As you can see it is based on the formulas explained in the following article: http://wiki.openvz.org/UBC_systemwide_configuration

Quote:

I think my problems with the above are two things.
1. I'm not certain where max comes from and if it does come from the above inferred formulas why it's really useful. I mean it's the maximum of two seemingly independent beancounters. and
2. Promised seems like a misleading word (if in fact it does relate to PRIVVMPAGES) since VMGUARPAGES is actually the "allocation guarantee".


At the first glance this utility just checks systemwide configuration. However I tend to agree that "promised" is misleading word here.

thank you,
Vasily Averin

[Updated on: Tue, 08 January 2008 12:53]

Report message to a moderator

Previous Topic: a simple utility to execute something on all VEs
Next Topic: virtualisation conference with openvz
Goto Forum:
  


Current Time: Tue Mar 19 10:16:29 GMT 2024

Total time taken to generate the page: 0.02462 seconds