Thursday, May 10, 2018

virtual machine - How does VirtualBox's memory usage work?

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:

    1. VirtualBox.exe (1), using 60 MB of memory (This one seems to have the most CPU usage)

    2. VirtualBox.exe (2), using 20 MB of memory

    3. 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:


Someone 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:


VirtualBox task manager

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...