LinuxQuestions.org
Have you listened to LQ Radio?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Thread Tools
Old 10-10-2008, 12:19 PM   #1
biscaynesix
LQ Newbie
 
Registered: May 2006
Posts: 8
Thanked: 1
Exclamation Samba server is slow!


[Log in to get rid of this advertisement]
Help me figure out why access to this samba server from a Windows XP machine is so slow! Windows XP machines are set up to access the share through a UNC path with the IP address like \\192.168.1.13\files so name resolution shouldn't be a problem, right?


I have two samba servers on two separate machines.

The old server is running CentOS 4.
The old server is FAST. GET through smbclient at ~3,000K/sec
The old server is running smbd version 3.0.28-0.el4.9
Linux 2.6.9-34.EL
Chipset nVidia MCP51
Onboard NIC: MCP51 Ethernet Controller (rev a1)

The new server is running Debian Stable.
Most of the smb.conf came from old server config.
Access to samba from XP is SLOW. GET through smbclient at ~30 - 60K/sec
The new server is running smbd version 3.0.24
Linux 2.6.18-6-686
Chipset is Intel Corporation 82801G / "Intel DG31PR"
Onboard NIC: RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
The hard disk and all other parts in the computer are brand new.
The hard disk is a Western Digital 10EACS (1 TB)
The /home partition, which is where the share sits, is about 900GB.

Benchmarks with iperf show network throughput between a workstation and either server to be about the same.


Here is the smb.conf on the new/slow server

Code:
[global]

   workgroup = workgroup
   netbios name = Files2
   
   level2 oplocks = no
   oplocks = no
   
   server string = Files2
   
   hosts allow = 192.168.1. 127.
   
   load printers = no
   printing = bsd
   
   guest account = aip
   
   log file = /var/log/samba/%m.log
   log level = 2
   max log size = 50
   
   security = share
   
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   
   wins server = 192.168.1.12
   dns proxy = no
   
   idmap uid = 16777216-33554431
   idmap gid = 16777216-33554431
   template shell = /bin/false
   username map = /etc/samba/smbusers
   password server = None
   encrypt passwords = no
   winbind use default domain = no


#======================= Share Definitions =======================

[files]
	path = /home/files/files
	writable = yes
	writeable = yes
	public = yes
	read only = no

[backup]
	path = /home/backup
	writable = no
	public = yes

[daily]
	path = /home/daily
	writable = no
	public = yes

Here is the smb.conf from the old/fast server

Code:
[global]
workgroup = workgroup
netbios name = Files1

level2 oplocks = no
oplocks = no

server string = Files1 

hosts allow = 192.168.1. 127.

load printers = no

printing = bsd

guest account = aip

log file = /var/log/samba/%m.log
max log size = 50

security = share

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

wins server = 192.168.1.12

dns proxy = no

#============================ Share Definitions ==============================
	idmap uid = 16777216-33554431
	idmap gid = 16777216-33554431
	template shell = /bin/false
	username map = /etc/samba/smbusers
	password server = None
	encrypt passwords = no
	winbind use default domain = no
[homes]
	comment = Home Directories
	browseable = no
	writeable = yes

[files]
	path = /mnt/files/files
	writeable = yes
	only guest = yes
	public = yes
	force group = aip

[backup]
	path = /mnt/backup
	writeable = no
	only guest = yes
	public = yes
	force group = aip


[daily]
	path = /mnt/daily
	writeable = no
	only guest = yes
	public = yes
	force group = aip
On the new/slow server, I changed these values in an attempt to solve the problem:

8388608 > /proc/sys/net/core/rmem_max
8388608 > /proc/sys/net/core/wmem_max
65536 > /proc/sys/net/core/rmem_default
65536 > /proc/sys/net/core/wmem_default


edit: I added this to smb.conf under [global] on the new/slow server in an attempt to solve the problem

Code:
domain master = Yes
local master = Yes
preferred master = Yes
os level = 64

