SMB slow write fast read speed.

    • OMV 3.x
    • Resolved

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • SMB slow write fast read speed.

      Hi. Guys

      I have encountered a strange problem on my OMV install. I have 2 HP N40L microserver with OMV 3.0.86 installed and the SMB shares have a huge speed difference when I write to it and when I read from it. The tested drive is a single drive (no RAID of any kind) formatted to EXT4.

      NAS performance tester 1.7 808.dk/?nastester
      Running warmup...
      Running a 400MB file write on q: 5 times...
      Iteration 1: 12,83 MB/sec
      Iteration 2: 12,66 MB/sec
      Iteration 3: 12,83 MB/sec
      Iteration 4: 12,80 MB/sec
      Iteration 5: 12,63 MB/sec
      -----------------------------
      Average (W): 12,75 MB/sec
      -----------------------------
      Running a 400MB file read on q: 5 times...
      Iteration 1: 117,54 MB/sec
      Iteration 2: 116,45 MB/sec
      Iteration 3: 114,45 MB/sec
      Iteration 4: 116,72 MB/sec
      Iteration 5: 107,32 MB/sec
      -----------------------------
      Average (R): 114,50 MB/sec
      -----------------------------

      Can anyone give me a clue as to what could be the problem? The OMV is completely Vanila no updated or modified kernel. The client is Windows 7 but I had the same results over Fedora too. ?(

      The post was edited 1 time, last by quarros: Grammar ().

    • Hi quarros,

      would you mind posting the HP ProLiant MicroServer Part Number so that we know what hardware we're talking about?

      Is it this one?

      cnet.com/products/hp-proliant-…onitor-none-series/specs/

      The first thing I would do is test the hdd using the simple dd command. It's not a perfect test but it will give you a good idea about the average sustained performance of each one of your drives.

      1. login as root on your OMW console
      2. find the path of your NFS share. using "df -Th" should list everything that is mounted, your NFS share should be in /export/nameofyourshare
      3. cd in your NFS share
      3. write the classic testfile by using "time dd if=/dev/zero of=testfile bs=4096 count=25000000" this will create a single 10GB file
      4. now read the testfile "time dd if=testfile of=/dev/zero bs=4096 count=25000000"
      5. convert the bytes in megabytes so that you have results that are easier to read (there are online converters that makes this quick)
      6. you can connect via SSH and run a "top" command to see if something else but dd is using the ressources during write
      7. repeat the process a few times (5) and of course do that for each drive if you have more than one

      If dd is showing you an average of 80 MB/s writes and 120 MB/s you have a baseline to test your SAMBA share. You should have around 60-75 MB/s writes and 100-110 MB/s reads with some drops from time to time but you should be close to the numbers that dd has provided.

      Use the testfile you created with dd above and copy it back and forth between your server and your clients as see what speed you have and what you can expect under the best circumstances/conditions.
    • Instead of wasting time with dd (and only testing 4K block sizes which might be heavily misleading since Windows 7 for example starts to write with 128K block sizes and up to 8 threads in parallel) I would better do this:

      Source Code

      1. sudo apt install iozone3
      2. cd $share
      3. iozone -e -I -a -s 100M -r 4k -r 128k -r 1024k -i 0 -i 1

      The most important parameter is the 2nd one which works on ext4 (but not on btrfs for example). Quoting the manual page:

      Source Code

      1. -I Use DIRECT IO if possible for all file operations. Tells the filesystem that all operations to the file are to bypass the buffer cache and go directly to disk. (not available on all platforms)
      And the other test to perform is 'network isolated'. Use iperf3 between two Linux boxes or iperf/jperf.exe when a Windows client should be tested.
    • Thank you guys for the suggestions and tips. The problem is solved now but it was different from what I was expecting. The client that I used to test the speed of SMB shares, had a network interface problem that affected both Linux and Windows the same way. I plugged in another PCI-E Network card and now it shows normal speeds. Especially thanks for the suggestion on installing iozone. I was unable to do it on my server, until It finally made me realize that on OMV the default apt sources are not including the mainline non-free packages even if it looks like it has in the sources.list just from a glance.

      Edit: Yes it is a HP ProLiant MicroServer with a Turion II Neo N40L 1.5 GHz processor