How does VirtualBox's memory usage work?
Posted
by DrFredEdison
on Super User
See other posts from Super User
or by DrFredEdison
Published on 2009-11-06T18:43:20Z
Indexed on
2010/05/20
9:21 UTC
Read the original article
Hit count: 302
I've been running several VM's with VirtualBox, and the memory usage reported from various perspectives, and I'm having trouble figuring how much memory my VMs actually use. Here is an example:
- I have a VM running Windows 7 (as the Guest OS) on my windows XP Host machine.
- The Host Machine Has 3 GB of RAM
- The Guest VM is setup to have a base memory of 1 GB
- If I run Task Manger on the Guest OS, I see memory usage of 430 MB
- If I run Task Manger on the host OS, I see 3 processes that seem to belong to VirtualBox:
- VirtualBox.exe (1), using 60 MB of memory (This one seems to have the most CPU usage)
- VirtualBox.exe (2), using 20 MB of memory
- VBoxSvc.exe, using 11.5 MB of memory
- While running the VM, the Host OS's memory usage is about 2 GB
- When I shut down the VM, the Host OS's it goes back to memory usage goes down to about 900 MB
So clearly, there are some huge differences here. I really don't understand how the GuestOS can use 400+ MB, while the Host OS only shows about 75 MB allocated to the VM. Are there other processes used by VirtualBox that aren't as obviously named?
Also, I'd like to know if I run a machine with 1 GB, is that going to take 1 GB away from my host OS, or only the amount of memory the Guest machine is currently using?
update
Somene expressed distrust over my memory usage numbers, and I'm not sure if that distrust was directed at me, or my Host OS's Task Manager's reporting (which is perhaps the culprit), but for any skeptics, here is a screenshot of those processes on the host machine:
© Super User or respective owner