cifs.ko should default to CIFSMaxBufSize=65535

Bug #1236607 reported by Will Rouesnel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Won't Fix
Undecided
Tim Gardner
Saucy
Won't Fix
Undecided
Tim Gardner

Bug Description

Win 7 and other clients can handle a CIFS max buffer size of 64k, and default to this value when talking to Windows or Linux SMB servers. The practical effect of this is drag-drop file operations in Windows can run at near gigabit speeds (80-90mb/s over a gigabit LAN) even when talking to a Linux Samba server.

The 'cifs' filesystem on the other hand struggles to achieve this by default because it's buffer size is constrained to just 16k. Boosting the buffer size with a modprobe.d options file like so:

options cifs CIFSMaxBufSize=65536

or even:

options cifs CIFSMaxBufSize=130048

produces a speed up in file operations (as measured with rsync -W between two mountpoints, or dd | pv | dd) which is on par with the speed achieved by Windows - taking cifs from averaging 40-50 mb/s on my machine, to the 80-90 mb/s the same machine running Windows (and talking to a Linux samba server) can achieve.

There doesn't seem to be any real downside to this in the common desktop use case in the modern age (memory is not a constraint), so shipping a modprobe.d cifs.conf file seems like a sensible way to close the perceived gap in user experience.
---
ApportVersion: 2.9.2-0ubuntu8.3
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: will 3215 F.... pulseaudio
 /dev/snd/controlC2: will 3215 F.... pulseaudio
 /dev/snd/controlC0: will 3215 F.... pulseaudio
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
DistroRelease: LinuxMint 15
HibernationDevice: RESUME=UUID=0f40c3a5-e01e-4300-9363-384d60c1f893
InstallationDate: Installed on 2012-07-12 (452 days ago)
InstallationMedia: Linux Mint 13 "Maya" - Release amd64 (20120520)
IwConfig:
 eth0 no wireless extensions.

 lo no wireless extensions.
MachineType: Gigabyte Technology Co., Ltd. P67A-UD3P-B3
MarkForUpload: True
NonfreeKernelModules: zfs zunicode zavl zcommon znvpair
Package: linux 3.8.0.31.49 [origin: Ubuntu]
PackageArchitecture: amd64
ProcFB: 0 radeondrmfb
ProcKernelCmdLine: BOOT_IMAGE=/ROOT/mint-13@/boot/vmlinuz-3.8.0-31-generic root=/dev/sdg3 ro loglevel=7 boot=zfs rpool=ssdpool
ProcVersionSignature: Ubuntu 3.8.0-31.46-generic 3.8.13.8
RelatedPackageVersions:
 linux-restricted-modules-3.8.0-31-generic N/A
 linux-backports-modules-3.8.0-31-generic N/A
 linux-firmware 1.106
RfKill:
 3: hci0: Bluetooth
  Soft blocked: no
  Hard blocked: no
Tags: third-party-packages olivia
Uname: Linux 3.8.0-31-generic x86_64
UnreportableReason: This is not an official LinuxMint package. Please remove any third party package and try again.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom debian-tor dialout dip libvirtd lpadmin plugdev sambashare sudo vboxusers wireshark
dmi.bios.date: 03/21/2012
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F9
dmi.board.name: P67A-UD3P-B3
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrF9:bd03/21/2012:svnGigabyteTechnologyCo.,Ltd.:pnP67A-UD3P-B3:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnP67A-UD3P-B3:rvr:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: P67A-UD3P-B3
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

Revision history for this message
Will Rouesnel (w-rouesnel) wrote :
Brad Figg (brad-figg)
affects: linux-meta (Ubuntu) → linux (Ubuntu)
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1236607

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

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

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Will Rouesnel (w-rouesnel) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected olivia third-party-packages
description: updated
Revision history for this message
Will Rouesnel (w-rouesnel) wrote : BootDmesg.txt

apport information

Revision history for this message
Will Rouesnel (w-rouesnel) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Will Rouesnel (w-rouesnel) wrote : Dependencies.txt

apport information

Revision history for this message
Will Rouesnel (w-rouesnel) wrote : Lspci.txt

apport information

Revision history for this message
Will Rouesnel (w-rouesnel) wrote : Lsusb.txt

apport information

Revision history for this message
Will Rouesnel (w-rouesnel) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Will Rouesnel (w-rouesnel) wrote : ProcEnviron.txt

apport information

Revision history for this message
Will Rouesnel (w-rouesnel) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Will Rouesnel (w-rouesnel) wrote : ProcModules.txt

apport information

Revision history for this message
Will Rouesnel (w-rouesnel) wrote : PulseList.txt

apport information

Revision history for this message
Will Rouesnel (w-rouesnel) wrote : UdevDb.txt

apport information

Revision history for this message
Will Rouesnel (w-rouesnel) wrote : UdevLog.txt

apport information

Revision history for this message
Will Rouesnel (w-rouesnel) wrote : WifiSyslog.txt

apport information

Revision history for this message
Tim Gardner (timg-tpi) wrote :

Have you experimented with any values between 16K and 127K ?

Changed in linux (Ubuntu Saucy):
assignee: nobody → Tim Gardner (timg-tpi)
status: Incomplete → In Progress
Revision history for this message
Will Rouesnel (w-rouesnel) wrote :

Yes, setting CIFSMaxBufSize=65535 produced a jump from ~40-50mb/s to 70-80mb/s when doing dd or rsync -W copies to a CIFS mounted share. Setting it to the maximum worked fine too, but I've only tested with Samba on Linux - I don't know what the performance implication would be with a Windows client.

GVFS defaults the window size to 65535 (well, 65534 due to an issue they found there somehow) though it has other performance issues but it may explain reports of CIFS mounts being a lot slower then GVFS for some people.

Revision history for this message
Tim Gardner (timg-tpi) wrote :

Given that this is a module parameter I'm inclined to leave it as upstream has it set. There may be side effects of which we are not aware.

Changed in linux (Ubuntu):
status: In Progress → Won't Fix
Changed in linux (Ubuntu Saucy):
status: In Progress → Won't Fix
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.