LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 06-04-2013, 09:21 AM   #1
sphawk
LQ Newbie
 
Registered: Jun 2013
Posts: 5

Rep: Reputation: Disabled
Unhappy Samba slow performances


hi all

My own server is a Slackware 13.0 and work properly, but i've another server with some serious problems with samba speedrate.
The problem affect only samba, not FTP.
Online i've found many tricks to improve speed but I can't solve the problem.
This is the first time that samba give me some problems.


My Server
Code:
# uname -a
Linux Server 3.2.44-grsec

# cat /etc/slackware-version
Slackware 13.0.0.0.0

# lspci |grep -i ethernet
00:07.0 Bridge: nVidia Corporation MCP61 Ethernet (rev a2)
01:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

# hdparm -t /dev/sdb1
/dev/sdb1:
 Timing buffered disk reads:  396 MB in  3.01 seconds = 131.50 MB/sec

# mount | grep samba
/dev/sdb1 on /home/samba type ext3 (rw,nosuid,nodev)

# smbd --version
Version 3.2.15

Download rate: 11.2 MB/s
Upload rate: 9.3 MB/s



Other Server
Code:
# uname -a
Linux Server 3.2.44-grsec

# cat /etc/slackware-version
Slackware 14.0

# lspci |grep -i ethernet
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
03:05.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

# hdparm -t /dev/sdb1
/dev/sdb1:
 Timing buffered disk reads: 378 MB in  3.01 seconds = 125.57 MB/sec

# mount | grep samba
/dev/sdb1 on /home/samba type ext4 (rw,nosuid,nodev)

# smbd --version
Version 3.6.8

Download rate: 380 KB/s
Upload rate:  103 KB/s



File smb.conf
Code:
[global]
workgroup = WORKGROUP
netbios name = MyOwn
server string = MyOwn
hostname lookups = no
guest account = samba
log file = /var/log/samba/samba.%m
log level = 2
max log size = 2000
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=16384 SO_SNDBUF=16384
interfaces = 172.16.0.0/24 127.0.0.1/32
bind interfaces only = yes
username map = /etc/samba/usermap
dns proxy = No
map to guest = Bad User
printcap name = /dev/null
load printers = no
printing = bsd
local master = yes
preferred master = yes
domain master = yes
os level = 65
announce as = NT
wins support = yes
name resolve order = wins hosts lmhosts bcast
null passwords = true
veto files = /lost+found/ /.recycle/

[public]
comment = public share
hosts allow = 172.16.0.0/24
hosts deny = 0.0.0.0/0
path = /home/samba/public
read only = no
guest ok = yes
create mask = 0640
directory mask = 0750
force user = samba
force group = smbusers

The config is the same except for interfaces and host allow: my server use 172.16. network, other server 192.168.
Tnx a lot for any help
 
Old 06-04-2013, 09:45 AM   #2
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: ElementaryOS, Ubuntu LTS, Slackware
Posts: 1,502

Rep: Reputation: 694Reputation: 694Reputation: 694Reputation: 694Reputation: 694Reputation: 694
My first suggestion would be to check your DNS configuration on the slow server. What do 'hostname' and 'hostname --fqdn' return? Is the server pingable both by IP address and hostname from client machines? As far as I remember, past Samba problems were often due to DNS issues.
 
Old 06-04-2013, 10:01 AM   #3
gezley
Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware64, NetBSD
Posts: 490

Rep: Reputation: 207Reputation: 207Reputation: 207
Have you assigned the Wins server address to the Samba clients (statically or by DHCP)? If not then it's possible Samba is using broadcasts to advertise itself to the clients. If the switch on the second network is just a 10/100MB switch then you will get much poorer speeds than you would get on your home network with a 1Gb switch and just one or two clients.

The first thing to do is check the speed of the switch or router connecting your devices on the second network, and the second thing to do is to make sure the clients are configured with the Wins server address. If your DHCP server on the second network does not provide this option then you will have to either change your DHCP server or else assign the Wins server address manually on all clients.
 
Old 06-04-2013, 10:17 AM   #4
sphawk
LQ Newbie
 
Registered: Jun 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kikinovak View Post
What do 'hostname' and 'hostname --fqdn' return?
mmmmh

Code:
# time hostname
server

real    0m0.001s

# time hostname --fqdn
server

real    0m10.013s
really slow!
fixed editing /etc/hosts file

Code:
127.0.0.1       server server.domain.pri localhost
::1             server server.domain.pri localhost
but samba is still slow

Quote:
Originally Posted by kikinovak View Post
Is the server pingable both by IP address and hostname from client machines? As far as I remember, past Samba problems were often due to DNS issues.
hostname is not pingable and the resolution is wrong.
i'm trying to fix it.
tnx!

Last edited by sphawk; 06-04-2013 at 10:28 AM.
 
