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 size). 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 obvious) Any ideas what's going on and what to do about it?
maybe some people would be adventurous enough to just try it out: - Create a 1Gb file on a Samba server (dd if=/dev/zero of=1gm.tmp bs=1024k count=1024) - Use a windows client to copy the file to a local disk and measure the time it takes to transfer the data - copy the file back to a share on the Samba server and again measure the time - post your results here I assume that some more people would notice a problem somewhere ... Regards, Peter Daum Peter Daum wrote:> 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 > size). > > 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 > obvious) > > Any ideas what's going on and what to do about it?
Sebastian Held
2006-Oct-05 14:35 UTC
[Samba] Re: Horrible write performance from XP to Samba
Hi, Am Donnerstag, 5. Oktober 2006 14:56 schrieb Peter Daum:> maybe some people would be adventurous enough to just try it out:My results (only 1 measurement taken) WinXP64 -> Samba-3.0.23b/SuSE-Linux-9.2: 2:08 min => 8192 kiB/s (smbd @18% CPU) other direction: 2:21 min => 7437 kiB/s (smbd @10% CPU) Samba -> Win2k: 4:52 min => 3591 kiB/s (smbd @5% CPU) Win2k -> Samba: 2:22 min => 7384 kiB/s (smbd @15% CPU) The windows machines are not the same. compare to nfs performance: Samba machine -> other nfs machine: 1:58 min => 8886 kiB/s other direction: 1:55 min => 9118 kiB/s br, Sebastian -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.samba.org/archive/samba/attachments/20061005/abb7d059/attachment.bin
Jeremy Allison
2006-Oct-05 17:05 UTC
[Samba] Re: Horrible write performance from XP to Samba
On Thu, Oct 05, 2006 at 03:55:00PM +0200, Sebastian Held wrote:> Hi, > > Am Donnerstag, 5. Oktober 2006 14:56 schrieb Peter Daum: > > maybe some people would be adventurous enough to just try it out: > > My results (only 1 measurement taken) > WinXP64 -> Samba-3.0.23b/SuSE-Linux-9.2: 2:08 min => 8192 kiB/s (smbd > @18% CPU) > other direction: 2:21 min => 7437 kiB/s (smbd @10% CPU) > > Samba -> Win2k: 4:52 min => 3591 kiB/s (smbd @5% CPU) > Win2k -> Samba: 2:22 min => 7384 kiB/s (smbd @15% CPU) > > The windows machines are not the same. > > compare to nfs performance: > Samba machine -> other nfs machine: 1:58 min => 8886 kiB/s > other direction: 1:55 min => 9118 kiB/sUnless the "other nfs machine" is also windows this is an apples to oranges comparison. If you want an apples to apples comparison compare using cifsfs on the linux client as your cifs client, not windows. Jeremy.
I am still desperately trying to figure out why I get such a horrible performance trying to copy files from XP to Samba (below is my original post to illustrate the context. Meanwhile, I found a pretty remarkable pattern in the network traces. Generally, the packets send from the XP machine look like this: 01: WriteAndXRequest 60 kBytes (1392 bytes payload) 02: 1460 bytes ... (usual time delta between 2 packets < 0.0001 secs) 42: 1460 bytes < < < < delta: 0.05 - 0.3 secs > > > > 43: last 188 bytes .. WriteAndXResponse from Samba machine, da capo It seems like what is slowing the transfer down so dramatically, is the long gap before the last 188 bytes are sent. I can't see anything reasonable the XP machine could be waiting for - it already got the ack for the last preceding packet. To emphasize again, this is not a general networking problem between the 2 machines; it only (at leas AFAIK) occurs when copying large files from Windows XP to Samba shares (and at that occasion I could reproduce it with all the Samba servers and XP clients that I checked so far) Any help would be greatly appreciated. Regards, Peter Daum> 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 > size). > > 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 > obvious) > > Any ideas what's going on and what to do about it? >
Martin Sundmacher
2006-Oct-09 12:43 UTC
[Samba] Re: Horrible write performance from XP to Samba
Peter Daum schrieb:> Any clues? >How about posting one of your smb.conf? Greetings Martin Sundmacher
Martin Sundmacher wrote:> Peter Daum schrieb: >> Any clues? >> > How about posting one of your smb.conf?... not particularly helpful, because the phenomenon is obviously not dependent on any particularly configuration and also occurs with a smb.conf that only defines the path for one share and keeps all the Samba default settings. Regards, Peter Daum