1

I switched from NFS to SMB/CIFS since the permission system of NFS annoyed me. I never had performance issues while using NFS (1GB Lan) and had about 70-90 MB/s write and read speed while writing to my synology NAS.

I test my write performance with dd (write 500MB to my SMB mount):

[user@archStd01 Transfer]$ dd if=/dev/zero of=/home/user/NAS/Transfer/test bs=512 count=1000000
1000000+0 Datensätze ein
1000000+0 Datensätze aus
512000000 Bytes (512 MB, 488 MiB) kopiert, 675.388 s, 758 kB/s

as you can see it performed very poor with an average of 758 kB/s

My fstab:

//192.168.1.100/Transfer /home/user/NAS/Transfer cifs credentials=/home/user/.smbcredentials,uid=1000,gid=1000,vers=3.0,rw 0 0

At the moment I go trough a few SMB manuals but I didnt find much about performance problems. Does anyone know where to start?

//edit performance test with dd with 10MB blocksize

[user@archStd01 Transfer]$ dd if=/dev/zero of=/home/user/NAS/Transfer/test bs=10M count=500
500+0 Datensätze ein
500+0 Datensätze aus
5242880000 Bytes (5.2 GB, 4.9 GiB) kopiert, 406.979 s, 12.9 MB/s

Its a lot better, but still far away from fast.

  • 1
    Try to test with a bigger block size and check if the performance stays the same. – Thomas Sep 3 '17 at 13:25
  • 1
    Try at least with (significantly) larger bs if you insist on using dd as your "benchmark". – sebasth Sep 3 '17 at 13:25
  • ok, I test with a bs of 10MB and update my original post with the results. Thanks for the hint. – rockZ Sep 3 '17 at 13:29
  • when you type mount, what does it say about the negotiated version protocol? – Rui F Ribeiro Sep 3 '17 at 14:19
  • 1
    @RuiFRibeiro //192.168.1.100/Transfer on /home/user/NAS/Transfer type cifs (rw,relatime,vers=3.0,cache=strict,username=admin,domain=ARBEITSGRUPPE,uid=1000,forceuid,gid=1000,forcegid,addr=192.168.1.100,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1) it says: vers=3.0 ... should be good. – rockZ Sep 3 '17 at 14:24
0

I was just puzzling over a similar sounding CIFS performance problem. Transfers to and from a Windows client and our Samba server had good speed, but downloads from the server to two Ubuntu machines (running bionic) were slow. Using SCP to transfer instead of CIFS had no speed problems, so the problem wasn't the underlying network. Following the suggestions on this ubuntuforums thread, I tried adding cache=loose to my Ubuntu client's cifs mount configuration in /etc/fstab, and speeds in both directions are now about what I expect (about x7-10 improvement in my case).

//server/share /media/localMountPoint cifs cache=loose,rw,...

However, as the poster cautions over on the ubuntuforums thread, according to the mount.cifs man page:

cache=loose can cause data corruption when multiple readers and writers are working on the same files.

I happen to be on a home network with very few users, so this is acceptable for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.