Why isn't "use host I/O cache" option on by default?

Discussions about using Solaris guests in VirtualBox.
Post Reply
wfiveash
Posts: 34
Joined: 7. Sep 2008, 22:31

Why isn't "use host I/O cache" option on by default?

Post by wfiveash »

Recently I configured a Solaris guest to run a recent build of Solaris 11 so I could build the Solaris OS in it. What I found was that even though I had given the Solaris guest 8 CPUs and 4 GB RAM (the host is a MacBook Pro with a 4core i7), the OS build command (nightly) was hardly using any CPU. I was seeing about 97% idle during the build. While looking at what I could do to improve this performance I noticed that the "use host I/O cache" option was off on the SATA controller for that guest. When I turned this on, restarted the Solaris guest and ran nightly I saw CPU utilization go way up to about 98% (idle was in the 1-2% range). Shouldn't the "use host I/O cache" be on by default?
aeichner
Oracle Corporation
Posts: 193
Joined: 31. Aug 2007, 19:12

Re: Why isn't "use host I/O cache" option on by default?

Post by aeichner »

The host I/O cache is not used by default because it can cause I/O timeouts in the guest if the host faces a high I/O load and the host cache can't cope with it.
We encountered this when running I/O benchmarks in several VMs on different host operating systems. The guest will become unusable most of the time. The other reason is that the I/O cache on the host will be trashed with data from the disk image which is unnecessary because the guest uses free RAM for its own cache. Having the host I/O cache enabled can speed up certain I/O operations. Compiling software is one of these operations because it reads a lot of small files.
Post Reply