[Samba] Horrible write performance from XP to Samba

Peter Daum gator_ml at yahoo.de
Mon Oct 2 07:30:43 GMT 2006

I noted an extremely poor performance when copying big files from
a windows xp client to a samba share. The exact version of samba
does not seem to matter: I tried several different samba servers
with versions between 3.014 and 3.0.23b running on Linux 2.4.32
and 2.6.17 (machines and network otherwise idle, clients connected
via fast ethernet, servers via Gbit; network performance in both
directions around 95 Mbit/s). I made several tests copying a 1GB
file with Windows 98 and Windows XP clients. Reading the file from
the server takes predictably around 105 seconds (~9.75 MB/s).

Writing to the server takes only slightly longer on Win98 (130
seconds, ~8 MB/s) while the same takes approximately 45 minutes
from a XP client (I don't know whether this matters, I noted that
on the XP write test, the directory listing on the server
immediately shows a file with the final size - obviously a sparse
file, repeatedly invoking du shows the gradually increasing actual

I wrote a little test program that just writes data to a file and
shows the throughput; the transfer rates I get that way are pretty
reasonable, so it is not a general problem but something that only
occurs on specific operations like copying.

Tracing the network traffic also didn't tell me what the problem
might be: XP uses for copying as well as for other write
operations WriteAndXRequest, the only peculiarity I noticed is the
slightly exotic block size of 61440 bytes per request when copying
(which also doesn't seem to be the problem - Win98 uses the same
block size with WriteRaw)

Has anybody else made similar experiences? (Since I could see this
issue with differently configured servers/clients, it should not
be just my personal problem. Of course in most settings where the
data usually goes mostly from the server to the client it is not

Any ideas what's going on and what to do about it?

More information about the samba mailing list