Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-28-2005, 08:02 PM   #1
Registered: Nov 2004
Posts: 32

Rep: Reputation: 15
samba extremely slow after a disconnect

I have a problem with samba that I can't figure out. It works fine normally... however.. if I reset my windows PC, then try and access files shared on the windows PC from my linux computer, samba runs EXTREMELY slow. The main thing I do this for is playing music with xmss (music stored on windows pc), but I use it for a number of other things as well.

Restarting samba doesn't fix the problem... the only thing that does fix it that I've found, is completely rebooting the linux computer.

Am running debian (2.6.10 kernel). Here's the /etc/samba/smb.conf

#======================= Global Settings =======================


## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = Trek

# server string is the equivalent of the NT Description field
server string = Ack (Samba %v)

# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no

#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m

# Put a capping on the size of the log files (in Kb).
max log size = 1000

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d

####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/ServerType.html in the samba-doc
# package for details.
security = user

# You may wish to use password encryption. See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
encrypt passwords = true

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.
passdb backend = tdbsam guest
obey pam restrictions = yes
invalid users = root

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Augustin Luton <> for
# sending the correct chat script for the passwd program in Debian Potato).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .

######## File sharing ########

# Name mangling options
; preserve case = yes
; short preserve case = yes

############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /home/samba/etc/smb.conf.%m

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html
# for details
# You may want to add the following on a Linux system:
#socket options = TCP_NODELAY

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

wins support = no
comment = Home Directories
browseable = no

# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
writable = no

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
create mask = 0700

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0700

path = /c/www
valid users = luke
public = no
writable = yes
create mask = 0765

path = /links/furc
valid users = luke
public = no
writable = yes
create mask = 0765


... and the lines in /etc/fstab
//neato/ear /neato/ear smbfs uid=luke,username=Luke,password=******** 0 0
//neato/EQLogs /neato/EQLogs smbfs uid=luke,username=Luke,password=******** 0 0


Any ideas what could be going on.. or how to fix it?
Old 03-02-2005, 08:08 AM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 255Reputation: 255Reputation: 255
Samba Version?
Network type your using?
And does it start working better if you just restart samba itself instead of rebooting the whole machine? You should always try to avoid rebooting a Linux server of any kind if its just one service giving difficulties.
What are the specs of the Linux server? Do you have another windows machine you can test this from, reboot and see if the same thing occurs?
Old 03-02-2005, 11:16 PM   #3
Registered: Nov 2004
Posts: 32

Original Poster
Rep: Reputation: 15
Beleive samba version is 3.0.10-1

They're connected through a linksys router.. over 100Mbps ethernet.

Just restarting samba doesn't not fix the problem ( /etc/init.d/samba restart ). Typeing reboot and letting the system fully reboot does fix it.

Linux comp is an old p3 550 with 256MB of RAM. I used to run win98 on the computer, and it is still on there and I can boot to it if I need to. Back when I used win98 on the linux computer and rebooted the other windows machine, there was never any speed issues between them. Don't have a 3rd pc to test things with though.

Another different way to recreate the problem most of the time (doesn't always work), is to just unplug the network cable from either of the computers.
Old 03-03-2005, 05:01 AM   #4
Registered: Aug 2004
Location: Hull - England
Distribution: Ubunto and slowly switching to debian
Posts: 308

Rep: Reputation: 30
try typing

smbd stop

smbd start this doesnt restart it at actualy stops it first and should have the same effect as if you restarted the linux box

and i could have swarn i replayed to this exact thread yesterday must be mistaken
Old 03-06-2005, 03:19 AM   #5
Registered: Nov 2004
Posts: 32

Original Poster
Rep: Reputation: 15
smbd stop
smbd start
..just tried that... same effect as using the normal samba restart.. doesn't fix the insane connection lag.

Restarting linux system still fixed it though. It's strange.
Old 03-08-2005, 12:19 AM   #6
Registered: Nov 2004
Posts: 32

Original Poster
Rep: Reputation: 15
Net card in linux comp is a cheap thing.. maybee it's related to that? Is there a way to "turn off" the card then "turn it back on" without restarting?


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
Wine extremely slow!!!!!!!!!!!! augu2000 Linux - Software 3 11-01-2005 07:18 PM
ProFTPD extremely slow newuser455 Linux - Software 1 08-27-2005 06:31 PM
OpenGL is extremely slow stonehurstX11 Linux - General 2 05-26-2005 07:33 PM
Samba, extremely slow performance, what to do? mfeoli Linux - Networking 4 02-20-2004 06:14 PM
sdl games are slow extremely slow linksocc Linux - Software 7 01-17-2004 04:53 PM > Forums > Linux Forums > Linux - Software

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