Memory values & documentation [message #14383] |
Wed, 27 June 2007 07:48 |
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 .
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 .
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 ?
I'm focused on that problem for a few hours now and I'm really stuck.... if you could answer me please
Thanks a lot,
Ugo PARSI
[Updated on: Wed, 27 June 2007 07:48] Report message to a moderator
|
|
|
|
Re: Memory values & documentation [message #14392 is a reply to message #14391] |
Wed, 27 June 2007 09:35 |
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 I'll fix it
|
Ohhh ok, thank you, that makes sense now
I'm glad that I am not totally THAT insane
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
|
|
|
|