Old 06-04-2013, 10:22 AM   #5
sphawk
LQ Newbie
 
Registered: Jun 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Have you assigned the Wins server address to the Samba clients (statically or by DHCP)?
yes, DHCP

Code:
option netbios-name-servers 192.168.0.1;
Quote:
The first thing to do is check the speed of the switch or router connecting your devices on the second network, and the second thing to do is to make sure the clients are configured with the Wins server address. If your DHCP server on the second network does not provide this option then you will have to either change your DHCP server or else assign the Wins server address manually on all clients.
ok, i'll check.
tnx a lot!
 
Old 06-04-2013, 10:42 AM   #6
gezley
Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware64, NetBSD
Posts: 490

Rep: Reputation: 207Reputation: 207Reputation: 207
Quote:
Originally Posted by sphawk View Post
interfaces = 172.16.0.0/24 127.0.0.1/32
Shouldn't this be something like the following:

Code:
interfaces = 172.16.0.100/24
or just this:

Code:
interfaces = eth0
?

Does Samba need to listen on localhost (lo0)?
 
Old 06-04-2013, 10:57 AM   #7
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: ElementaryOS, Ubuntu LTS, Slackware
Posts: 1,502

Rep: Reputation: 694Reputation: 694Reputation: 694Reputation: 694Reputation: 694Reputation: 694
Here's what this looks like in my local network, on the server:

Code:
[root@nestor:~] # hostname
nestor
[root@nestor:~] # hostname --fqdn
nestor.microlinux.montpezat
[root@nestor:~] # smbclient -L localhost -N
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.8]

	Sharename       Type      Comment
	---------       ----      -------
	Public          Disk      Partage Public
	Confidentiel    Disk      Partage Confidentiel
	IPC$            IPC       IPC Service (Serveur de fichiers et d'impression NESTOR)
	Brother_HL-2030_series Printer   Brother HL-2030 series
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.8]

	Server               Comment
	---------            -------
	NESTOR               Serveur de fichiers et d'impression NESTOR

	Workgroup            Master
	---------            -------
	WORKGROUP            NESTOR
[root@nestor:~] # cat /etc/hosts
# /etc/hosts
127.0.0.1		localhost.localdomain localhost
192.168.2.1		nestor.microlinux.montpezat nestor
 
Old 06-04-2013, 11:37 AM   #8
sphawk
LQ Newbie
 
Registered: Jun 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by gezley View Post
Does Samba need to listen on localhost (lo0)?
lo is for test
i prefer to use interface in case i must change network config, but substantially is the same.
 
Old 06-04-2013, 11:45 AM   #9
gezley
Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware64, NetBSD
Posts: 490

Rep: Reputation: 207Reputation: 207Reputation: 207
Quote:
Originally Posted by sphawk View Post
i prefer to use interface in case i must change network config, but substantially is the same.
I still think that for the interfaces parameter you should specify the interface address, and not the network range it falls into, otherwise you are saturating the network with unnecessary broadcasts.

For example, 172.16.0.100, not 172.16.0.0.
 
Old 06-04-2013, 11:47 AM   #10
gezley
Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware64, NetBSD
Posts: 490

Rep: Reputation: 207Reputation: 207Reputation: 207
Quote:
Originally Posted by sphawk View Post
mmmmh

Code:
# time hostname
server

real    0m0.001s

# time hostname --fqdn
server

real    0m10.013s
really slow!
fixed editing /etc/hosts file

Code:
127.0.0.1       server server.domain.pri localhost
::1             server server.domain.pri localhost
but samba is still slow
Did you restart Samba after making these changes?
 
Old 06-04-2013, 12:06 PM   #11
sphawk
LQ Newbie
 
Registered: Jun 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by gezley View Post
For example, 172.16.0.100, not 172.16.0.0.
u'r right, my error
fixed

Quote:
Originally Posted by gezley View Post
Did you restart Samba after making these changes?
yes
to prevent all problem, i've installed bind and configured to forward the queries to the router (192.168.1.1).
restarted client and server
now all client use the server as dns (192.168.0.1) and can resolve .pri hosts

samba is still slow like a dead snail
i back to search for possible solutions
tnx all for help

Last edited by sphawk; 06-04-2013 at 01:13 PM.
 
  


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
slow apache 2 performances, even with small amount of traffic. nekkro-kvlt Linux - Software 4 01-14-2014 11:38 PM
Looking for a TCP server for high performances Neuzen Linux - Networking 5 01-07-2012 07:45 AM
Emulator Performances Newzat Linux - Newbie 3 03-17-2009 02:35 PM
Want stellar performances in Starcraft. futhark Linux - Games 4 08-25-2005 05:52 PM
Hard Drive Performances hotrodowner General 2 06-13-2002 10:32 AM


All times are GMT -5. The time now is 06:13 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