Here is my setup: I am running a Dual Quad Core Xeon 2.0Ghz with 16GB of Ram and 2 x 2TB WD Green drives with FreeBSD 7 that has ZFS on root. The Hard Drives are in a ZFS Mirror. I am running VirtualBox 4.0.14. I have 2 Windows Server 2003 Guests that are each using 4 GB of Ram respectively and have 320 VDI Virtual Disks that are about 70% full. One Windows Server is a terminal server and the other is an MS SQL database server.

When performing disk copies and transfers from the FreeBSD server directly on Samba I am able to get 80-90 MB/s transfer rates on both read and write. When I try to transfer on inside the VM's I get a maximum of 10MB/s.

When I replicate a large file inside the VM I get 10MB/s max. Using zpool iostat I never see the VM's use more than 20-30 MB/s max transfer. Inside of VirtualBox configuration I have tried both the IDE adapter and also SATA. I have not tried SCSI yet.

What could be the causes of such slow disk access speeds?

  • I did some benchmarking and got some crazy results. Using CrystalDiskMark 3.0.1, on SEQ I get 229.1 MB/s Read and 168.5 Write. On 512K I get nearly the same. On 4K I get 11.56 MB/s Read and 11.07 MB/s write. I believe this points directly to the problem. On small files the read and write goes to crap. Is there any tuning I can do to improve this performance? – chipadmin Apr 24 '12 at 21:45
  1. You should update to 8.3 or 9.0, there are a lot of fixes in there.
  2. You should update VirtualBox. You need to update ports before doing this.
  3. Good way to setup disks would be:
    • moving them to zvols, zvols can be transferred to VirtualBox by VBoxManage internalcommands createrawvmdk, this will makes it use less metadata and limits sectors to 8k (HINT: as your sectors default max to 512K almost each byte written will result in writing 512K block);
    • all data on the virtual disk is already governed by virtualized system FS so you can finetune zfs vdev:
      • sync=disabled, this will turn off logging on the disk, gives disk ability to not wait for long-running writes;
      • logbias=throughput, when log is enabled new pages for data would be aquired from zpool, not from intent log, ditches double write; also data is written immediately;
      • compression=on, in most environments this speeds up reading/writing;
  4. Don't use SCSI, SATA is a better way of using disk. After updating VirtualBox set hostiocache on controller.

Change your adapter type in Virtualbox's Settings for the guest OSs with the problem.

First, select the instance that is experiencing slow network transfer rates and shut it down. Then go into its settings.

Select "Network" on the left, then "Advanced" on the right.

There is a drop down menu labelled "Adapter Type".

Try each adapter type and see if one of the other options fixes your problem.

You may also want to upgrade to the current version of Virtualbox: 4.1.14. I think the most recent one in the FreeBSD ports collection is 4.1.12 at the moment, but even that should be better than the 4.0.14 that you're using.

On a side note, why FreeBSD 7? 9 has much better ZFS support.

  • I checked the ports and it is only 4.0.14 for Virtualbox. I haven't attempted to compile from source yet, but probably should. I choose FreeBSD 7 over 9 because a good friend and FreeBSD enthusiast told me that setting up ZFS on root would be much easier on 7, and after a few failed attempts at 9, he was correct. The only adapter type I haven't tried is the SCSI type. The other 2 didn't make a difference. – chipadmin May 16 '12 at 6:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.