LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 01-14-2014, 07:16 PM   #1
tombelcher7
Member
 
Registered: Feb 2008
Location: Surrey
Distribution: Debian
Posts: 184

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, 09:47 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Philly, PA
Distribution: Kubuntu x64, RHEL, Fedora Core, FreeBSD, Windows x64
Posts: 1,503
Blog Entries: 35

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
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, 08:05 AM   #3
tombelcher7
Member
 
Registered: Feb 2008
Location: Surrey
Distribution: Debian
Posts: 184

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, 08:13 AM   #4
tombelcher7
Member
 
Registered: Feb 2008
Location: Surrey
Distribution: Debian
Posts: 184

Original Poster
Rep: Reputation: 5
I found this:

http://manpages.ubuntu.com/manpages/...nt.cifs.8.html



--verbose
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

CONFIGURATION
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, 07:10 AM   #5
Bill Gates 666
Member
 
Registered: Dec 2003
Location: Cambridge
Distribution: Arch
Posts: 68

Rep: Reputation: 22
Quote:
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, 01:09 AM   #6
techslate20
LQ Newbie
 
Registered: Jan 2014
Location: Oklahoma City
Posts: 3

Rep: Reputation: Disabled
Thanks for this information.
 
  


Reply


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 07:18 PM
[SOLVED] SMB Shares dont work when SMB is run as a service! CentOS 6 finnsloss Linux - Networking 1 10-14-2011 10:33 AM
mounting SMB/CIFS shares from FreeBSD scott2004 *BSD 2 10-21-2006 01:09 PM
making smb shares viewable from smb client via web browser scottpioso General 3 11-10-2003 05:25 PM
Problems connecting to samba shares from w2k or XP systemafter configuring smb.conf f marvc Linux - Software 0 06-09-2003 08:12 AM


All times are GMT -5. The time now is 03:00 PM.

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