Dmitri Pechkin
2006-Jun-25 21:04 UTC
[Samba] 10-fold speed drop while transferring large files from Windows to Samba server
Hi All, I have a Linux box (P3-800MHz/196MB RAM/10GB+320GB) running Samba 3.0.22 server and a Windows XP (P3-800MHz/512MB RAM/200GB) client. The transfer speed (both ways) is about 5-7 MB/s when file is smaller than 700MB. For larger files there is a difference: when the Win client writes a file on the small Linux disk (10GB) the speed is as above. But when I copy, let's say, a 1.5GB file from Win to the 320GB disk on Linux the speed is 7 MB/s for the first 50% of the trasfer and then it drops down to 600 KB/s. Here is an vmstat log of the session: procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 0 0 85552 17676 1760 78844 0 0 4 3291 5583 5817 4 22 69 5 0 1 85632 1184 1152 95876 0 8 2 6788 8327 9078 6 36 16 42 0 1 85632 524 624 97168 0 0 0 6934 8682 9466 5 38 6 52 0 1 85632 484 552 97156 0 0 4 7190 8591 9441 5 38 6 51 0 5 85632 904 752 95776 8 0 44 7126 8850 9739 5 39 5 51 0 2 85632 1228 1308 95156 3 0 262 7230 8932 9882 15 41 6 38 0 1 85632 420 988 96612 0 0 12 7156 8762 9665 5 39 6 50 1 2 85632 532 744 96760 0 0 10 7251 8807 9828 5 39 6 50 1 1 85632 520 724 96800 0 0 8 7534 9110 10189 5 40 6 50 0 1 85632 1012 840 96172 0 0 7 7332 8947 10018 5 40 7 49 0 2 85632 1204 1520 94368 0 0 72 5060 7633 8387 5 33 7 55 1 2 85632 1812 7048 82392 0 0 552 2 1148 470 2 2 0 96 1 0 85632 1260 10168 76360 0 0 315 1888 1395 612 2 46 1 51 1 0 85632 1040 10184 76676 2 0 3 610 1597 803 3 94 2 2 2 0 85632 1008 10200 76708 1 0 2 606 1598 809 2 94 2 1 1 0 85632 1228 10212 76484 0 0 0 612 1599 815 3 93 3 1 1 1 85632 1456 10216 76356 0 0 0 606 1602 807 2 94 2 2 1 1 85632 1232 10212 76588 0 0 1 592 1600 810 2 95 2 1 2 1 85632 1248 10188 76596 0 0 0 595 1600 838 3 93 2 2 1 1 85632 1312 10776 75916 0 0 564 807 1666 955 3 93 1 3 1 1 85632 1428 10852 75628 0 0 52 594 1614 838 3 94 2 1 2 1 85632 1520 10864 75496 0 0 0 596 1601 814 2 94 2 1 1 0 85632 1596 10808 75512 0 0 1 597 1595 830 3 94 2 1 1 1 85632 1016 10780 76076 0 0 0 600 1568 650 2 95 2 1>From the above report, the CPU use jumps from 35-40% to 95% and 'top'shows that it attributes entirely to the 'smbd' process. Here is my smb.conf: ================== smb.conf =====================[root@pioneer samba]# /opt/samba-3.0.22/bin/testparm </etc/samba/smb.conf Load smb config files from /opt/samba-3.0.22/lib/smb.conf Processing section "[homes]" Processing section "[printers]" Processing section "[samba]" Loaded services file OK. WARNING: passdb expand explicit = yes is deprecated Server role: ROLE_STANDALONE Press enter to see a dump of your service definitions [global] server string = Samba Server password server = None username map = /etc/samba/smbusers log file = /var/log/samba/%m.log max log size = 50 socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 printcap name = /etc/printcap dns proxy = No remote announce = 192.168.1.255 idmap uid = 16777216-33554431 idmap gid = 16777216-33554431 hosts allow = 192.168.1. cups options = raw [homes] comment = Home Directories read only = No browseable = No [printers] comment = All Printers path = /var/spool/samba printable = Yes browseable = No [samba] path = /home/samba read only = No ================== smb.conf ===================== Googling for similar problems, I found some people reporting such behaivor but I was not able to find any suggestions how to fix the issue. I am thinking to add some more memory but not sure whether it would help. Important note, that in my case this problem happens ONLY with the large 320GB hard drive, not with the small one. I very appreciate any suggestions to resolve this problem. Regards, Dmitri
Jeremy Allison
2006-Jun-26 19:30 UTC
[Samba] 10-fold speed drop while transferring large files from Windows to Samba server
On Sun, Jun 25, 2006 at 05:04:11PM -0400, Dmitri Pechkin wrote:> Hi All, > > I have a Linux box (P3-800MHz/196MB RAM/10GB+320GB) running Samba > 3.0.22 server and a Windows XP (P3-800MHz/512MB RAM/200GB) client. > > The transfer speed (both ways) is about 5-7 MB/s when file is smaller > than 700MB. For larger files there is a difference: when the Win client > writes a file on the small Linux disk (10GB) the speed is as above. But > when I copy, let's say, a 1.5GB file from Win to the 320GB disk on > Linux the speed is 7 MB/s for the first 50% of the trasfer and then it > drops down to 600 KB/s. Here is an vmstat log of the session:vmstat doesn't help. What would help is an ethereal trace of the initial open.... I'm wondering if it has FILE_WRITE_THROUGH set on the inital create ?> socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192This is voodoo - no reason to set these that I can see. Please delete this. Jeremy.