Slow cifs ubuntu 9.10

Bug #471512 reported by biebel
This bug report is a duplicate of:  Bug #810606: Slow cifs in 11.04. Edit Remove
268
This bug affects 53 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Won't Fix
Undecided
Unassigned
Declined for Lucid by Sebastien Bacher
Declined for Maverick by Sebastien Bacher

Bug Description

Binary package hint: smbfs

Ubuntu 9.10
mount.cifs version: 1.12-3.4.0

Transfer speed over samba using CIFS/SMBFS has dropped severely since updating to 9.10 (clean install).
I should be getting transfer speeds of +- 8 MiB/s, but I'm only getting +- 4 over CIFS.
As I still get the expected 8 MiB/s when copying via gnome (Places => Network) and in windows, I'm quite sure it is a CIFS problem.
For some odd reason pushing files from the server to a shared folder on my main computer used to go @ the full 10 MiB/s under 9.04. Now with 9.10 installed on the server it won't go over 2 MiB/s.

I have tried many rsize= arguments, but every value I've tried only made things worse.

Steps to reproduce:
Mount share using mount -t cifs
Copy file

ProblemType: Bug
Architecture: amd64
Date: Mon Nov 2 19:55:21 2009
DistroRelease: Ubuntu 9.10
Package: smbfs 2:3.4.0-3ubuntu5.1
ProcEnviron:
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: samba
Uname: Linux 2.6.31-14-generic x86_64
XsessionErrors:
 (gnome-settings-daemon:2070): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (nautilus:2175): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (polkit-gnome-authentication-agent-1:2203): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (gnome-panel:2174): Gdk-WARNING **: /build/buildd/gtk+2.0-2.18.3/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window
 (nautilus:3440): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed

Revision history for this message
biebel (badk666) wrote :
Chuck Short (zulcss)
affects: samba (Ubuntu) → linux (Ubuntu)
Revision history for this message
uvi (vladimir-umnov) wrote :

