On Thu, Aug 28, 2008 at 02:00:55PM -0700, Andrew Lentvorski wrote:
How big are the VM's in terms of emulated RAM?
A 1GB virtual machine should take at least 20 seconds *just to read the RAM
from disk*.
I would check the VMWare forums. This question has likely come up there.
I suspect that they heavily optimize the Windows version and just leave the
Linux alone once it reaches working.
First thing is to make sure that the vmware guest tools are running.
They have a GPL version now that I've had fairly good results with.
This hooks into the kernel so that VMWare is aware of memory not being
used.
The second thing I did to my vm's is to add two lines to the
pre-suspend script that gets run whenever you suspend (it normally
shuts down the network, which I had to disable, since there isn't any
reason to do it).
sync
echo 3 > /proc/sys/vm/drop_caches
The first line writes out any dirty buffers and the second tells the
kernel to discard any cached buffers that can be reread from disk.
It'll make for more reading after coming back up, but it should be
less than the bulk of the cache that normally gets done.
This has increased my resume time by about 10-fold with a 2GB VM.
I've also noticed that with a MacOSX host, resume is very fast if the
suspend writes are still in disk cache. So basically, a suspend and
an immediate resume doesn't tell you quite as much as doing the resume
after waiting for the buffers to drain. I don't know if OSX has
anything equivalent to the drop_caches control, but with a Linux host
you could do that to make sure you're timing reading the images back
from disk.
David
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list