11.4 slow CIFS reading

Hi all.

  1. 11.4 x64.
  2. Solaris SMB server.
  3. Gigabit LAN
  4. mounted shares from that server (fstab entries)

write speed: 80-90-100 MB/s
read speed extremely slow: 3-4-5 MB/s (really funny - our administrator shoked, but i’m not fun, i need fast lan for work)

But when i reboot to windows 7 - i have 60-70-80 MB/s in both directions. Read and Write - nice.

What happened? kernel updated and all last updates is applied (exclude kopete-because i use old kopete with animated tray icon).

I have to tried many tunes like: “noatime” “directio” and also in /etc/modprobe.d - put conf file with:
options cifs CIFSMaxBufSize=130048

speed is up to 12-13 MB/sec but anyway … That is not 100-80 MB/sec…

Help! I need work with graphics! Is many gigs of large files there ! ))
thanks for attention

hm.
nobody?

i have seen same thing here:

SAMBA – Slow performance with cifs client

what ideas ?
my fstab:
//server/project /server/project cifs credentials=/root/.smbcred,file_mode=0777,dir_mode=0777 0 0
**
kernel:**

rpm -qa|grep kernel
kernel-desktop-2.6.37.1-1.2.2.x86_64
kernel-desktop-devel-2.6.37.1-1.2.2.x86_64
kernel-source-2.6.37.1-1.2.2.noarch
kernel-devel-2.6.37.1-1.2.2.noarch

cifs
rpm -qa|grep cifs
cifs-utils-4.6-3.6.1.x86_64

write speed to share = 100 MB/s
read speed from share = 6 MB/s

after reboot to windows = 80 MB/s ot both directions.
What wrong with cifs ? This is a kernel problem ?

i try to update cifs-utils and samba-client:

rpm -qa|grep cifs
cifs-utils-4.9-8.1.x86_64
rpm -qa|grep samba
yast2-samba-client-2.20.2-3.1.noarch
samba-client-3.5.8-2.5.x86_64
samba-client-32bit-3.5.7-1.17.1.x86_64
yast2-samba-server-2.20.2-3.1.noarch

result is same.

… and some fantastik screenshots about linux advantages in 2011:

Copying from disk->to disk:

http://i.imgur.com/8buiO.jpg

copying file (openSUSE 11.4 DVD iso image) From openSUSE 11.4 box to Server (cifs share):
http://i.imgur.com/m79II.jpg

getting same file from server to local:
http://i.imgur.com/MkgBZ.jpg

same file with NFS:
http://i.imgur.com/917ki.jpg

i think this can help and i very hope to some feedback :slight_smile:

some test with smbclient:

smb: est_> get openSUSE-11.4-DVD-x86_64.iso /home/roman/ttt.iso
getting file est_
\openSUSE-11.4-DVD-x86_64.iso of size 4614782976 as /home/roman/ttt.iso (71025.3 KiloBytes/sec) (average 71025.3 KiloBytes/sec)

**smbclient work with 70 MB/sec speed. **
What problem with cifs ? How can i get that speed on cifs ?

update kernel to 2.6.37.6-0.5-desktop - don’t solve problem.

Why no any answers? This is look like real bug. How i can solve that ? i need work with a good lan, but i have really slow reading speed

On Tue June 7 2011 07:36 am, live fx wrote:

>
> update kernel to 2.6.37.6-0.5-desktop - don’t solve problem.
>
> Why no any answers? This is look like real bug. How i can solve that ?
> i need work with a good lan, but i have really slow reading speed
>
>
live fx;

Have you tried a network capture with something like WireShark to compare the
CIFS mount with smbclient and Windows 7?

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Have you tried a network capture with something like WireShark to compare the
CIFS mount with smbclient and Windows 7?

No, i have not try that. But what can i see in wireshark traffic ? I see the logic -

  1. when i reboot to windows - files transfer ok in both directions
  2. windows 7 on another computers work with server nice
  3. NFS mount from my Linux work nice (but i don’t use it because wrong security settings on server-side) - (this is about LAN device driver - looks like all ok with driver)
  4. smbclient files transfer between my computer and Server - work nice (and this again is about LAN device driver - all ok with driver)
  5. CIFS mount - writing - excellent speed.
  6. CIFS mount - reading - is ugly slow.

All this things looks like cifs.ko module, or something wrong in kernel.
i have updated kernels and cifs-utils and smbclient rpm-s, but all results is the same.

  1. What can i do with sniffer like wireshark ? (of course - i’m on work, and i can tune linux not all time) - what i can to see in TCP headers ? How can i use it ?
  2. Primary question: How can i mount share with smbclient ? This is possible ? I have not SMBFS fs support in system.
  3. How can i mount this share ? (NFS is wrong way - i can’t change server security parms, and i don’t want start debating about that)

