Open Media Vault SMB performance quick win

So I’ve been using Open Media Vault for the last couple of weeks after re-arranging our small network, for storage purposes. And weirdly, I had some SMB performance issues within OMV.

Let me explain: so all our devices are Gigabit within the network, cabled with Cat 6e (actually unnecessary as the maximum length is about 20 meters but whatever) but we were seeing constant speeds of 80-90 MB/s.

Granted, 90 MB/s is not bad, it’s not the maximum the devices can reach. I mean, Gigabit means about 125 MB/s maximum theoretical speeds. Of course we cannot hope for such speeds, but I’d aim for a clear 105-110 MB/s. Because why not? And the additional speed would speed up large transfers that we actually do quite often to and from the NAS box that is running OMV.

After dabbling with any potential issues, even if our NAS is running from a Kingston 64GB USB drive, and has 1 250 GB SSD and a new 4TB HDD, it should theoretically reach at least 100 MB/s. (if you want to read up about the difference between MB/s and Mb/s read here)

I must say that these settings can work on SMB even if you’re not working with OMV and you are on Ubuntu or whatever. You’ll just have to edit the Samba configuration file instead of pasting something into Open Media Vault’s admin panel.

How we acces files on the NAS

By using SMB withing Open Media Vault, we just use the normal file explorer within Windows 10. And of course, we have some Docker containers for Plex and other stuff.

Triple checking the install and the needed plug-ins for OMV (especially the flash plugin from omv-estras) there could only be one culprit for the speeds: SMB. Everything else points as working ok.

Tuning SMB within OMV SMB extra options for a quick speed gain

The solution was annoyingly easy:

  1. Ener the OMV admin panel
  2. Go to Services -> SMB/CIFS
  3. Find the ‘Extra Options’ at the bottom
  4. Simply place these extra configurations:
socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536
read raw = yes
write raw = yes
max xmit = 65535
getwd cache = yes

Save, apply configuration (the top notification) and DONE!

The results? Constant >110 MB/s topping at 114 MB/s on large files.

So in just 2 minutes I gained about 20 MB/s extra speed when transferring large files. Mind you, the speed for transferring many small files at once is just about the same. It seems to be just a little better. But that was not my issue over here.

But what do does settings mean?

socket options = TCP_NODELAY

In Samba 2.0 this setting is the default. But it wont hurt to make sure it’s there. It basically tells the server to send as many packets as necessary to keep the delay low.

SO_SNDBUF and the SO_RCVBUF settings:

Basically increasing the send and receive buffers to something higher than present in the operating system. It usually helps but do note that at some point you reach diminishing returns. Try my values, maybe they work for you too!

Raw read and write settings:

These allow Samba to use large reads & writes on the network – up to 64KB in a single request. The previous settings are mandatory as far as I know for this to work.

max xmit setting:

In Samba this is basically related to the MTU and window size. This sets the largest block of data that your Samba will try to write at any one time.

getwd cache setting:

This one just caches the path to the current directory avoiding directory listing waits. Pretty useful to have even if id doesn’t really have anything to do with transfer speeds.

That’s it with SMB and OMV!

So basically that’s about it!

A quick win in performance when using Samba shares and Open Media Vault. As quick as it gets – copy/paste something in one field.

If you’re struggling with low performance on SMB give this a try. It helped me a lot.

Did you see my article about undervolting a desktop AMD Ryzen CPU? Give it a shot!

Leave a comment

9 + five =