edit: I changed these values

Code:
level2 oplocks = yes
oplocks = yes

I also removed these lines

Code:
	idmap uid = 16777216-33554431
	idmap gid = 16777216-33554431
	template shell = /bin/false
	username map = /etc/samba/smbusers
        winbind use default domain = no

No apparent speed changes.

Last edited by biscaynesix; 10-17-2008 at 01:53 PM..
biscaynesix is offline     Reply With Quote
Old 10-11-2008, 11:36 AM   #2
wernerz
Member
 
Registered: Jun 2008
Location: Ottawa, Ontario, Canada
Distribution: debian, dsl-n
Posts: 55
Thanked: 0
Make sure the windows XP firewall on all clients is OFF. It always interferes with networking with samba.
wernerz is offline     Reply With Quote
Old 10-14-2008, 02:00 PM   #3
biscaynesix
LQ Newbie
 
Registered: May 2006
Posts: 8
Thanked: 1

Original Poster
Quote:
Originally Posted by wernerz View Post
Make sure the windows XP firewall on all clients is OFF. It always interferes with networking with samba.
Windows XP firewall being off or on does not seem to make a difference.
biscaynesix is offline     Reply With Quote
Old 10-14-2008, 04:05 PM   #4
mostlyharmless
Member
 
Registered: Jan 2008
Distribution: Slackware 12.1
Posts: 824
Thanked: 45
Just a troubleshooting idea: is the new server slow if the old fast server isn't serving?
mostlyharmless is offline     Reply With Quote
Old 10-15-2008, 12:17 AM   #5
thetakan
LQ Newbie
 
Registered: Oct 2008
Distribution: SuSe
Posts: 7
Thanked: 0
try after adding following line in your global option.

os level = 65

This is default value and reply us to check further.

Thanks
thetakan is offline     Reply With Quote
Old 10-16-2008, 11:12 AM   #6
biscaynesix
LQ Newbie
 
Registered: May 2006
Posts: 8
Thanked: 1

Original Poster
Quote:
Originally Posted by thetakan View Post
try after adding following line in your global option.

os level = 65
Changing this value does not appear to affect performance.


Quote:
Originally Posted by mostlyharmless View Post
Just a troubleshooting idea: is the new server slow if the old fast server isn't serving?
This is a good idea and I might try this later. I will have to wait until an odd hour when the server is not being accessed.


Edit: I tried removing SO_RCVBUF=8192 SO_SNDBUF=8192 from socket options which had no apparent effect.

Edit: Removed the hosts allow line. No apparent change.


Here is the configuration of the new server as it is now
Code:
[global]

   workgroup = workgroup
   netbios name = Files2
   
   #level2 oplocks = yes
   level2 oplocks = no
   #oplocks = yes
   oplocks = no
   
   domain master = Yes
   local master = Yes
   preferred master = Yes
   os level = 65
   
   server string = Files2
   
   hosts allow = 192.168.1. 127.
   
   load printers = no
   #printing = bsd
   
   guest account = aip
   
   log file = /var/log/samba/%m.log
   log level = 1
   max log size = 50
   
   security = share
   
   #socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   socket options = TCP_NODELAY
   
   #wins server = 192.168.1.12
   dns proxy = no
   
   password server = None
   encrypt passwords = no
   #winbind use default domain = no


#======================= Share Definitions =======================

[files]
	path = /home/files/files
	writable = yes
	writeable = yes
	public = yes
	read only = no

[backup]
	path = /home/backup
	writable = no
	public = yes

[daily]
	path = /home/daily
	writable = no
	public = yes

Last edited by biscaynesix; 10-16-2008 at 01:53 PM..
biscaynesix is offline     Reply With Quote
Old 10-17-2008, 11:35 AM   #7
biscaynesix
LQ Newbie
 
Registered: May 2006
Posts: 8
Thanked: 1

Original Poster
I did a disk access benchmark on the slow server with bonnie++