I feel myself very strange, because in 2011 year, i need analyze old as s**t CIFS protocol, instead of just working with graphics as all others. This is a time killing. And our Server is not windows server - but Solaris. All systems - windows 7, XP and OSX work nice with it. Only linux is killing time for tuning and recompiling, instead of just work. As always.

====
venzkep, sorry, but what i need to catch from traffic? And where i can find guide with…With steps about analyze CIFS protocol problems using wireshark?

On Wed June 8 2011 12:06 am, live fx wrote:

>
>> Have you tried a network capture with something like WireShark to
>> compare the
>> CIFS mount with smbclient and Windows 7?
>
> No, i have not try that. But what can i see in wireshark traffic ? I
> see the logic -
>
> 1. when i reboot to windows - files transfer ok in both directions
> 2. windows 7 on another computers work with server nice
> 3. NFS mount from my Linux work nice (but i don’t use it because wrong
> security settings on server-side) - (this is about LAN device driver -
> looks like all ok with driver)
> 4. smbclient files transfer between my computer and Server - work nice
> (and this again is about LAN device driver - all ok with driver)
> 5. CIFS mount - writing - excellent speed.
> 6. CIFS mount - reading - is ugly slow.
>
> All this things looks like cifs.ko module, or something wrong in
> kernel.
> i have updated kernels and cifs-utils and smbclient rpm-s, but all
> results is the same.
>
> 1. What can i do with sniffer like wireshark ? (of course - i’m on
> work, and i can tune linux not all time) - what i can to see in TCP
> headers ? How can i use it ?
> 2. Primary question: How can i mount share with smbclient ? This is
> possible ? I have not SMBFS fs support in system.
> 3. How can i mount this share ? (NFS is wrong way - i can’t change
> server security parms, and i don’t want start debating about that)
>
> I feel myself very strange, because in 2011 year, i need analyze old as
> s**t CIFS protocol, instead of just working with graphics as all others.
> This is a time killing. And our Server is not windows server - but
> Solaris. All systems - windows 7, XP and OSX work nice with it. Only
> linux is killing time for tuning and recompiling, instead of just work.
> As always.
>
> ====
> venzkep, sorry, but what i need to catch from traffic? And where i
> can find guide with…With steps about analyze CIFS protocol problems
> using wireshark?
>
live fx;

I’m not sure just what you’ll find. Smaller frames? Resent packets? Un
needed traffic? Something is different between the different methods. What
happens in a browser if you use:


smb://<servername>/<sharename>


P. V.
“We’re all in this together, I’m pulling for you.” Red Green

I had in the past (not with 11.4) similar problem with realtek net device and it was solved with updating drivers for it from their offcial site.

Thanks… Last driver compiled and installed (autoinstall.sh ) - but same result with speed… I also try it with kernel-vanilla and compile last realtek driver - same… i don’t know what i can do more. Firewall is down. Apparmor uninstalled.
But Same machine - reboot to windows and nice speed in all directions. Reboot to linux - slow reading from cifs mounted share. But writing is roket-fast.

to venzkep:

I’m not sure just what you’ll find. Smaller frames? Resent packets? Un
needed traffic? Something is different between the different methods. What
happens in a browser if you use:

Thanks you. Only konqueror can do smb:\
Wireshark… i can’t understand frames and packets, because learning TCP headers is really not my target skill… I’m graphics designer. I can do some compiling, some tune, but comparing difference between TCP headers - is more than i can give for OS. Really. I understand when steps like that is needed for some beta-software, or, for example, testing new protocol plugin for messenger…
But i have problem with oldest thing - mount.cifs. Peoples ask me - “why you working so slow?? what you doing??” i say “i rebuild linux drivers kernel…reinstall…etc”

I’m really looking forward to the time when Linux will be easy to install and work on it, without brain fracturing. I spend a lot of time for reading articles and huge manuals about the simplest things - connect remote CIFS shares.
Instead of working. I have tried all possible options in the fstab, and /ets/modprobe.d… smbclient work nice and fast - read and write. NFS work nice - read and write. CIFS work slow. i need to stop that time killing i don’t want connect with CIFS developers or any. This is too many than i can do for this OS.

On Wed June 8 2011 04:36 am, live fx wrote:

> to venzkep:
<snip>
>
> Thanks you. Only konqueror can do smb:\
live fx;

No! Dolphin, Nautilus and FF can all use:


smb://

Keep in mind that this is Linux not Windows! Watch your \ and /.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Interesting update:

Today i have to try Linux Live CD distribution: “Ubuntu 10.0.4 Live CD”

And i have some results:

  1. Writing speed to mounted remote share:
ubuntu@ubuntu:~$ sudo dd if=/home/ubuntu/Documents/openSUSE-11.2-DVD-x86_64.iso of=/mnt/smb/test_****/file.iso bs=16M 
274+1 records in
274+1 records out
4612816896 bytes (4.6 GB) copied, 85.7719 s, 53.8 MB/s

  1. Reading from mounted cifs share:
    http://i.imgur.com/3aNUR.jpg

