Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 01-14-2014, 06:16 PM   #1
Registered: Feb 2008
Location: Surrey
Distribution: Debian
Posts: 207

Rep: Reputation: 5
Question SMB/CIFS client performance when connecting to shares

Just a quick one; why is it that when you connect to a Windows Share via a UNC path on windows it quickly prompts for username and password and then each subsequent access via run command \\host\share the explorer window with content of share shows very quickly but yet when you do the same with linux each time you connect to the share it takes 20-30 times longer to open the share?

Why is this?

If it is due to the SMB/CIFS client in linux then can this be optimized (via configurations)?

I currently have Gnome-buntu (latest) 64 bit:

Linux HOSTNAME 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Old 01-15-2014, 08:47 PM   #2
Senior Member
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,849
Blog Entries: 36

Rep: Reputation: 455Reputation: 455Reputation: 455Reputation: 455Reputation: 455
I connect to my samba share over the internet using an ssh tunnel to 445 to localhost and mount the share on my system at work. I don't see the latency issues you describe even through the internet (upload rate at home is ~2MB/s which is my download rate at work for the share). When on my local network I see no issue that you describe. I only say that to give you a perspective. I'm not really familiar with network tuning your share. Can you share some benchmarks e.g. how fast it downloads? Does this only affect how quickly you list share directories or is the download rate affected as well?

My setup is mounted via cifs.
Old 01-16-2014, 07:05 AM   #3
Registered: Feb 2008
Location: Surrey
Distribution: Debian
Posts: 207

Original Poster
Rep: Reputation: 5
Hello Sag47,

The download rate is fine and I am on a wired (local area network) (CAT6). I am trying to access my Buffalo NAS drive (RAIDED 2x1 TB). It is fast for connecting / authenticating and listing when in Windows 7 but under Linux it is very slow.

How would you suggest bench-marking the performance of share access? Is there a program for this?

Also are there any logs that would help in diagnosing this?
Old 01-16-2014, 07:13 AM   #4
Registered: Feb 2008
Location: Surrey
Distribution: Debian
Posts: 207

Original Poster
Rep: Reputation: 5
I found this:

Print additional debugging information for the mount. Note that
this parameter must be specified before the -o. For example:

mount -t cifs //server/share /mnt --verbose -o user=username

The primary mechanism for making configuration changes and for reading
debug information for the cifs vfs is via the Linux /proc filesystem.
In the directory /proc/fs/cifs are various configuration files and
pseudo files which can display debug information. There are additional
startup options such as maximum buffer size and number of buffers which
only may be set when the kernel cifs vfs (cifs.ko module) is loaded.
These can be seen by running the modinfo utility against the file
cifs.ko which will list the options that may be passed to cifs during
module installation (device driver load). For more information see the
kernel file fs/cifs/README.

I might try some of this when I get home...................
Old 01-21-2014, 06:10 AM   #5
Bill Gates 666
Registered: Dec 2003
Location: Cambridge
Distribution: Arch, Gentoo, OpenSUSE
Posts: 70

Rep: Reputation: Disabled
Originally Posted by tombelcher7 View Post
Yup that's the right idea

If you're using the Gnome GVFS (Gnome Virtual File System) to mount Samba shares it can be quite slow. GVFS uses a Userspace utility to access and mount shares (smbclient / smbmount I think). cifs is built into the kernel and will typically give you better access and transfer speeds.

On Kubuntu I have a hacked together autofs script to mount all network shares (accessible with guest account) using the cifs driver. On systemd distros (Arch, Gentoo, SUSE, etc.) I tend to use systemd mount units for my network shares.

Typically I actually access my server using ssh (sshfs) 'cause it's less hassle - although that is slower...

Mr Gates
Old 01-24-2014, 12:09 AM   #6
LQ Newbie
Registered: Jan 2014
Location: Oklahoma City
Posts: 3

Rep: Reputation: Disabled
Thanks for this information.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
FreeDOS + MS Client (SMB/CIFS) read only access czezz General 4 06-07-2012 06:18 PM
[SOLVED] SMB Shares dont work when SMB is run as a service! CentOS 6 finnsloss Linux - Networking 1 10-14-2011 09:33 AM
mounting SMB/CIFS shares from FreeBSD scott2004 *BSD 2 10-21-2006 12:09 PM
making smb shares viewable from smb client via web browser scottpioso General 3 11-10-2003 04:25 PM
Problems connecting to samba shares from w2k or XP systemafter configuring smb.conf f marvc Linux - Software 0 06-09-2003 07:12 AM > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 01:59 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration