Slow write performance on CIFS share (Nemo)

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
rt11
Level 1
Level 1
Posts: 11
Joined: Tue Mar 22, 2016 12:03 pm

Slow write performance on CIFS share (Nemo)

Post by rt11 »

I have a FreeNAS server providing a CIFS share to host large files. It's connected via Gbit ethernet to my PC running LM17.3, and the share is mounted in fstab like so:

Code: Select all

//192.168.1.50/Stuff /media/Stuff cifs credentials=/home/bb/.smbcredentials,iocharset=utf8,defaults,vers=3.0,uid=1000,gid=1000 0 0
Running Windows 7 on the same PC I'm able to read and write to the shares at around 75 MB/s. And I get even better results from Linux:

Code: Select all

bb@BBM /media/Stuff/Temp $ dd if=/dev/zero of=test bs=1G count=1
1+0 records in
1+0 records out
1073741824 bytes (1,1 GB) copied, 9,93112 s, 108 MB/s
bb@BBM /media/Stuff/Temp $ dd of=/dev/null if=test bs=1G count=1
1+0 records in
1+0 records out
1073741824 bytes (1,1 GB) copied, 9,84751 s, 109 MB/s
Which is fabulous. The problem is copying files to the share with Nemo is quite slow and never exceeds about 12 MB/s. I've tried other file managers (Krusader, Thunar, GNOME Commander) and they all behave the same. My guess is they all use an API for copying files which sets a tiny default buffer size or something, which I can simulate for similar results:

Code: Select all

bb@BBM /media/Stuff/Temp $ dd if=/dev/zero of=test bs=4K count=10000
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 3,25064 s, 12,6 MB/s
Another interesting thing to note is that if I copy multiple files in Nemo at the same time, the total throughput seems to just sum up, up to around 90 MB/s.

Also oddly enough, read performance seems much less affected by block size:

Code: Select all

bb@BBM /media/Stuff/Temp $ dd of=/dev/null if=test bs=4K count=10000
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 0,389288 s, 105 MB/s
And accordingly, copying files from the share using Nemo I get much higher speeds, too; around 80 MB/s. Would love to know why it's not reaching the full 100+ MB/s, but maybe it's just not able to write asynchronously to my SSD (which does around 300 MB/s). I could live with 80, though.

I've had a similar problem in Directory Opus on Windows, but DOpus presents the copy buffer size as an option and increasing that solves the problem. I can't find any similar option for Nemo. Or should I be looking at default settings in the mount options?

User avatar
amethyst_igor
Level 3
Level 3
Posts: 143
Joined: Thu Feb 25, 2016 9:15 pm
Location: State of Euphoria
Contact:

Re: Slow write performance on CIFS share (Nemo)

Post by amethyst_igor »

rt11 wrote:I have a FreeNAS server providing a CIFS share to host large files. It's connected via Gbit ethernet to my PC running LM17.3, and the share is mounted in fstab like so:

Code: Select all

//192.168.1.50/Stuff /media/Stuff cifs credentials=/home/bb/.smbcredentials,iocharset=utf8,defaults,vers=3.0,uid=1000,gid=1000 0 0
I don't have this problem with Nemo. My Linux Mint 17.3 is fully updated, and I am running the latest kernel available from the Update Manager. The fstab entry for my CIFS shares is a little different. You are welcome to plug and play with it. At least you can rule out fstab if it doesn't help you. Of course, you will need to modify things like domain, ip address, and the path.

Code: Select all

//192.168.1.4/infosec		/media/infosec  cifs  guest,uid=1000,iocharset=utf8,domain=greaterglory,file_mode=0777,dir_mode=0777,noperm  0  0
I run both Windows 10 and Linux Mint 18 in dual boot with two SSDs and have other rigs running various versions of Linux. My blog.

Post Reply

Return to “Other networking topics”