forcing a Virtbox to flush its cache on demand or more frequently

Mike Tancsa mike at sentex.net
Mon Jul 21 14:21:39 UTC 2014


I have been experimenting with HAST and virtbox to have failover between 
servers and ran into a problem with caching.  I am guessing in order to 
prevent every little guest write from writing out to the host's disks, 
the hypervisor waits for some period of time to write things out. 
However, this delay can be upwards of hours! On a normally busy box this 
is not an issue, but for a guest OS that does infrequent (but important) 
writes, the delay is much too long.

I have already set --hostiocache off, but it does not seem to make a 
difference.  If I set a process in the guest to do something like

dd if=/dev/urandom of=/tmp/junk bs=1024k count=5

that seems sufficient to trigger a write to the hypervisor's disk, but 
this is from limited testing only.  Is there a better way to do it ?

	---Mike




-- 
-------------------
Mike Tancsa, tel +1 519 651 3400
Sentex Communications, mike at sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada   http://www.tancsa.com/


More information about the freebsd-emulation mailing list