I’m happy to see that. And of course i read some prefs from Ubuntu:

cifs module version:


ubuntu@ubuntu:~$ modinfo cifs
filename:       /lib/modules/2.6.32-21-generic/kernel/fs/cifs/cifs.ko
version:        1.61
description:    VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows
license:        GPL
author:         Steve French <sfrench@us.ibm.com>
srcversion:     9AB4349EA78BEBDD71F8A47
depends:        
vermagic:       2.6.32-21-generic SMP mod_unload modversions 
parm:           CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048 (int)
parm:           cifs_min_rcv:Network buffers in pool. Default: 4 Range: 1 to 64 (int)
parm:           cifs_min_small:Small network buffers in pool. Default: 30 Range: 2 to 256 (int)
parm:           cifs_max_pending:Simultaneous requests to server. Default: 50 Range: 2 to 256 (int)

Kernel:
ubuntu@ubuntu:~$ sudo uname -a
Linux ubuntu 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:09:38 UTC 2010 x86_64 GNU/Linux

======= My OpenSUSE cifs and kernel: =======
Kernel


uname -a
Linux C16 2.6.37.6-0.5-desktop #1 SMP PREEMPT 2011-04-25 21:48:33 +0200 x86_64 x86_64 x86_64 GNU/Linux

CIFS module version:


~ # modinfo cifs
filename:       /lib/modules/2.6.37.6-0.5-desktop/kernel/fs/cifs/cifs.ko
version:        1.68
description:    VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows
license:        GPL
author:         Steve French <sfrench@us.ibm.com>
srcversion:     D50DD29F7D31B981497128B
depends:        
vermagic:       2.6.37.6-0.5-desktop SMP preempt mod_unload modversions 
parm:           CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048 (int)
parm:           cifs_min_rcv:Network buffers in pool. Default: 4 Range: 1 to 64 (int)
parm:           cifs_min_small:Small network buffers in pool. Default: 30 Range: 2 to 256 (int)
parm:           cifs_max_pending:Simultaneous requests to server. Default: 50 Range: 2 to 256 (int)

i need some opinions from all who can help:

Hou do you think, can this solve my problem:

I want get the same kernel what i have seen in Ubuntu - and compile it and use in OpenSUSE 11.4.
Can this help me ?

p.s. i have nice writing speed to mounted CIFS, and slow reading from. Can i solve my problem with using Ubuntu’s kernel source Linux ubuntu 2.6.32-21-generic ? Ubuntu show me great reading and nice writing speed.

All right. I’m very impressed with the hurricane-productivity of this discussion.
The last question (if there even anyone still alive here)

It’s simple. Ubuntu passes the data well. Windows - too. Network equipment properly. How and where can I send a bug-report about OpenSUSE 11.4 CIFS problems ?

Thanks

On Thu June 16 2011 01:36 pm, live fx wrote:

>
> All right. I’m very impressed with the hurricane-productivity of this
> discussion.
> The last question (if there even anyone still alive here)
>
> It’s simple. Ubuntu passes the data well. Windows - too. Network
> equipment properly. How and where can I send a bug-report about OpenSUSE
> 11.4 CIFS problems ?
>
> Thanks
>
>
live fx:

See this page for Bugzilla:

http://en.opensuse.org/openSUSE:Submitting_bug_reports

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Thanks. I posted a report few minutes ago. Hope this help…

Yes it might help but it’s very hard to tell for sure if You’re not a kernel developer.

You can check this for the latest kernels :
openSUSE News

Or compile the kernel from kernel.org the same way You would do that on any other linux. There’s literally tons of tutorials out there.
Here are some other kernel packages You might want to try out :
Index of /repositories/Kernel:/openSUSE-11.4

Be advised that messing with the kernel can render your system unbootable and it’s not that easy to fix. If You’re as careless as me You can even delete all the kernels on your system.

Also check out kernel multiversion zypper config option if You will be installing different kernels from .rpm packages. There are a lot of threads on the forum about this.

Best regards,
Greg

**glistwan **, Thanks !!!

I should try using the same kernel as in Ubuntu … Because i’m hope about CIFS very dependent from kernel version…

How do you think, only kernel changes can solve my problem with CIFS ? Can be this problem produced by some another stuff ? What yours opinion ?

Thank you very much, I’m have some experience with kernels (installing and compilation, but not development) and i will try.

I honestly don’t know. I guess it’s a samba client/kernel version combination but that’s just a wild guess. It might be that only certain kernel mixed with certain samba version will work as expected. It might be also a bug on the Solaris side which does not affect the Windows implementation or the one that You’ve got on Ubuntu. I think You will never know for sure.

Best regards,
Greg