I have Fedora 23 with Gnome 3 and Nautilus 3.18.5-1.fc23. I have troubles with SMB speeds by using Nautilus. It is about 4.4MB/s, while by any other methods (e.g. smbclient from terminal) I got 11MB/s from the Samba server. Is there a way to debug this. I read on some forums that maybe Nautilus does not set rsize
properly by mounting the drive. I am not sure about that. I did not find the mounted drive with lsblk
. According to some forums the network drives are mounted to /run
into a gvfs
folder. This I can confirm, I got the following path:
/run/user/1000/gvfs/smb-share:server=odroid-server,share=asmedia-hdd
By mount | grep gvfs
I got the following:
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
I did not find a way to check this rsize
thing. It probably would not solve my problem, I am not sure. Another thing I wanted to turn off by the drive is relatime. At least it is set to noatime on the server.
Is there a way to do this in Nautilus config (I know it is possible in fstab)? Is there another way to debug this slow SMB speed problem somehow?
Best Answer
Accoding to a forum the problem is with gvfs and cifs works much better. I am not familiar with these terms, but I can confirm that. By mounting the drive manually:
I can achieve 10MB/s in Nautilus. The only problem that I don't have network discovery and I cannot umount the drive from nautilus. So I think this is not a real solution.
Is there anyway to force the Nautilus to use cifs instead of gvfs?
next
I found a config file, which appears to be very relevant:
/usr/share/gvfs/mounts/smb.mount
I guess gvfs is not a partition type, it is something that uses cifs too. So I guess I can somehow set the cifs buffer size here. I was not able to find out yet how to do that.
According to wiki the gvfs is a virtual filesystem, so it can be on top of cifs, so I was right.
next
I found this answer: https://unix.stackexchange.com/a/44318/126217 by trying to gvfs mount from terminal. According to it, the
export $(dbus-launch)
is important before using any gvfs command. I confirm that, I was not able to use gvfs commands from terminal, and I got only vague error messages about the problem.I was able to mount the drive manually with gvfs:
I was able to list the mounted drives
There is still not much info about the configuration of these mounted drives. Nautilus did not show the mounted drive. This is interesting, becauase when I used the mount command in terminal the mounted drive showed up in nautilus.
I found the mount point here:
I was able to cp from the gvfs mounted drive an mkv file and I used
to measure the transfer speed, it was about 4.3MB/s. I used the same technique by measuring cp speed when I used the smbclient command. So I was able to reproduce what Nautilus does in the background. Now the only thing I need is adding an option to change the cifs buffer size, if that is possible.
conclusion:
I ended up adding the following to the fstab:
and used
because nautilus wrote, that only root can mount the drive instead of showing the root password prompt.
I don't like this solution, because nautilus does not discover the network drives this way. Another problem that I had to give permissions to all user to mount this drive and I had to give the smb password, because I did not have prompt for that either. The download speeds were okay, and I got the same by the upload as well. By the upload I got false speed and file size reports from nautilus, it writes 120MB/s at the beginning, which constantly decreases. By checking the file size with gvfs mounted drive I managed to get info about the real speeds. It was about 10MB/s.
I try to solve this with gvfs. If I manage to do so, I'll post an answer, but until that I'll use this cifs mounted workaround.
next ~ 2016
Added a bug report here: https://bugzilla.gnome.org/show_bug.cgi?id=762384 maybe they have an answer.
next ~ 2017
According to Gnome devs this is a Samba bug. They might write a patch, but there is a no guarantee. The Samba devs did not care about it in the past 3 years (2014-17), I am not even sure that project is maintained.
note:
I measured this 10MB/s through wifi connection. I did some measurements through ethernet with the same Odroid XU4 when I tried to debug this. (The GVFS uses libsmbclient, so it does something similar as calling
smbget
.)copy with nautilus (18-19MB/s)
copy with smbget default block size (23-24MB/s)
copy with smbget 16K (1-64K) block size (38-57MB/s)
copy with CIFS mount (70-90MB/s)
So an evident bottleneck is the too small block size here in GVFS, but the speed tops around 1k block size and it reaches at most 63% of the CIFS speed, so there must be another unidentified bottleneck in the smb lib.