Code:
Version  1.03       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
aip3             4G 42356  91 72992  19 28910   7 46975  91 75833  10 184.3   0
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
aip3,4G,42356,91,72992,19,28910,7,46975,91,75833,10,184.3,0,16,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++
I changed some things around in the config experimentally. Most notable are the socket options and the four lines below it.

Code:
[global]

   workgroup = workgroup
   netbios name = Files2
   
   level2 oplocks = no
   oplocks = no
   
   domain master = Yes
   local master = Yes
   preferred master = Yes
   os level = 65
   
   server string = Files2
   
   hosts allow = 192.168.1. 127.
   
   load printers = no
   
   guest account = aip
   
   log file = /var/log/samba/%m.log
   log level = 1
   max log size = 50
   
   security = share
   
   socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_SNDBUF=16384 SO_RCVBUF=16384
   max xmit = 65535
   dead time = 15
   getwd cache = yes
   lpq cache = 30

   dns proxy = no
   
   password server = None
   encrypt passwords = no


#======================= Share Definitions =======================

[files]
	path = /home/files/files
	writable = yes
	writeable = yes
	public = yes
	read only = no

[backup]
	path = /home/backup
	writable = no
	public = yes

[daily]
	path = /home/daily
	writable = no
	public = yes
No apparent change in performance.

Last edited by biscaynesix; 10-17-2008 at 11:45 AM..
biscaynesix is offline     Reply With Quote
Old 10-17-2008, 01:38 PM   #8
toastytheog
LQ Newbie
 
Registered: Oct 2008
Posts: 1
Thanked: 0
deleted b/c of ignorance

Last edited by toastytheog; 10-17-2008 at 01:42 PM.. Reason: ignorance
toastytheog is offline     Reply With Quote
Old 10-23-2008, 11:19 AM   #9
biscaynesix
LQ Newbie
 
Registered: May 2006
Posts: 8
Thanked: 1

Original Poster
The problem was solved by switching from samba version 3.0.24 to 3.2.3
biscaynesix is offline     Reply With Quote
Thanked by:
Old 10-23-2008, 11:37 AM   #10
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: Nantes (France)
Distribution: Mandriva 2009
Posts: 1,831
Thanked: 16
I see you solved your problem. I'd like to know something because I think I have a similar problem but I can't update for now.

At my work, I setup a Samba server (PIII-800 128MB ram, Mandriva 2008.0) and it is SLOW when accessed by my coworkers (they use XP): they can wait up to 20 seconds before the "My computer" window shows the drives, and then another 20 seconds (at most) when opening a Samba drive from this server for the first time (or after inactivity).
BUT, I use Linux (Mandriva 2009.0) on my desktop, and accessing the same "drives" (configured as autofs mount points) is FAST: Accessing a "drive" is instantaneous!

So my question is simple: did you have the opportunity to check the Samba performance from a Linux client to your SLOW server? Was it slow too, or fast?

Yves.

Edit: samba-server-3.0.25b-4.5mdv2008.0
theYinYeti is offline     Reply With Quote
Old 10-24-2008, 01:40 PM   #11
biscaynesix
LQ Newbie
 
Registered: May 2006
Posts: 8
Thanked: 1

Original Poster
theYinYeti, file transfer via smbclient was slow between two Linux machines just as it was between Windows XP and Linux.
biscaynesix is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
X server slow response when connected to slow Wifi bluesmanu Linux - Software 0 04-10-2008 04:44 PM
very slow samba server with windows programs like access antronmics68 Ubuntu 0 03-05-2008 12:45 AM
Samba server very slow B-Boy Linux - Newbie 1 01-25-2008 01:57 PM
slow samba server soorajmr Linux - Networking 1 05-08-2007 09:08 PM
samba server open file very slow justkeny2k Linux - Networking 4 12-21-2006 10:40 PM


All times are GMT -5. The time now is 12:49 AM.

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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration