Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Slow download speeds over samba -- my problem and solution
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
nagash
n00b
n00b


Joined: 25 Jan 2003
Posts: 5
Location: Canada

PostPosted: Mon May 24, 2004 6:15 am    Post subject: Slow download speeds over samba -- my problem and solution Reply with quote

I recently had the problem of extremely slow download speeds over a 100Mb ethernet connection from my Linux box to any other machine on the network using Samba. I am posting my experiences since I found many other people in the forums who appear to have the same problem, although I suspect not all will find the solution to my particular problem helpful. It's probably a case of many people with the same symptoms, but different sicknesses.

I have a Netgear DG834G ADSL router with two machines running Windows XP and one running Linux. The Linux box is basically the file repository, which frequently serves files up to the Windows machines. The problem was a seriously slow transfer rate over the network if any machine connected to the Linux box via Samba and attempted to download something. Transfer rates would literally be about 80Kb/s, maybe peaking at 300Kb/s.

There was no problem uploading data to a share from the Linux machine, nor was there any problem with a different protocol (FTP, for example). Copying over SSH was also rather slow, however.

I was very confused by this, but the problem was very easy to solve after a lot of tests and guessing. It turned out that the Samba and SSH servers (smbd and sshd, respectively) were listening on the local network, the default network, or both. This caused the serious slow down.

This is some abbreviated output from netstat for smbd before I fixed the problem:

Code:

Active Internet connections (servers and established)
Proto Recv-Q Send-Q    Local Address           Foreign Address         State                                         
tcp        0          0           0.0.0.0:139               0.0.0.0:*               LISTEN                               
tcp        0          0           192.168.0.2:139        0.0.0.0:*               LISTEN


To fix it, I simply commented out the "interfaces" line in /etc/samba/smb.conf. I restarted samba and the netstat output contained only the following for smbd:

Code:

Active Internet connections (servers and established)
Proto Recv-Q Send-Q    Local Address           Foreign Address         State                                         
tcp        0          0           0.0.0.0:139               0.0.0.0:*               LISTEN                               


A similar solution fixed the slow transfer over SSH by commenting out the "ListenAddress" lines in /etc/ssh/sshd_config.

The problem was that after I bought the router, I ended up changing my network. More precisely, my Linux machine was no longer the router/gateway, so some of the configurations for smbd and sshd needed to be adjusted. I adjusted them by no longer binding them to specific networks and just having them listen on all interfaces (which was since reduced to just one).

Hopefully, this is helpful to someone out there, since there appeared to be many stories of slow network transfer rates related to Samba in the forums.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum