Page 1 of 1

Memory use in the host differs between guest OS?

Posted: 13. Mar 2010, 13:01
by HubTou
Hello,

I noticed different behaviors among guest operating systems as to memory used in the host.

For example, Linux CentOS memory seems to be allocated progressively, whereas Windows (2008core, XP) or FreeBSD allocate all the memory I tell them to run with from the start.

Any explanation for that?

Do you know other guest OS behaving like CentOS?

Best regards,

Hubert

Re: Memory use in the host differs between guest OS?

Posted: 18. Jul 2010, 13:45
by Akuma
All the guest memory is allocated dynamically by VirtualBox from the host as required by the guest OS. Even those Windows 2008, XP, etc. the memory is given dinamically.
It seem that CentOS is capable of seeing the memory VirtualBox gives to it instead the memory that has been assigned to it. In other words, the other guest OS do the assumption that the assigned memory is the memory they've, meanwhile CentOS checks this.

Re: Memory use in the host differs between guest OS?

Posted: 18. Jul 2010, 15:48
by Sasquatch
My guess is that unlike Linux, the other systems already fill the whole memory with cached files and whatnot to speed things up. But, if I were to give more RAM to my Windows VMs, like XP, it doesn't allocate all of it's RAM yet. When I give XP 2 GB (out of the 3 I have on my host) instead of the 512 MB it normally has, I don't see a usage of 2 GB at once. Instead, it will stop allocating memory when it gets to 1 GB, maybe a bit more. Apparently, going to 1 GB is enough of a cache buffer. The Guest itself isn't even using 400 MB, so it's not like it's filling the whole memory with programs that are running.

So, depending on the amount of RAM you give the VM, and depending on the OS you run inside the VM, more or less memory is pre-allocated.