OpenVZ Forum


Home » General » Support » Memory values & documentation
Memory values & documentation [message #14383] Wed, 27 June 2007 07:48 Go to next message
ugo123 is currently offline  ugo123
Messages: 22
Registered: June 2007
Junior Member
Hello,

Just a quick question for you guys....
I'm a total newbie to OpenVZ, coming from the Xen world.

I've installed it yesterday from a vanilla kernel and everything is working okay with the default settings, and it seems like it is a very good virtualization solution Smile.

But, now it is time for me to configure it properly, and that's where I seriously bang my head....

So far, from what I've understood from the documentation :

vmguarpages -> the guaranteed and "real" memory assigned to the VM.
oomguarpages -> the guaranteed memory in case the HN is in out of memory condition, basically it should be the same value than vmguarpages in order to be "safe" in that case.
privvmpages -> the non guaranteed and "burst" zone of the VM.

Am I correct so far ?

But now, for the values, if I follow the wiki UBC page here :

http://wiki.openvz.org/UBC_configuration_examples_table

For the configuration C (which is eight VMs on a host with 2GB of RAM)....
I don't get the values and I don't want to follow something I don't get Smile.

vmguarpages = 102,400, so it's roughly 102,400 * 4 KB ~= 400 MB.
and privvmpages = 262,144, so it's roughly 262,144 * 4KB ~= 1 GB.

I'm quite ok for the privmpages (if it's just a "burst" value and if I get it right), but how can you "guarantee" 400 MB * 8 = 3.200 GB of VM memory with only 2GB on the host ?!

Is that some kind of magic ? an error in the wiki ? or am I really dumb ? Smile

I'm focused on that problem for a few hours now and I'm really stuck.... if you could answer me please Smile

Thanks a lot,
Ugo PARSI

[Updated on: Wed, 27 June 2007 07:48]

Report message to a moderator

Re: Memory values & documentation [message #14391 is a reply to message #14383] Wed, 27 June 2007 09:17 Go to previous messageGo to next message
Alexandr Andreev is currently offline  Alexandr Andreev
Messages: 35
Registered: October 2006
Member
Hello,

Yes, you are right, guaranteed VE's memory size for case "C" is 3.2GB, but that it because overall virtual memory size on this host 6GB (2GB ram + 4GB swap). Residuary 2.8GB is used for kernel memory + socket buffers + non-guaranteed memory available for applications that can be limited by privvmpages.

I see this wiki page says nothing about swap Sad I'll fix it
Re: Memory values & documentation [message #14392 is a reply to message #14391] Wed, 27 June 2007 09:35 Go to previous messageGo to next message
ugo123 is currently offline  ugo123
Messages: 22
Registered: June 2007
Junior Member
Alexandr Andreev wrote on Wed, 27 June 2007 05:17

Hello,

Yes, you are right, guaranteed VE's memory size for case "C" is 3.2GB, but that it because overall virtual memory size on this host 6GB (2GB ram + 4GB swap). Residuary 2.8GB is used for kernel memory + socket buffers + non-guaranteed memory available for applications that can be limited by privvmpages.

I see this wiki page says nothing about swap Sad I'll fix it


Ohhh ok, thank you, that makes sense now Smile
I'm glad that I am not totally THAT insane Smile

Hmm, speaking of swap, is it a good thing to use that much swap ? (I guess your settings were made from previous and field-tested experience, so I guess it's alright)

I was always told not to swap AT ALL.... and to use swap as a last barrier before system failure and to upgrade the RAM ASAP in case of massive swap.
It is something else for OpenVZ and the usage is recommended ?

I just plan on virtualizing mail, web and sql servers.

[Updated on: Wed, 27 June 2007 09:41]

Report message to a moderator

Re: Memory values & documentation [message #14393 is a reply to message #14383] Wed, 27 June 2007 11:07 Go to previous message
Alexandr Andreev is currently offline  Alexandr Andreev
Messages: 35
Registered: October 2006
Member
Quote:

is it a good thing to use that much swap ? (I guess your settings were made from previous and field-tested experience, so I guess it's alright)


AFAIK it's just general rule of thumb for swap size - it should be around double your RAM size. There are no special OpenVZ requirements. You can even disable swap at all if you think your RAM is enough.

I guess these configurations were obtained by vzsplit utility, which just relies on your host configuration - memory and disk space available.

BTW, why you think swap is bad? Do you like oomkiller? Wink
Previous Topic: *SOLVED* Erro Install CPANEL - Erro in Install (Bad file descriptor at ./install line 650)
Next Topic: *SOLVED* vzdump trouble with veid < 1000
Goto Forum:
  


Current Time: Fri Nov 15 18:44:30 GMT 2024

Total time taken to generate the page: 0.03306 seconds