Slow btrfs read and write over smb

I noticed when attempting to read files over smb to my btrfs share that the performance was nowhere as fast as expected I began diagnosing the issue and tested the network connection using iperf, averaging about 600 - 700mbs over lan between the client and rockstor. I used a simple dd read and write test and found that the btrfs raid was capped at around 6mb/s write and 4mb/s write on the local machine. I attempted the test again with noatime and thread_pool at 6 with similar results. Compression is not enabled.

All disks pass smart check.

dd results

[root@ecnetraid ~]# time dd if=/dev/zero of=/mnt2/Content2016/test.data bs=4K count=1024000
1024000+0 records in
1024000+0 records out
4194304000 bytes (4.2 GB) copied, 16.2449 s, 258 MB/s

real    0m16.250s
user    0m0.238s
sys    0m7.266s

Client - 2013 Macbook Pro Retina

Server

  • 6 core amd
  • 4gb ram
  • 120gb SSD
  • 6 7200 rpm drives in raid 5

i must say i am impressed that u can utilize an 10Gigabit connection with 260MByte/s this way…

no. this result CANT be true. u writing to cache. u have to run dd with sync option! also use bigger chunks bigger than the nic speed, like 150M. i use something like 1G in general.

ITs a 1gb lan connection. When the storm is over I can rerun dd to get a result. The fact is that over SMB I am getting nowhere near the read or write speed.

Here is the raw write performance

[root@ecnetraid etc]# time dd if=/dev/zero of=/mnt2/Content2016/test.data bs=4K count=1024000; sync
1024000+0 records in
1024000+0 records out
4194304000 bytes (4.2 GB) copied, 15.7782 s, 266 MB/s

real    0m17.174s
user    0m0.201s
sys    0m7.362s

Here is the smb performance

time dd if=/dev/zero of=/Volumes/Content2016/test3.data bs=4k count=1024000; sync
1024000+0 records in
1024000+0 records out
4194304000 bytes transferred in 100.464125 secs (41749271 bytes/sec)

real    1m41.120s
user    0m0.318s
sys    0m14.466s

Can you try the test again over AFP and NFS shares, please?

Yes I can, I will try when I get back to my desk. Last time I tried AFP though it wasn’t working.

i dont know how smb reacts on many small files but i guess the 40MB/s that you are reaching are ok.
give it a try with a large file transfer.

So it appears AFP is non-functional on the version of rockstor I have running. 4.12.4-1.el7.elrepo.x86_64. I am about to test and see how NFS performs

Same command afp is worse

time dd if=/dev/zero of=./test3.data bs=4k count=1024000; sync
1024000+0 records in
1024000+0 records out
4194304000 bytes transferred in 254.706766 secs (16467187 bytes/sec)

real    4m15.307s
user    0m0.215s
sys    0m15.944s

Just checking: are all nodes connected to the network only with cables?

Yes, connected solely via cat 6

Yes connected solely via cat6

I’m experiencing slow speed over SMB as well. I have a 6 disk RAID 5 array and I normally can get over 100MBytes/s write speed when copying files from my PC to the fileserver. Now I’m getting 10-15MBytes/s!
Please advise what to do?

what’s going on with the new version of Samba? is there any progress on this?

Thanks