Jump to content
1812

Increase OS X networking performance by 80% (or your money back)

7 posts in this topic Last Reply

Recommended Posts

For a while I've been looking for a way to increase os x networking performance over the mediocre e1000-82545em we all use. I've even run my network connection over a ub3 card and ethernet adapter. And since the virtio-net virtual adapter delivers the same lackluster performance as the e1000, I went hunting around for alternatives.

 

I ran across an article online (http://www.virtuallyghetto.com/2016/10/vmxnet3-driver-now-included-in-mac-os-x-10-11-el-capitan.html) which states that the VMXNET3 driver was supported for virtualized networking from 10.11.

 

It details steps to get it working in el capitan. I'm currently running 10.12.x so I figured I'd give it shot.

 

VMXNET3 is also enabled in unRaid.

 

to enable in your vm, simply change

 

<model type='e1000-82545em'/>

 

to

 

<model type='vmxnet3'/>

 

 

I did not have to use terminal to get it working as sierra automatically loaded the appropriate kext. Both read and write performance greatly increased. The attached image shows differences between the e1000-82545em and vmxnet3 when reading/writing between the vm and my synology nas. Transfer rates were tested via smb drag and drop on a 3.2GB video file, and using Blackmagic disk test.

 

This virtual adapter is suppose to support 10Gbe virtual connection, but I have yet to get it to work or display that connection speed. I believe it may have something to do with OS X wanting the "card" in a different slot but I could be way off, so any help with getting that figured out would be greatly appreciated.

 

Otherwise, enjoy faster networking!

test1.jpg.d4c9993b4ffbedcf581b2129deb0a58e.jpg

Share this post


Link to post

Update

 

After some additional testing, I was only getting about 40-50MB/s when transferring files to unRaid from the OS X vm. This was the same speed I was getting using  the e1000-82545em vnic. Since my tests to the synology NAS were consistently saturating the gigabit link with vmxnet3 (something the e1000 would never do)  it was puzzling. I then remembered that unRaid SMB in 6.2.4 and os x don't play nice together. They work, just not well.  When I reconnected to unRaid shares via AFP within the server, I was getting better than gigabit speeds, about 170ish MB write and 135ish MB reads to a cheap Kingston SSD. Additionally, while the VMXNET3 adapter only shows up as a gigabit connection in os x network setting, under about system, it shows a 10GbaseT after changing network setting>advanced. Oddly, after clicking apply they don't visually seem to stick after going back and checking, but it still shows up under the about system section.

 

VM to VM within the same server show similar speeds over gigabit, but nothing breaks 200MB/s. This may be a limitation of AFP on unraid, or of AFP in general. I do not know. I was unable to determine maximum afp transfer speeds anywhere online. Vm to VM from one server to another over gigabit via afp shows saturating gigabit connection between the 2.

 

When transferring files from a SSD cache disk on unraid to a ram disk in OS X, results were unchanged, meaning the not quite 200MB/s bottleneck is AFP.

 

I believe SMB has been updated in unRaid 6.3.x but I have yet to upgrade and won't have time to do so for a week or two. Hopefully it will have better communications between os x guests and unraid. If so, then I'll be looking for a 10Gbit switch to connect my boxes to since I already use a couple melanox cards cabled to each other between servers for backups.

a.png.aa98b739a4471aa92e819686fcb8cc4d.png

b.png.c2fec98038a00faf048d550e550f8139.png

c.jpg.769e598a213c6f6789d3a2f4c58ef119.jpg

Share this post


Link to post

another update/finding

 

on 10.12.4/unRaid 6.2.4 (and previous sierra versions) there is a weird issue that occurs when using the vmxnet3 virtual adapter on one unRaid vm, and trying to access files on another separate unRaid server/array. You can read and copy any files to the vm, but you can't upload them to the other server. This is confirmed by switching back to the e1000-82545em and normal (slower) transfers occur. This is with both smb and afp. File transfers from a vm on one server to another server resulted in a spinning pinwheel.... and eventually an error. Transferring files from a physical mac to any vm worked fine with the vmxnet3 adapter.

 

Interestingly using the vmxnet3 virtual adapter does not cause issues with compressor distributed transcoding which appears to work normally.

Share this post


Link to post

another weird issue

 

when uploading to youtube/soundcloud/etc it crawls slower than a 2 legged tortoise.... But online speed tests show full internet bandwidth.

Share this post


Link to post

More networking update:

 

The issues with smb/afp shares read/write not working on non-host unRaid shares correctly persists on 6.2.4. In the short term, I've been loading 2 virtual nic cards into the vm, the vmxnet 3 and the e1000-82545em. When writing to the host array of the vm I use the vmxnet 3 for increased performance (now running up to over 200MB/s) and when I need to write to the non-host unRaid array, I switch to the e1000. It has now been optimized for double the smb performance based on this thread https://forum.promise.com/thread/fix-for-smb-sanlink-2/

 

The increase is attribute to disabling SMB signing. The method I used is outlined by the third poster in the thread, and is as follows:

 

Open Terminal

enter: sudo -s
enter your password
enter: echo "[default]" > /etc/nsmb.conf
enter: echo signing_required=no >> /etc/nsmb.conf
enter: exit

 

To verify the file was created:

open Terminal
enter:cat /etc/nsmb.conf


output should show:
[default]
signing_required=no

 

This will increase the e1000 speed but make it less secure. You should not use it if you are not on a private network. 

 

 

 

Once connected to an smb server, you can check if signing is disabled:

open Terminal

enter: smbutil statshares -a

If you see " SIGNING_ON = TRUE" then signing is NOT disabled. This could be because it was not disabled properly OR as I've found, connecting to other mac SMB file shares still uses signing.

 

 

 

-----edit---

Using a test server share on 6.4 rc6, transferring a file to and from a non-host unRaid share using vmxnet3 saturates the gigabit connection of the share. So, it appears much of this will be resolved with non-host shares. Note: this testing was done with disabled signing.

 

---2nd edit, August 2018---

 

I haven't done anything with this since the last post. I've since given up on a virtio-like 10gbe virtual adapter that works with osx. Instead, I'm now using a Solarflare 2 port 10gbe card, broken into 2 iommu groups (pcie_acs_override=multifunction) and xen-pciback.hide=device id  to split out and hide one port of the card. This saves me a pcie slot and uses a DAC from one port to the other. In unRaid, set  the port to a static/different ip of your regular network, then in the osx xml add the device address a the bottom (keeping the emulated e1000 for internet access.) Once booted, download  the Solarflare drivers and install, and set a static ip of the unraid server you just specified, then connect via Go>connect to server with the unraid server ip of the 10gbe adapter. A bit of more work but it works and at rates much faster than vmxnet3 ever did.

Edited by 1812

Share this post


Link to post
On 7/3/2017 at 5:32 AM, 1812 said:

More networking update:

 

The issues with smb/afp shares read/write not working on non-host unRaid shares correctly persists on 6.2.4. In the short term, I've been loading 2 virtual nic cards into the vm, the vmxnet 3 and the e1000-82545em. When writing to the host array of the vm I use the vmxnet 3 for increased performance (now running up to over 200MB/s) and when I need to write to the non-host unRaid array, I switch to the e1000. It has now been optimized for double the smb performance based on this thread https://forum.promise.com/thread/fix-for-smb-sanlink-2/

 

The increase is attribute to disabling SMB signing. The method I used is outlined by the third poster in the thread, and is as follows:

 


Open Terminal

enter: sudo -s
enter your password
enter: echo "[default]" > /etc/nsmb.conf
enter: echo signing_required=no >> /etc/nsmb.conf
enter: exit

 

To verify the file was created:


open Terminal
enter:cat /etc/nsmb.conf


output should show:
[default]
signing_required=no

 

This will increase the e1000 speed but make it less secure. You should not use it if you are not on a private network. 

 

 

 

Once connected to an smb server, you can check if signing is disabled:


open Terminal

enter: smbutil statshares -a

If you see " SIGNING_ON = TRUE" then signing is NOT disabled. This could be because it was not disabled properly OR as I've found, connecting to other mac SMB file shares still uses signing.

 

 

 

-----edit---

Using a test server share on 6.4 rc6, transferring a file to and from a non-host unRaid share using vmxnet3 saturates the gigabit connection of the share. So, it appears much of this will be resolved with non-host shares. Note: this testing was done with disabled signing.

 

---2nd edit, August 2018---

 

I haven't done anything with this since the last post. I've since given up on a virtio-like 10gbe virtual adapter that works with osx. Instead, I'm now using a Solarflare 2 port 10gbe card, broken into 2 iommu groups (pcie_acs_override=multifunction) and xen-pciback.hide=device id  to split out and hide one port of the card. This saves me a pcie slot and uses a DAC from one port to the other. In unRaid, set  the port to a static/different ip of your regular network, then in the osx xml add the device address a the bottom (keeping the emulated e1000 for internet access.) Once booted, download  the Solarflare drivers and install, and set a static ip of the unraid server you just specified, then connect via Go>connect to server with the unraid server ip of the 10gbe adapter. A bit of more work but it works and at rates much faster than vmxnet3 ever did.

I would like to try your method here as i'm building my osx VM as my primary and about to sell my mac mini 2018 with 10gbe. I was able to get 900ish speeds with mac mini and unraid via a ASUS 10gbe card in unraid, but if that ethernet port was on its own different IP (192.168.10.123) and my mac on that same subnet eg (192.168.10.124) where my normal network would be on 192.168.1.xxx The problem is i wound not get internet access on the mac mini. So when i bridged the two ethernet ports in unraid, and just put everything back on my LAN subnet ip the mac was able to access the internet and the unraid at decent speeds 500ish. 

 

With your method will i be able to get on the internet from the VM? 

Share this post


Link to post
15 minutes ago, alfredo_2020 said:

I would like to try your method here as i'm building my osx VM as my primary and about to sell my mac mini 2018 with 10gbe. I was able to get 900ish speeds with mac mini and unraid via a ASUS 10gbe card in unraid, but if that ethernet port was on its own different IP (192.168.10.123) and my mac on that same subnet eg (192.168.10.124) where my normal network would be on 192.168.1.xxx The problem is i wound not get internet access on the mac mini. So when i bridged the two ethernet ports in unraid, and just put everything back on my LAN subnet ip the mac was able to access the internet and the unraid at decent speeds 500ish. 

 

With your method will i be able to get on the internet from the VM? 

Iirc, When I when I set it up,  as long as it’s bridged in unRaid (the 10gbe unRaid poet and the regular network poet unRaid uses for network access) it works just fine for local and internet access.

 

i have since moved on to a Mikrotik 10gbe fanless switch. It’s simpler and allows me to do more distrbution of my server bandwidth to my network vs a single gigabit line.  

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.