VirtualBox performance better with host i/o cache off

I was just building a vagrant environment with the box debian/stretch64. This is a test bed for ruby chef, so first thing my provisioner does is this:

apt-get install -y curl
curl -L https://omnitruck.chef.io/install.sh | bash -s -- -v 13.7.16

However, that takes minutes to finish. Specifically the install chews a lot on dpkg's "Unpacking ..." instances. I figured it might be a disk issue and I found the "Use Host I/O Cache" setting for the VirtualBox SATA controller. It was switched on so I switched it off and tried again ... tada, the same two commands from above run through in about 10 seconds.

So my question is primarily, how I can get a better view of the host I/O cache. What linux tools are available to inspect and configure it? I have read https://www.virtualbox.org/manual/ch05.html#iocaching and I would like to verify whether I'm affected by one of the disadvantages mentioned there.

Also, I would very much like to hear your interpretation of why deactivating the cache should lead to a performance increase. I am using a workstation with arch linux, 16GB of RAM (htop shows 5.17G/15.6G used while the 1G vm is running) and an i5 7500 3.4 GHz. Let me know if I can provide more details.

UPDATE: I didn't measure it but also with the box debian/jessie64, dpkg takes very long to decompress packages when the host I/O cache is on.

Thanks!


This is a bug in VirtualBox 5.2.x - it appearently leads to continuous syncs when the cache is turned on. According to the linked ticket, it is fixed in VirtualBox 5.2.19.