3 responding to guest ide/sata flush requests – Sun Microsystems VIRTUALBOX VERSION 3.1.0_BETA2 User Manual
Page 156
11 Troubleshooting
In order to work around this problem (the true fix is to use a faster file system that
doesn’t exhibit such unacceptable write performance), it is possible to flush the image
file after a certain amount of data has been written. This interval is normally infinite,
but can be configured individually for each disk of a VM.
For IDE disks use the following command:
VBoxManage setextradata VMNAME
"VBoxInternal/Devices/piix3ide/0/LUN#[x]/Config/FlushInterval" [b]
For SATA disks use the following command:
VBoxManage setextradata VMNAME
"VBoxInternal/Devices/ahci/0/LUN#[x]/Config/FlushInterval" [b]
The value [x] that selects the disk for IDE is 0 for the master device on the first
channel, 1 for the slave device on the first channel, 2 for the master device on the
second channel or 3 for the master device on the second channel. For SATA use values
between 0 and 29. Only disks support this configuration option. It must not be set for
CD-ROM drives.
The unit of the interval [b] is the number of bytes written since the last flush. The
value for it must be selected so that the occasional long write delays do not occur.
Since the proper flush interval depends on the performance of the host and the host
filesystem, finding the optimal value that makes the problem disappear requires some
experimentation. Values between 1000000 and 10000000 (1 to 10 megabytes) are
a good starting point. Decreasing the interval both decreases the probability of the
problem and the write performance of the guest. Setting the value unnecessarily low
will cost performance without providing any benefits. An interval of 1 will cause a
flush for each write operation and should solve the problem in any case, but has a
severe write performance penalty.
Providing a value of 0 for [b] is treated as an infinite flush interval, effectively
disabling this workaround. Removing the extra data key by specifying no value for [b]
has the same effect.
11.1.3 Responding to guest IDE/SATA flush requests
If desired, the virtual disk images can be flushed when the guest issues the IDE FLUSH
CACHE command. Normally these requests are ignored for improved performance.
The parameters below are only accepted for disk drives. They must not be set for DVD
drives.
To enable flushing for IDE disks, issue the following command:
VBoxManage setextradata VMNAME
"VBoxInternal/Devices/piix3ide/0/LUN#[x]/Config/IgnoreFlush" 0
The value [x] that selects the disk is 0 for the master device on the first channel, 1
for the slave device on the first channel, 2 for the master device on the second channel
or 3 for the master device on the second channel.
To enable flushing for SATA disks, issue the following command:
156