[vbox-dev] reducing state-file size (and the time to create it)

Klaus Espenlaub klaus.espenlaub at oracle.com
Mon Apr 14 15:59:20 GMT 2014

Hi Petar,

On 12.04.2014 17:06, Petar Bogdanovic wrote:
> Hi,
> VirtualBox seems to be very efficient when saving the contents of a VM's
> memory.  If your VM just booted, saving its state will take less than a
> second, while saving a VM that, for example, has been fetching many
> things over NFS (and therefore has full caches claimed by the OS) will
> take its time because almost all $memsize has to be written down.
> How does VB know what parts of memory have to be saved and is there a
> way to influence this by some trivial action inside of the VM?

It's using information from the lazy VM memory allocation mechanism. At 
VM start, there's no backing allocated for the VM's RAM, it's allocated 
as the VM writes to it. This decreases VM startup time and helps a tiny 
bit with saving the VM state if the latter is done early.

With a decent OS all memory is quickly in use (and this won't change 
usually), so we couldn't see any use case for influencing this from 
inside the VM.


> Thanks,
> 		Petar Bogdanovic

More information about the vbox-dev mailing list