[Samba] samba 3.0.7 on linux with gigabit = very slow upload speed

Krister Söderström imz at ludd.luth.se
Mon Nov 1 13:27:40 GMT 2004

Here's the problem in a nutshell:

One samba-server (stand alone)
A couple of Windows XP (sp2) clients
All connected through a gigabit network

Transfers between two of the windows computers works just fine and the 
speed is about 20-30MB/s.
Transfers from the server to any windows computer also works fine and 
has the same speed.
Transfers TO the server from any windows computer is horribly slow 
(under 1MB/s).
BUT if a try to unpack a rar-file using winrar directly to the server 
the transfer speed is the "normal" 20-30MB/s.

The specifics:
I've used the word "upload" as transfering a file from a windows client 
to smb-server.  And "download" is the opposite of course.

Samba server:
Athlon 64 with 1,5 gig of ram. The problem occurs with both slackware 
10, default install (32bit) and with a 64-bits compile of gentoo. I've 
also tested with slackwares precompiled samba-package (3.0.4), compiling 
the soure 3.0.7 under both slackware and 64-bit gentoo. But the upload 
speed is consistent.

Barton 2500+ and better. 512Mb ram or more.

Gigabit copper. There's no other problem with the network. No packet 
errors or other to indicate any hardware trouble. Testing to run nfs 
from a linux-client against the samba-server gives a transfer speed (in 
both directions) of 40MB/s.

What I've tried so far:
When the problem occurs, ie. uploading a file to the server, none of the 
cpus are working more than 2-3%. There's no strange output in the samba 
logfiles or any indication of network troubles (like collisions, packet 
errors and so on).

I dumped a download and an upload with tcpdump and looked at it with 
ethereal. But i couldn't see anything strange except one thing. I know 
too little about the smb-protocoll to dicide whether the logs indicate a 
problem or not but they are included at the bottom in case anyone has 
any suggestions.

I have also tried a lot of configuration options. Including default 
configuration, sendfile on/off, and a bunch of different protocoll and 
tuning options. But it doesn't seem to make any difference, at least not 
for the upload speed.

Uploading multiple files in parallell helps a little but the total 
upload speed never goes above 3MB/s.

To exclude some of the hardware on the server I have also tried 
uploading files to a ram-disk (using ramfs) but it didn't change 
anything but the download speed.

TCPdump files
I only exported a litte piece of the transfer. If there's something 
missing let me know.

More information about the samba mailing list