I have this problem too on i386, also on amd64 additionally i have slow pptp (http://ubuntuforums.org/showthread.php?t=1307485)

Revision history for this message
Alexander Gruber (freakyjoe00) wrote :

I can confirm this. With NFS i get around 100MB/sec from my NAS, but with cifs its down to around 30MB/sec. I also tried without nautilus and did a simple mount -t cifs on the terminal. It did just a little better (around 40MB/sec.).

I also gave Windows 7 a chance and it didn't have had any problems with my NAS. 100MB/sec too!

The hardware is a Marvell Gigabit card using sky2 drivers on a Macbook Pro 3.1. Local fs is ext4 mounted with relatime,barrier=0

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
eholme (earlh) wrote :

I can confirm this as well, both with i386 and amd64 Kernels. All machines where tested had different hardware and network controllers, intel / broadcom

on a 1000mb link I am getting 4.6MB/s of throughput on a CIFS share. (windows 2003 server)

Any suggestions?

Revision history for this message
tricky1 (tricky1) wrote :

This bug is still present in Lucid Beta1 server edition:
Transfer speed for nfs shares higher than 80MB/s
Transfer speed for samba share less than 20MB/s on the SAME hardware.

The text "This bug affects 4 people" is plain ridicule!!

So Ubuntu for servers still looks like a ridiculous attempt!

Peter Antoniac (pan1nx)
tags: added: verification-done
tags: added: regression-potential
Revision history for this message
Jean- (jean-helou) wrote :

Using Ubuntu 10.04 LTS as a samba cifs client against a synology ds107+ NAS
The synology ip address is registered in /etc/host on the client with the name mini

on the client
uname -a
Linux xps 2.6.32-24-generic #42-Ubuntu SMP Fri Aug 20 14:21:58 UTC 2010 x86_64 GNU/Linux

lspci
09:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5906M Fast Ethernet PCI Express (rev 02)

iperf -c mini -f m -t 120 -i 10 -p 5002
------------------------------------------------------------
Client connecting to mini, TCP port 5002
TCP window size: 0.02 MByte (default)
------------------------------------------------------------
[ 3] local 192.168.0.3 port 38552 connected with 192.168.0.10 port 5002
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 98.8 MBytes 82.9 Mbits/sec
[ 3] 10.0-20.0 sec 99.2 MBytes 83.2 Mbits/sec
[ 3] 20.0-30.0 sec 98.8 MBytes 82.9 Mbits/sec
[ 3] 30.0-40.0 sec 99.4 MBytes 83.3 Mbits/sec

FTP speeds are consistent with iperf speeds ~8MBytes/s transfer both ways
SMB/cifs speeds to the same synology nas gives 700kBytes !! download / 7.5MBytes upload
All the config files on the ubuntu client are untouched
The problem is encountered when both connecting through nautilus then using nautilus copy or through an sudo mount.cifs then using an rsync -P -v

The file used for testing speed is 1.1GBytes

Revision history for this message
James Ronald (jronald) wrote :

I'm experiencing the same cifs performance issue after upgrading our server from 7.10 i386 server to 10.04 x64 server and connecting to a ReadyNAS device.

# Backups to ReadyNAS
//192.168.0.245/backup /mnt/ReadyNAS cifs noauto,credentials=/etc/cifspw,uid=root,gid=root,dir_mode=0660 0 0

uname -a
Linux server 2.6.32-21-server #32-Ubuntu SMP Fri Apr 16 09:17:34 UTC 2010 x86_64 GNU/Linux

mount.cifs -V
mount.cifs version: 1.12-3.4.7

Revision history for this message
Jack Xu Hong (jack-xu-hong) wrote :

I can confirm the same issue as well. CIFS performance is bad, write is constantly at 2.4 mbs... I get more than 10mbs after rebooting into windows vista.

Hope this gets addressed asap, thanks.

Revision history for this message
Jack Xu Hong (jack-xu-hong) wrote :

BTW, I'm running Lucid here... quite surprised that the issue was reported for 9.10, but still hasn't got much attention yet...

Revision history for this message
uvi (vladimir-umnov) wrote :

This problem still present in 10.10.

I discovered cifs module parameter
parm: CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048 (int)
But really it defaults to 4096.

I created /etc/modprobe.d/cifs.conf with
options cifs CIFSMaxBufSize=130048

Also I used cifs mount options rsize=130048,wsize=130048.

After setting rsize to max 130048, performance increases!

Revision history for this message
Jensen Somers (jsomers) wrote :

I am also experiencing this issue.
However, when I use nautilus to browse to my network share using smb://host/share I am capable of gigabit speeds.

Revision history for this message
Andrey Nauman (andrey-nauman) wrote :

I can confirm.
Nautilus speed ~6MB/sec,
cifs mount (via fstab) speed is limited to 2MB/sec.

Same remote share.
100Mbit/s wired simple home network.

Why is that? Please fix!!

Same behavior reported here #504737
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/504737

Revision history for this message
Andrey Nauman (andrey-nauman) wrote :

Figured out experimentally. It might be rather Nautilus issue than cifs mount's.

If I copy file to the mounted share (via cifs, fstab) using Nautilus, I got capped 2MB/sec upload. BUT
if do the copy via command line (terminal), I got nominal 7.5MB/sec !

Same file, same share, 3+ times faster.

Revision history for this message
mdalacu (mdalacu) wrote :

Maverick still has this bug...:-(
Copy : -Nautilus 9.1 MB/s
           -mc 14.0 MB/s
           -cp 41.3 MB/s !!!?!!
Crazy, isn't it ?

Revision history for this message
Ubuntu Uefi User (ubuntuuefiuser) wrote :

Gigabit LAN

Cifs mount 9 MB/s in linux from Windows 7
-o ro,credentials=filename

Windows 7 from windows explorer to samba share on linux box 60 MB/s
with guest acount on linux samba share
dns proxy = yes

Revision history for this message
Lars E. (larse) wrote :

same issue on my ubuntu 10.04 installation: cifs read/write 5MB/sec
I tried to installed the Kernel Version 2.6.37 from here: http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.37-natty/

With this Kernel I got 52MB/sec via cifs mount...!
So it seems to be a cifs bug in Kernel versions < 2.6.37
cifs version in this kernel is 1.68.

Maybe someone can confirm this?

Revision history for this message
MatthiasA (themaze) wrote :

I installed 2.6.37 on Ubuntu 10.10.
It did not increase the performance.

On my Dell M4400 the Speed from Ubuntu 10.10 x64 to my Ubuntu Server 9.10 is 30mbs with gvfs and about 11mbs with cifs.
On the same machine the transfer Speed from Windows 7 x64 to the same Ubuntu Server is about 100mbs.

This really sucks!

Revision history for this message
DanielW (dw-danielwinter) wrote :

Ok, I am not an Ubuntu user, but suffered from the same problem with archlinux. And I have found a solution (at least for me, hope it works for you too).

Short my problem:

Setup: Synology Diskstation 209 NAS connected over 1 Gigabit network to my pc

Read performance using smbclient: about 55 Megabyte/s
Read performance using kde-kio-smb: about 12 Megabyte/s
Read performance using cifs: about 5-6 Megabyte/s !

(For reference: with Windows 7 I get about 64 mb/s, with ftp it is about 70 mb/s)

I looked into it with wireshark to find out, that cifs reads in 4096 bytes blocks, while smbclient uses bigger blocks.

Setting rsize has not effect on it (always 4096 byte blocks).

Well, to make it short, here what changed it:

1. Setting CIFSMaxBufSize=130048 as kernel module option for the cifs module
 (don't know about Ubuntu but i believe a line "options cifs CIFSMaxBufSize=130048" in /etc/modprobe.d/modprobe.conf should do it)

2. Use direct and rsize=130048 as mount options

Without direct as mount option, it seems to ignore the value set for rsize. (

With these changes it get about 62 Megabyte/second with cifs :-)

Here a part from the cifs readme about the "direct" setting:

"Do not do inode data caching on files opened on this mount.
  This precludes mmapping files on this mount. In some cases
  with fast networks and little or no caching benefits on the
  client (e.g. when the application is doing large sequential
  reads bigger than page size without rereading the same data)
  this can provide better performance than the default
  behavior which caches reads (readahead) and writes
  (writebehind) through the local Linux client pagecache
  if oplock (caching token) is granted and held. Note that
  direct allows write operations larger than page size
  to be sent to the server."

I hope that works for you

Daniel

Revision history for this message
Lars E. (larse) wrote :

I tested this workaround too but it does not solve the problem on my pc.
Could you please post your fstab config?

Revision history for this message
kris (message4kris) wrote :

Same problem here on 10.04. Max. speed is 1MB/s on wireless.

Revision history for this message
Dimon8211 (dim82ser) wrote :

Ubuntu 10.10
Have 3-4 MB/s with cifs, 5-6MB/s via gvfs and 11-12MB via NFS on my wireless 802.11n network.
Tried Ubuntu 11.04, speed is unstable but no more then 4-5MB
Windows 7 (on the same laptop) download from the server on full 11-12MB

tags: removed: regression-potential
Brad Figg (brad-figg)
tags: added: b73a1py79
Revision history for this message
Anderson Supriano (ansupriano) wrote :

Same for me. Poor cifs speed performance on Ubuntu 11.04.

Revision history for this message
Ubuntu Uefi User (ubuntuuefiuser) wrote :

Problem still persists in Ubuntu Server 11.04 amd64

Gigabit LAN:
from ubuntu:
mount.cifs //windows7/share /ubuntuserver/share -o ro,credentials=filename --> 10 MBytes/sec

from windows 7:
windows 7 explorer --> //ubuntuserver/share --> 55 MBytes/sec

Problem is now reported on 4 sequential releases of Ubuntu, time for it to get fixed.

Revision history for this message
Ubuntu Uefi User (ubuntuuefiuser) wrote :

Many people on the internet suggest it is a problem in cifs.ko and the maximum buffer size. Is there a way to change the max value of CIFS buffer in the cifs.ko without recompiling? Is there an alternative to mount.cifs for samba?

Revision history for this message
Ubuntu Uefi User (ubuntuuefiuser) wrote :

Version of Cifs-utils package in ubuntu 11.04: 2:4.5-2
Latest version of Cifs-utils package is: 2:4.9-1

Tried newest version 4.9 of mount.cifs, no improvement.

Revision history for this message
zzarko (zzarko-gmail) wrote :

I have two machines at home. The speed with cifs before the upgrade from 10.10 to 11.04 was ~8MB/s (100Mbit card on the older server machine). After upgrading the server machine, the speed remained the same. But, after upgrading client machine, the speed dropped to about 500KB/s, which is unusabe. If I mount from Nautilus with gvfs, I get ~5MB/s.

Revision history for this message
dagurasu (dagurasu15) wrote :

I cannot confirm the change from 9.10 , in fact I'm using fedora, but definitely cifs is presently far worse than ftp of iperf or nfs. directio and cifsmaxbufsize do fix it for me, but then I'm stuck with directio, and not caching is not acceptable for me either.

Revision history for this message
Bohdan (bohdan-linda) wrote :

I can confirm this bug in 11.04:

$ iperf -c 192.168.11.1 -f MBytes
[ 3] 0.0-10.0 sec 695 MBytes 69.5 MBytes/sec
[ 3] 0.0-10.0 sec 683 MBytes 68.3 MBytes/sec
[ 3] 0.0-10.0 sec 693 MBytes 69.3 MBytes/sec

smbclient:
getting file \test of size 307200000 as test (28702.6 KiloBytes/sec) (average 28702.6 KiloBytes/sec)

mount via cifs:
307200000 bytes (307 MB) copied, 61.1143 s, 5.0 MB/s

games with CIFSMaxBufSize=130048 and rsize did not help

Revision history for this message
Nodens (lordnodens) wrote :

Same here. Ubuntu 11.04 x64. Games with CIFSMaxBufSize=130048 and directio / rsize=130048 did not help.

Revision history for this message
Nodens (lordnodens) wrote :

OK, a quick update from my previous post. Actually games with CIFSMaxBufSize=130048 and directio / rsize=130048 did help in some cases. For example if I try to extract a MKV with MakeMKV the speed rises to 50MB/sec. But if I try to copy a file from Nautilus speed remains at 8-10 MB/sec. That's strange.

Revision history for this message
Nodens (lordnodens) wrote :

These are my final results. Using the options mentioned above, I'm getting speeds up to 60MB/sec outside Nautilus. Inside Nautilus the problem remains.

Revision history for this message
Brad Figg (brad-figg) wrote : Unsupported series, setting status to "Won't Fix".

This bug was filed against a series that is no longer supported and so is being marked as Won't Fix. If this issue still exists in a supported series, please file a new bug.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
AndreK (andre-k) wrote :

file new bug ? 'it's been confirmed all the way to 11.04 - you shoud edit this one, so valuable information is there, instead of starting from scratch ?

Revision history for this message
zzarko (zzarko-gmail) wrote :

OK, I submitted a new bug (https://bugs.launchpad.net/ubuntu/+source/cifs-utils/+bug/810606). It would be nice if all of you, still affected by it, could add your observations to it.

Revision history for this message
Brad Figg (brad-figg) wrote :

This bug was filed against a series that is no longer supported and so is being marked as Won't Fix. If this issue still exists in a supported series, please file a new bug.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.