Re: [Samba] Samba - WinXP: slow transfers, partial solution
Alexander Tsvyashchenko wrote: Hello All, I'm running Samba 3.0.24 as PDC and file server on Gentoo Linux, AMD64, 2.6.19 kernel, 100MBit/s network, and experience quite slow file transfers from Samba to WinXP SP2 clients: the speed is varying, but is about 1-2Mb/s at best. I spent quite some time investigating the issue, here are the intermediate results: 1) This happens only when transferring _from_ _Samba_ to _WinXP_. All other combinations are unaffected: a) Transferring from WinXP to Samba server is at 10Mb/s. b) Transfering to/from Samba server from Gentoo Linux on the same PC where WinXP is installed (so, completely the same hardware and connection) is also at normal speed. c) Transferring to/from WinXP to the server where Samba is installed using any other protocol (such as HTTPS or SCP) is also at normal speed. 2) CPU is at almost idle level both at client and server, so it's not the issue. 3) If there is any other network activity, transfer speed is increased up to normal level: f.e. doing two simulteneous transfers from Samba server to WinXP client gives 5Mb/s at each transfer, as expected. 4) Running tcpdump on server while the transfer is performed improves transfer speed in about 1.5 - 3 times, but still not to the normal speed. 5) Playing with socket options does not give any results. Specifically, using advices from the article http://www.dd.iij4u.or.jp/~okuyamak/Documents/tuning.english.html about SO_SNDBUF does not improve situation (but read below). 6) tcpdump + tcptrace show that there are a lot of retransmissions, see dumps below. 7) I've tested several WinXP clients with different hardware, all with the same results. 8) Samba logs looks normal to me, nothing special. Points (3) and (5), and also the article about SO_SNDBUF tuning gave me an idea that there might be smth wrong with ACKs sent from WinXP. I've tried to search for problems with ACK delays in WinXP and found the following articles: http://support.microsoft.com/kb/328890 http://support.microsoft.com/kb/321098 Based on them, I've done the following changes in WinXP registry: - set TcpAckFrequency to 1 to switch off delayed ACKs - set TcpDelAckTicks to 0 to disable delayed ACKs timer These changes did not help on their own. But combining them with the change of SO_SNDBUF to 1500 suddenly improved the speeds up to about 6 Mb/s! It appeared that with these registry changes, setting SO_SNDBUF to any value in the range 1404 - 1872 gives the same speed of 6.0 - 6.4 Mb/s, while changing it even one byte lower / higher immmediately drops the speed to less than 1Mb/s. However, while this is partial solution I could live with, this is still not the normal speed, so I still would like to find the way to bring it to normal values. It seems that I'm not the only one who have similar problems: see BUGs 2117 and 3706 in Bugzilla, and discussion at Gentoo mailing list: http://forums.gentoo.org/viewtopic-p-2820556.html Please, let me know if any other information may be needed or if there are any other tests I can do to pin down the problem ... I'm attaching tcptrace logs for several sessions (all transfers are from Samba server to WinXP with registry changes applied, all transfers are done with the same file of the size 338Mb). 1) Samba - WinXP without SO_SNDBUF set. (note that due to the tcpdump effect the speed is higher than in reality, also please note big number of retransmits) TCP connection 3: host e:***client***:1314 host f:***server***:445 complete conn: no (SYNs: 0) (FINs: 0) first packet: Sat Apr 14 15:05:57.502839 2007 last packet: Sat Apr 14 15:07:53.234397 2007 elapsed time: 0:01:55.731558 total packets: 425593 filename: snd_buf_off.log e-f: f-e: total packets:175858 total packets:249735 ack pkts sent:175858 ack pkts sent:249735 pure acks sent: 164954 pure acks sent:8 sack pkts sent:0 sack pkts sent:0 dsack pkts sent: 0 dsack pkts sent: 0 max sack blks/ack: 0 max sack blks/ack: 0 unique bytes sent:690320 unique bytes sent: 356048963 actual data pkts: 10904 actual data pkts: 249727 actual data bytes:690320 actual data bytes: 356319077 rexmt data pkts: 0 rexmt data pkts: 195 rexmt data bytes: 0 rexmt data bytes: 270114 zwnd probe pkts: 0 zwnd probe pkts: 0 zwnd probe bytes: 0 zwnd probe
Re: [Samba] Samba - WinXP: slow transfers, partial solution
I'm running Samba 3.0.24 as PDC and file server on Gentoo Linux, AMD64, 2.6.19 kernel, 100MBit/s network, and experience quite slow file transfers from Samba to WinXP SP2 clients: the speed is varying, but is about 1-2Mb/s at best. I'm assuming for the rest of this that you mean MB/sec not Mb/sec when referencing transfer speeds... b) Transfering to/from Samba server from Gentoo Linux on the same PC where WinXP is installed (so, completely the same hardware and connection) is also at normal speed. So, you are running something in a VM? c) Transferring to/from WinXP to the server where Samba is installed using any other protocol (such as HTTPS or SCP) is also at normal speed. Define 'normal'... 2) CPU is at almost idle level both at client and server, so it's not the issue. 3) If there is any other network activity, transfer speed is increased up to normal level: f.e. doing two simulteneous transfers from Samba server to WinXP client gives 5Mb/s at each transfer, as expected. Again, define 'normal'? 100Mb network connections should give @ 12MB/sec transfer speeds, no? So 5MB/sec speeds are certainly not 'normal'. 4) Running tcpdump on server while the transfer is performed improves transfer speed in about 1.5 - 3 times, but still not to the normal speed. TCP dumps are fine, but you neglected to provide the most important thing for initial troubleshooting assistance: where is your config? 5) Playing with socket options does not give any results. Modern linux kernels (2.6+) do *not* need to have these values tuned, so it is recommended to not set them *at* *all*. Just delete these entries. Specifically, using advices from the article http://www.dd.iij4u.or.jp/~okuyamak/Documents/tuning.english.html about SO_SNDBUF does not improve situation (but read below). Well, since this article is dated from 2000, I don't think I'd trust it much. 6) tcpdump + tcptrace show that there are a lot of retransmissions, see dumps below. 7) I've tested several WinXP clients with different hardware, all with the same results. What about the NIC on the Samba server? If all clients are affected the same, then that is the NIC you should focus on (if it is indeed a hardware issue). 8) Samba logs looks normal to me, nothing special. Points (3) and (5), and also the article about SO_SNDBUF tuning gave me an idea that there might be smth wrong with ACKs sent from WinXP. I think you need to go back to square one, and start over, but with up to date references - like the excellent 'Samba-3 By Example' and/or 'The Official Samba-3 HOWTO and Reference Guide'. It seems that I'm not the only one who have similar problems: see BUGs 2117 and 3706 in Bugzilla, and discussion at Gentoo mailing list: http://forums.gentoo.org/viewtopic-p-2820556.html This too is an old(er) thread - and it specifically mentions switching from smbfs to cifs as the best solution... -- Best regards, Charles -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Samba - WinXP: slow transfers, partial solution
I have slow transfer from my samba serwer, casue my HDD wasn't running in UDMA mode, only in PIO, beside this a installed CentOS 4 and all 2 disks are running in UDMA mode and there isn't a issue with network speed between WINXP SP2 and samba serwer. Maybe check yours HDD too ? Cheers, I.Piasecki Charles Marcus pisze: I'm running Samba 3.0.24 as PDC and file server on Gentoo Linux, AMD64, 2.6.19 kernel, 100MBit/s network, and experience quite slow file transfers from Samba to WinXP SP2 clients: the speed is varying, but is about 1-2Mb/s at best. I'm assuming for the rest of this that you mean MB/sec not Mb/sec when referencing transfer speeds... b) Transfering to/from Samba server from Gentoo Linux on the same PC where WinXP is installed (so, completely the same hardware and connection) is also at normal speed. So, you are running something in a VM? c) Transferring to/from WinXP to the server where Samba is installed using any other protocol (such as HTTPS or SCP) is also at normal speed. Define 'normal'... 2) CPU is at almost idle level both at client and server, so it's not the issue. 3) If there is any other network activity, transfer speed is increased up to normal level: f.e. doing two simulteneous transfers from Samba server to WinXP client gives 5Mb/s at each transfer, as expected. Again, define 'normal'? 100Mb network connections should give @ 12MB/sec transfer speeds, no? So 5MB/sec speeds are certainly not 'normal'. 4) Running tcpdump on server while the transfer is performed improves transfer speed in about 1.5 - 3 times, but still not to the normal speed. TCP dumps are fine, but you neglected to provide the most important thing for initial troubleshooting assistance: where is your config? 5) Playing with socket options does not give any results. Modern linux kernels (2.6+) do *not* need to have these values tuned, so it is recommended to not set them *at* *all*. Just delete these entries. Specifically, using advices from the article http://www.dd.iij4u.or.jp/~okuyamak/Documents/tuning.english.html about SO_SNDBUF does not improve situation (but read below). Well, since this article is dated from 2000, I don't think I'd trust it much. 6) tcpdump + tcptrace show that there are a lot of retransmissions, see dumps below. 7) I've tested several WinXP clients with different hardware, all with the same results. What about the NIC on the Samba server? If all clients are affected the same, then that is the NIC you should focus on (if it is indeed a hardware issue). 8) Samba logs looks normal to me, nothing special. Points (3) and (5), and also the article about SO_SNDBUF tuning gave me an idea that there might be smth wrong with ACKs sent from WinXP. I think you need to go back to square one, and start over, but with up to date references - like the excellent 'Samba-3 By Example' and/or 'The Official Samba-3 HOWTO and Reference Guide'. It seems that I'm not the only one who have similar problems: see BUGs 2117 and 3706 in Bugzilla, and discussion at Gentoo mailing list: http://forums.gentoo.org/viewtopic-p-2820556.html This too is an old(er) thread - and it specifically mentions switching from smbfs to cifs as the best solution... -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Samba - WinXP: slow transfers, partial solution
Hello Charles, file transfers from Samba to WinXP SP2 clients: the speed is varying, but is about 1-2Mb/s at best. I'm assuming for the rest of this that you mean MB/sec not Mb/sec when referencing transfer speeds... Yes, that is correct, sorry for confusion. b) Transfering to/from Samba server from Gentoo Linux on the same PC where WinXP is installed (so, completely the same hardware and connection) is also at normal speed. So, you are running something in a VM? No, I just have both WinXP and Gentoo Linux installed on client, booted first in WinXP and then in Gentoo and tested for each of them transfer speeds to Samba on server. c) Transferring to/from WinXP to the server where Samba is installed using any other protocol (such as HTTPS or SCP) is also at normal speed. Define 'normal'... More or equal to 10 MB/s, see trace logs in my original letter, SCP speed is listed in the last trace log. 3) If there is any other network activity, transfer speed is increased up to normal level: f.e. doing two simulteneous transfers from Samba server to WinXP client gives 5Mb/s at each transfer, as expected. Again, define 'normal'? 100Mb network connections should give @ 12MB/sec transfer speeds, no? So 5MB/sec speeds are certainly not 'normal'. They are, as 5+5=10, transfers are done _simultaneously_. 10MB/s is of course less than 12MB/s, but I do not consider 10MB/s speed, including protocol overhead, to be particularly slow. TCP dumps are fine, but you neglected to provide the most important thing for initial troubleshooting assistance: where is your config? As I've experimented a lot with different config options, I do not really think that there's still left smth related to speed I missed to try, and also it doesn't look like misconfiguration issue, as I've used as the basis default smb.conf provided in Gentoo distribution, but you're right - I cannot be sure as I'm not really experienced with Samba, sorry about that. My config is attached in the end of e-mail. 5) Playing with socket options does not give any results. Modern linux kernels (2.6+) do *not* need to have these values tuned, so it is recommended to not set them *at* *all*. Just delete these entries. Yes, I read these options should not be needed, but if you read my original e-mail till the end, you should have noticed there options *did* play role in my setup. Specifically, using advices from the article http://www.dd.iij4u.or.jp/~okuyamak/Documents/tuning.english.html about SO_SNDBUF does not improve situation (but read below). Well, since this article is dated from 2000, I don't think I'd trust it much. That's correct, but this is the only information I was able to find initially that seemd to be more or less relevant to my problem :-( 7) I've tested several WinXP clients with different hardware, all with the same results. What about the NIC on the Samba server? If all clients are affected the same, then that is the NIC you should focus on (if it is indeed a hardware issue). Theorecitally, this *could* be the possibility, but I doubt this is hardware issue, as the problem seems to happen in very particular environment - if there were problems with NIC, I would expect at least some sign of it in other applications, but there is none. I did not state it in the original e-mail, but hardware statistic, listed by ifconfig for the interface is fine - no collisions, errors, or whatever. The NIC on server is on-board Realtek RTL8111B (Gigabit), using default Linux Realtek 8169 driver, all options are by default, communication with clients happens through BCM5325e switch (100 Mbit), which is part of Asus Wl-500g Deluxe router, also no problems noted there. I think you need to go back to square one, and start over, but with up to date references - like the excellent 'Samba-3 By Example' and/or 'The Official Samba-3 HOWTO and Reference Guide'. While I can agree that everyhing is possible, I do not think I was lucky enough to screw the default config that much ;-) As you can see from my config, the main changes there were authentication-related, to use LDAP server, and changes related to PDC. I cannot be 100% sure, but I do not see the way how use of LDAP server or PDC-related options could lead to particularly high number of TCP packets retransmissions in communication between client and Samba ... Here's the config. LDAP user/group managing scripts are not specified in config as I've configured all users/groups once and there should be no changes in foreseeable future. ***text*** denotes my specific site information. smb.conf= [global] workgroup = ***WORKGROUP-NAME*** netbios name = ***SERVER-NAME*** server string = PDC [on Gentoo :: Samba server %v] printcap name = load printers = no printing = log file = /var/log/samba/log.%m max log size = 50 log level = 3 hosts allow =
Re: [Samba] Samba - WinXP: slow transfers, partial solution
I have slow transfer from my samba serwer, casue my HDD wasn't running in UDMA mode, only in PIO, beside this a installed CentOS 4 and all 2 disks are running in UDMA mode and there isn't a issue with network speed between WINXP SP2 and samba serwer. Maybe check yours HDD too ? Thanks for the idea, but I'm afraid this is not the case in my situation, as HDD is certainly capable of delivering the required speed. (to be 100% sure I've just done traditional dd if=***big-file*** of=/dev/null test on server, the same file I used for transfers speeds measurements, the speed is 42 MB/s) Good luck! Alexander This message was sent using IMP, the Internet Messaging Program. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Samba - WinXP: slow transfers, partial solution
Alexander Tsvyashchenko napisaĆ(a): I have slow transfer from my samba serwer, casue my HDD wasn't running in UDMA mode, only in PIO, beside this a installed CentOS 4 and all 2 disks are running in UDMA mode and there isn't a issue with network speed between WINXP SP2 and samba serwer. Maybe check yours HDD too ? Thanks for the idea, but I'm afraid this is not the case in my situation, as HDD is certainly capable of delivering the required speed. (to be 100% sure I've just done traditional dd if=***big-file*** of=/dev/null test on server, the same file I used for transfers speeds measurements, the speed is 42 MB/s) Good luck! Alexander I have noticed too, that antyvirus software can cause slowdown transfer from samba serwer. fer example Panda Atyvirus titanium 2005 - it scans everyting, even files from samba share, i'm screew up this software, because my samba network was slownd down. Do You have any antyvirus software, that scan smb shares, when files are accessing ? I.Piasecki This message was sent using IMP, the Internet Messaging Program. --To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Samba - WinXP: slow transfers, partial solution
Hello All, I'm running Samba 3.0.24 as PDC and file server on Gentoo Linux, AMD64, 2.6.19 kernel, 100MBit/s network, and experience quite slow file transfers from Samba to WinXP SP2 clients: the speed is varying, but is about 1-2Mb/s at best. I spent quite some time investigating the issue, here are the intermediate results: 1) This happens only when transferring _from_ _Samba_ to _WinXP_. All other combinations are unaffected: a) Transferring from WinXP to Samba server is at 10Mb/s. b) Transfering to/from Samba server from Gentoo Linux on the same PC where WinXP is installed (so, completely the same hardware and connection) is also at normal speed. c) Transferring to/from WinXP to the server where Samba is installed using any other protocol (such as HTTPS or SCP) is also at normal speed. 2) CPU is at almost idle level both at client and server, so it's not the issue. 3) If there is any other network activity, transfer speed is increased up to normal level: f.e. doing two simulteneous transfers from Samba server to WinXP client gives 5Mb/s at each transfer, as expected. 4) Running tcpdump on server while the transfer is performed improves transfer speed in about 1.5 - 3 times, but still not to the normal speed. 5) Playing with socket options does not give any results. Specifically, using advices from the article http://www.dd.iij4u.or.jp/~okuyamak/Documents/tuning.english.html about SO_SNDBUF does not improve situation (but read below). 6) tcpdump + tcptrace show that there are a lot of retransmissions, see dumps below. 7) I've tested several WinXP clients with different hardware, all with the same results. 8) Samba logs looks normal to me, nothing special. Points (3) and (5), and also the article about SO_SNDBUF tuning gave me an idea that there might be smth wrong with ACKs sent from WinXP. I've tried to search for problems with ACK delays in WinXP and found the following articles: http://support.microsoft.com/kb/328890 http://support.microsoft.com/kb/321098 Based on them, I've done the following changes in WinXP registry: - set TcpAckFrequency to 1 to switch off delayed ACKs - set TcpDelAckTicks to 0 to disable delayed ACKs timer These changes did not help on their own. But combining them with the change of SO_SNDBUF to 1500 suddenly improved the speeds up to about 6 Mb/s! It appeared that with these registry changes, setting SO_SNDBUF to any value in the range 1404 - 1872 gives the same speed of 6.0 - 6.4 Mb/s, while changing it even one byte lower / higher immmediately drops the speed to less than 1Mb/s. However, while this is partial solution I could live with, this is still not the normal speed, so I still would like to find the way to bring it to normal values. It seems that I'm not the only one who have similar problems: see BUGs 2117 and 3706 in Bugzilla, and discussion at Gentoo mailing list: http://forums.gentoo.org/viewtopic-p-2820556.html Please, let me know if any other information may be needed or if there are any other tests I can do to pin down the problem ... I'm attaching tcptrace logs for several sessions (all transfers are from Samba server to WinXP with registry changes applied, all transfers are done with the same file of the size 338Mb). 1) Samba - WinXP without SO_SNDBUF set. (note that due to the tcpdump effect the speed is higher than in reality, also please note big number of retransmits) TCP connection 3: host e:***client***:1314 host f:***server***:445 complete conn: no (SYNs: 0) (FINs: 0) first packet: Sat Apr 14 15:05:57.502839 2007 last packet: Sat Apr 14 15:07:53.234397 2007 elapsed time: 0:01:55.731558 total packets: 425593 filename: snd_buf_off.log e-f: f-e: total packets:175858 total packets:249735 ack pkts sent:175858 ack pkts sent:249735 pure acks sent: 164954 pure acks sent:8 sack pkts sent:0 sack pkts sent:0 dsack pkts sent: 0 dsack pkts sent: 0 max sack blks/ack: 0 max sack blks/ack: 0 unique bytes sent:690320 unique bytes sent: 356048963 actual data pkts: 10904 actual data pkts: 249727 actual data bytes:690320 actual data bytes: 356319077 rexmt data pkts: 0 rexmt data pkts: 195 rexmt data bytes: 0 rexmt data bytes: 270114 zwnd probe pkts: 0 zwnd probe pkts: 0 zwnd probe bytes: 0 zwnd probe bytes: 0 outoforder pkts: 0 outoforder pkts: 0 pushed data pkts: 10904