Ubuntu – Slow gvfs SMB Performance

cifsgvfssambasmb

if I use/acces a SMB Share using Nautilus or manually using "gvfs-mount smb://SERVER-IP/Share" I get a poor Performance, only about 7 mb/s on my 100 Mbit Network.

If I access the same Share on Windows I get Fullspeed 100 Mbit (About 11 mb/s), also if I mount using sudo mount -t cifs //SERVER-IP/Share /mountpount which uses cifs instead of gvfs I get fullspeed too, so can anyone tell me if there is a Performance Problem/Bug in gvfs or how gvfs is using SMB Shares differerently ?

I tested read Performance (From my Network SMB Share) with multiples files and always, the cifs-Version is fullspeed and the GVFS-Version has some mb/s less.

After some research I found some tips to optimize the SMB Settings of my Ubuntu Installation and some network tuning tips, but as the CIFS mounted share gets the full Network Speed I don't believe its that kind of problem.

Best Answer

Same here 12MB/s vs 5MB/s. I think the main difference is the buffer size. By CIFS I use 1MB buffer size, by GVFS you cannot set the buffer size as far as I know. I checked the code https://wiki.gnome.org/Projects/gvfs, but I am not a C expert. According to it the max is 64KB buffer size the GVFS SMB implementation can handle. By the copy from SMB to the same SMB drive the buffer size was given manually and it was only 4KB. By the other parts it was injected from an upper abstraction level I did not check. It is a big lib. I suspect that GVFS uses only 4KB buffer size by default. I tried a CIFS mount with 64KB buffer size and it had the same speed as with the 1MB buffer size. I wait for the Gnome guys to confirm this and/or fix it somehow. Btw. this is a really old bug, at least I read about it in many forums.