1

This has been a bit of a pain for me, I'll try to provide as much info as possible. My set-up is as follows:

I have a laptop running Windows 7, with a wired Ethernet connection to a router. I have a 1TB external hard drive connected via USB 2.0 to the Windows laptop, and externally powered.

Running on the Windows laptop, I have VirtualBox running FreeNAS 8.0 Release VM with its primary hard drive VDI file residing in the root folder of the external USB hard drive.

I have another virtual hard drive VDI named 'media1' which is also sitting in the external USB hard drive's root folder, and connected via virtual IDE controller to the FreeNAS VM.

The FreeNAS VM's virtual NIC is bridged to the LAN via the host OS (Windows 7). I have CIFS and AFP shares running. When I load up the Windows 7 host machine and connect to a CIFS share on the FreeNAS VM [running in VirtualBox on the same machine], I can transfer files at about 10 mega bytes per second. When I connect via AFP / CIFS from another machine on the LAN, regardless of whether it's via wired Ethernet or 802.11n, I get transfer speeds of about 10-30 mega bits per second. I know TCP has overhead, but a one-tenth reduction? I can literally download files from the Internet faster than I can transfer them to and from my VM. There's no difference in read/write speed at all...both sit at about 15 mbps all the time.

AFP is even slower. I'm logging into an account with AFP. With CIFS I'm connecting unauthenticated. I hope I've provided enough vital information. If more configuration settings are needed, I can provide them, but I'm guessing the actual bottleneck has to do with the infrastructure rather than the configuration? Do let me know if I can elaborate at all. Any advice at all would be very appreciated.

3
  • What brand is the NIC in the laptop. I would expect Wireless to be notably slower than wired.
    – Chris S
    Jun 2, 2011 at 15:28
  • Intel PRO/1000 MT Desktop (Bridged adapter, Marvell Yukon 88E8039 PCI-e Fast Ethernet Controller) I think? Jun 4, 2011 at 10:23
  • I would suggest disabling on the virtual bridge adapter. See if that helps.
    – xciter
    Jun 8, 2011 at 8:33

2 Answers 2

1

How are you creating the CIFS / AFS shares? If you are using VirtualBox's builtin file sharing that could be the problem. Make the share normally on the OS.

Try creating an NFS share and test if that does any better.

Use IOZone to test. It's an open source filesystem benchmarking utility.

Here's an example command:

iozone -Rab result.wks -i 0 -i 1 -+u -f z:\scratch\test.tmp -q 64k -n 32M -g 1G -z

Use the map network drive tool in Windows and choose a drive letter. In my example I chose z:. Try this for all of the shares and see how it performs.

During the test you could run the command iostat -x 10 to get some disk stats. Paste the results of iozone and the output of iostat during the benchmarks.


6/5/11 Update:

FreeNAS. Right. It sounds like this could be a problem with speed/duplex settings. FreeNAS runs OpenBSD right? ethtool should work on that. run ethtool eth0 and verify you're being linked up at gigabit. I've run into some very annoying issues with Realtek NICs on *BSD before, having to build some custom module to get it to work correctly.


6/5/11 2nd Update

Also check your virtualbox network settings under 'Device' when your instance is powered down. Try a different adapter type and also try host-only adapter for one of the NICs and NAT for another if you want your guest OS to have internet access.

7
  • Thanks for the tip on IOZone, unfortunately using FreeNAS to create the shares not VBox. Will Check IOZone out though :) Jun 4, 2011 at 10:23
  • Main post updated. Post the speed/Duplex settings and your IOZone results?
    – skrewler
    Jun 6, 2011 at 6:19
  • Ethtool doesnt run on FreeNAS 8.0 in shell mode, "command not found". Attempting to run IOZone, however I'm starting to think that FreeNAS is nothing more than a steaming pile of poop. Choosing NAT doesn't let me access the machine on the LAN. Jun 9, 2011 at 19:44
  • Not sure if this helps but my interface driver is 'em' Jun 9, 2011 at 19:59
  • Results from IOZone would be most helpful. If ethtool isn't ]installed then install it. Also output from stuff like IOTop. Run bonnie on the USB drive in question. Apologies for being blunt here, but I'm trying to help but you're not giving me answers to any of my questions. If you've just given up and would rather not pursue it further, that's cool with me, just let me know.
    – skrewler
    Jun 10, 2011 at 7:01
1

10 MebiBytes per second data transfer within your own machine is bad enough already, even if the process doing the reading is inside a guest OS in a VM and reading from a virtual disk image file on a slow external USB hard drive. You should be getting at least twice that. If that slowness is due to latency introduced by running FreeNAS within a VM, then that VM-caused latency is probably killing your network throughput as well.

When you say "Ethernet", is your Ethernet connection 10 megabit, 100 megabit, or gigabit? If it's 100 megabit and your VM is introducing lots of latency, then I could easily see getting only 30 megabits per second of AFP or SMB throughput in that situation. As for your 802.11n case, you didn't say what your 802.11n data rate was between your client and AP (and between your FreeNAS box and your AP if your FreeNAS box is wireless), so you could easily be seeing RF conditions where you only get 20-60 megabit per second signaling rates, in which case 10-30 megabits per second of throughput is to be expected.

I think a very telling test would be to install FreeNAS and some of your media files on its own partition (preferably on your external USB hard drive so you're not changing too much all at once), and see what AFP and SMB throughput you get when FreeNAS is running natively instead of via VirtualBox.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .