Slow CIFS navigation

Bug #571235 reported by Se6
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

On Karmic, with 2.6.31-20, I have noticed an important decrease of performances while navigating CIFS shares (with mount.cifs) on a Windows 2003 server. (Compared to a older installation with 2.6.27-8). Navigating means here either using midnight commander, ls -l (with ls unaliased first...), rsync, etc..

The kind of performance degradation I am talking about is in the order of times ten or so. An rsync which takes less that 2 minutes on old hardware, now takes over 15 minutes on newer hardware!

Doing a bit of investigation with tcpdump, we can see a lot QUERY_PATH_INFO requests happening which are not necessary as all the information is already returned by FIND_FIRST2 requests. A trivial example will illustrate it. Lets have a directory with 3 files inside.

ls -l with my old machine, it gives:
Protocol Info
SMB Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: \Temp
SMB Trans2 Response, QUERY_PATH_INFO
SMB Trans2 Request, FIND_FIRST2, Pattern: \Temp\*
SMB Trans2 Response, FIND_FIRST2, Files: . .. file1 file2 file3

With the new one, it gives:
Protocol Info
SMB Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: \Temp
SMB Trans2 Response, QUERY_PATH_INFO
SMB Trans2 Request, FIND_FIRST2, Pattern: \Temp\*
SMB Trans2 Response, FIND_FIRST2, Files: . .. file1 file2 file3
SMB Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path:\Temp\file1
SMB Trans2 Response, QUERY_PATH_INFO
SMB Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path:\Temp\file2
SMB Trans2 Response, QUERY_PATH_INFO
SMB Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path:\Temp\file3
SMB Trans2 Response, QUERY_PATH_INFO

So for every file in the directory, as returned by the FIRST_FIND2 response, it does a QUERY_PATH_INFO, which does not bring any new information, all the attributes were already returned by FIRST_FIND2.

Looking around in linux-cifs-client mailing list and contacting a few developers, it is believed this problem is now fixed in 2.6.31.13, commit f12f98dba6ea1517cd7fbb912208893b9c014c15. (cifs: fix length calculation for converted unicode readdir names)
Will 2.6.31.13 make it to Karmic?

Thanks,

Seb.
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.21.
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC268 Analog [ALC268 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC268 Analog [ALC268 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: seb 1416 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xd6700000 irq 22'
   Mixer name : 'Realtek ALC268'
   Components : 'HDA:10ec0268,1179ff66,00100003 HDA:11c11040,11790001,00100200'
   Controls : 13
   Simple ctrls : 8
DistroRelease: Ubuntu 10.04
EcryptfsInUse: Yes
HibernationDevice: RESUME=UUID=aa796e4d-a2f7-4bbe-843b-770d3f422913
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
MachineType: TOSHIBA Satellite L300
Package: linux (not installed)
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-22-generic root=UUID=fdb933e6-993d-4a2e-b43a-99da4b76bd3b ro quiet splash acpi_osi=Linux
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-22.36-generic 2.6.32.11+drm33.2
Regression: Yes
RelatedPackageVersions: linux-firmware 1.34
Reproducible: Yes
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
Tags: lucid kconfig regression-release needs-upstream-testing
Uname: Linux 2.6.32-22-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 06/04/2009
dmi.bios.vendor: INSYDE
dmi.bios.version: 1.90
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: Portable PC
dmi.board.vendor: TOSHIBA
dmi.board.version: Base Board Version
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: Chassis Manufacturer
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnINSYDE:bvr1.90:bd06/04/2009:svnTOSHIBA:pnSatelliteL300:pvrPSLB8E-15E00PGE:rvnTOSHIBA:rnPortablePC:rvrBaseBoardVersion:cvnChassisManufacturer:ct10:cvrChassisVersion:
dmi.product.name: Satellite L300
dmi.product.version: PSLB8E-15E00PGE
dmi.sys.vendor: TOSHIBA

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

Hi Se6,

Please be sure to confirm this issue exists with the latest development release of Ubuntu. ISO CD images are available from http://cdimage.ubuntu.com/releases/ . If the issue remains, please run the following command from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux 571235

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

    [This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-kernel-logs
tags: added: needs-upstream-testing
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Incomplete and has not had any updated comments for quite some time. As a result this bug is being closed. Please reopen if this is still an issue in the current Ubuntu release http://www.ubuntu.com/getubuntu/download . Also, please be sure to provide any requested information that may have been missing. To reopen the bug, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-expired
Changed in linux (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Se6 (se6astien) wrote : AlsaDevices.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Se6 (se6astien) wrote : BootDmesg.txt

apport information

Revision history for this message
Se6 (se6astien) wrote : CRDA.txt

apport information

Revision history for this message
Se6 (se6astien) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
Se6 (se6astien) wrote : Card0.Codecs.codec.0.txt

apport information

Revision history for this message
Se6 (se6astien) wrote : Card0.Codecs.codec.1.txt

apport information

Revision history for this message
Se6 (se6astien) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Se6 (se6astien) wrote : IwConfig.txt

apport information

Revision history for this message
Se6 (se6astien) wrote : Lspci.txt

apport information

Revision history for this message
Se6 (se6astien) wrote : Lsusb.txt

apport information

Revision history for this message
Se6 (se6astien) wrote : PciMultimedia.txt

apport information

Revision history for this message
Se6 (se6astien) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Se6 (se6astien) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Se6 (se6astien) wrote : ProcModules.txt

apport information

Revision history for this message
Se6 (se6astien) wrote : UdevDb.txt

apport information

Revision history for this message
Se6 (se6astien) wrote : UdevLog.txt

apport information

Revision history for this message
Se6 (se6astien) wrote : WifiSyslog.txt

apport information

Revision history for this message
Se6 (se6astien) wrote :

OK, to clarify this bug. It is a regression. It was fine in the previous LTS 8.04.
In 10.04, browsing of CIFS shares is much slower due to excessive QUERY_PATH_INFO requests as documented in the original bug description. It is easily reproducible. You just need another computer running Windows, share a folder, acess it and run wireshark to see the traffic.

Seb.

Revision history for this message
karit (nzkarit) wrote :

I think I am seeing this on my 10.04 machine as well. I have been on the forum about it http://ubuntuforums.org/showthread.php?t=1521653

Revision history for this message
speeves (speeves) wrote :
Revision history for this message
Se6 (se6astien) wrote :

No, that is a different bug.
It is the navigation through directories which is slow, not the file transfer itself:
The trivial example I gave is easy to reproduce. There is a lot of unnecessary samba traffic that slows down the navigation.

Seb

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.