OpenIndiana, NFS and VirtualBox slow network solution

Discussions related to using VirtualBox on Solaris hosts.

OpenIndiana, NFS and VirtualBox slow network solution

Postby carbs » 16. Oct 2011, 09:53

Hi all,

I was having issues with VirtualBox 4.1.4 on OpenIndiana, when ever a VM with Bridged networking was running NFS performance (using ZFS NFS sharing) was terrible (7Mb/s as apposed to around 700Mb/s when no VM was running).

But using Crossbow I was able to workaround the problem and have everything working well, so I though I would post my findings in the hope it helps others, another solution is the bridge VM's to a dedicated NIC as I found on this site... http://www.mobygeek.net/blog/2011/09/19/openindiana-virtualbox-and-nfs/, I was unable to use this solution as my server has a single NIC (its a HP Microserver).

I used Crossbow to create a virtual NIC, then bridge the VM to that. There are some limitations though, you need to use one VNIC per virtual machine and the MAC address of the VNIC must be used as the MAC address on the virtual machine.

So on my machine the one NIC is bge0 and the VM is called server, so these are the commands I used:

Code: Select all   Expand viewCollapse view
dladm create-vnic -l bge0 vnic1
dladm show-vnic

Code: Select all   Expand viewCollapse view
LINK         OVER         SPEED  MACADDRESS        MACADDRTYPE         VID
vnic1        bge0         1000   2:8:20:7a:f7:42   random              0

Note: The MAC address doesn't have leading zero's

At this point I noted down the MAC address for vnic1 (padding it with zeros where required, then ran the command below to modify the VM and bridge it to vnic1.

Code: Select all   Expand viewCollapse view
VBoxManage modifyvm server --nic1 bridged --bridgeadapter1 vnic1 --macaddress1 0208207af742


These configuration changes survive a reboot so there is nothing more to do to keep it working long term.

I then started up the virtual machine and my NFS was flying along at 700Mb/s and the VM was also working well, although the first few minutes after a reboot tend to be very slow, then it picks up.

I haven't done extensive testing but so far so good.
carbs
 
Posts: 2
Joined: 16. Oct 2011, 09:45
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: Gentoo Linux

Re: OpenIndiana, NFS and VirtualBox slow network solution

Postby ljw1 » 28. Oct 2011, 02:10

I can't wait to try this as this is one of the main reasons for me using esxi instead of virtualbox. No matter what changes are made to the host nothing would improve the speed but if adding a vnic fixes it, then a victory dance is in order.
ljw1
 
Posts: 41
Joined: 26. Apr 2009, 10:35
Primary OS: OpenSolaris 11
VBox Version: OSE other
Guest OSses: Ubuntu

Re: OpenIndiana, NFS and VirtualBox slow network solution

Postby nmiller » 2. Nov 2011, 08:35

Thanks for posting up this solution, carbs. I've implemented it and it resolved the problem I was having between my NFS write-intensive XP VM client running on my OpenIndiana 151a host serving the NFS.

Update 11/6: Looks like this was a temporary fix. After about a week, I started seeing the same slow downs of write speed on the VM. Rebooting the guest every few days is not optimal, but I can live with it. I have the option of a second physical NIC, but am not able to route between the host's interface and the guest's. I'll toss that out to the forum to see if there are any ideas as to a solution.

Update 11/17: I ended up configuring a second interface on the system, then bringing up a vnic on that interface to use with the VM. It's been over a week and I've seen no further slowdowns.
nmiller
 
Posts: 8
Joined: 9. Feb 2010, 22:31
Primary OS: OpenSolaris 10
VBox Version: PUEL
Guest OSses: XP, Linux, Solaris 10

Re: OpenIndiana, NFS and VirtualBox slow network solution

Postby carbs » 4. Dec 2011, 11:06

nmiller wrote:Thanks for posting up this solution, carbs. I've implemented it and it resolved the problem I was having between my NFS write-intensive XP VM client running on my OpenIndiana 151a host serving the NFS.

Update 11/6: Looks like this was a temporary fix. After about a week, I started seeing the same slow downs of write speed on the VM. Rebooting the guest every few days is not optimal, but I can live with it. I have the option of a second physical NIC, but am not able to route between the host's interface and the guest's. I'll toss that out to the forum to see if there are any ideas as to a solution.

Update 11/17: I ended up configuring a second interface on the system, then bringing up a vnic on that interface to use with the VM. It's been over a week and I've seen no further slowdowns.


Yeah looks like any nfs writing is just rubbish performance wise, on my Gentoo Linux VM its runs really slow from power on. Looks like I will have to install another NIC just for VM's.

So this is still an issue, but at last there seems to be ways around it given enough hardware :wink:
carbs
 
Posts: 2
Joined: 16. Oct 2011, 09:45
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: Gentoo Linux

Re: OpenIndiana, NFS and VirtualBox slow network solution

Postby michaelhase » 9. May 2012, 21:06

Just stumbled over this post. Many many thanks for this tip, the use of a crosbow vnic fixed my performance issues wenn running a vm and doing any nfs work at the same time. I always had to suspend all vms when doing something serious via nfs. Still on opensolaris b130 and virtualbox 4.1.8. The nfs performance problem occured even when doing nfs work between the host system and a different machine, no vm involved in this nfs traffic. vmstat shows 100% system time on one host core, and many xcalls in this case, and the server responds very slowy in general. With suspended vms it was no problem to generate nfs traffic with gbit wire speed, with the vnic trick this is possible with running vm guests, too. Thanks again.
michaelhase
 
Posts: 1
Joined: 9. May 2012, 20:47
Primary OS: OpenSolaris 10
VBox Version: OSE other
Guest OSses: XP, Win7, debian, CentOS, OI, FreeBSD


Return to VirtualBox on Solaris Hosts

Who is online

Users browsing this forum: No registered users and 2 guests