Giovani Moda - MR Informática
2008-Feb-01 18:04 UTC
[Samba] Samba + BDE and slow speed on reading (long)
Hello list. I'm new here, and I'm joining because I'm having a problem wich I can't figure out the solution myself. Here's what's happening: A Samba 3.0.24 is serving files to seven Windows XP clients. Three of those clients run an application with a BDE database. The problem is that when running this application on Samba, it gets very, VERY slow, causing it to hang. I have noticed also an unusual low speed when receiving files from the samba server over network. When sending files to the server, the speed is OK. Since the databases used by that apllication have about 50Mb each, the problem must be caused by that slow speed on receiving files from the server. I've twiked the configuration a bit, and came to this results: socket options = SO_RCVBUF=65535 SO_SNDBUF=65535 TCP_NODELAY IPTOS_LOWDELAY - Very slow on reading, fast when writing socket options = TCP_NODELAY IPTOS_LOWDELAY - still slow on read, but a little better. Fast when writing socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=32768 - significant improvement when reading files, but the application still hangs due to the slow speed. Fast when reading. socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=32768 SO_RCVBUF=32768 - same as above, but writing speed shows deterioration. Other significant parameters: max connections = 50 dos filetimes = yes max open files = 4000 nt acl support = yes preserve case = yes strict locking = no deadtime = 15 unix charset = iso8859-1 display charset = cp850 oplocks = no kernel oplocks = no level2 oplocks = no local master = yes os level = 64 domain master = yes time server = yes preferred master = yes domain logons = yes name resolve order = wins bcast host lmhosts wins support = yes wins proxy = yes dns proxy = no So, I went for socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=32768 and got these results: Copying a 45678592 bytes throug samba, it takes from 45 to 60 seconds to transfer. The same file though FTP takes only 3.9 seconds. I know FTP is the fastest protocol and cannot be compared to samba, but still, that's a HUGE difference. As a desperate measure, I've copied the whole database to a XP machine, shared the folder to the network, mapped it to the other stations, and the application runs perfectly again. Conclusion: there's definitely a problem when readind files from samba server. It's not network related, since FTP is really fast, and when serving the database from XP, the speed is OK too. The server is a brand new Core 2 Duo E4500, 2GB RAM, 160 GB HD SATAII. The switch is also new. The distro in question is FC5. As a related topic, I've came across a situation (two times and couting) when writing files to the samba server is painfully slow. On both cases, setting SO_RCVBUF=1 has resolved the problem. I don't know why, but it did. Both times, the server was connected to a D-Link DES-1024 switch. Switching NIC's and cables had no effect, but SO_RCVBUF=1 solved it instantly. Could it be related tho this version of samba and the problem I'm having now? Any thoughts? Thanks, Giovani Moda
damiend@mckennagroup.co.uk
2008-Feb-07 08:06 UTC
[Samba] Samba + BDE and slow speed on reading (long)
there are five things you need to look at 1) are your hdd tuned up look in your syslog for disk problems. 2) socket options apparently shouldn't be used with Linux 2.6 kernels 3) switching off oplocks stops client side caching have you got oplocks on on the xp host also ?? 4) TCP window size on your XP host are they set to the highest possible ? 5) Realtek NIc are know to be poor in speed and reliability consider a better one. -------------------------------------------------------------------------- Damien Dye BSC(hon) IT and Telecommunications Engineer Mckenna Group Lawn Road Industrial Estate Lawn Road Carlton-in-Lindrick Worksop Nottinghamshire United Kingdom S81 9LB Email : damiend@mckennagroup.co.uk Tel : (44) 01909541414 Direct : (44) 01909541462 Fax : (44) 01909541415 Web : www.mckennagroup.co.uk Company Registered in England, McKenna Precision Castings Ltd Company Registration Number 1713320 Registered address Lawn Road, Carlton-in-Lindrick, Worksop, Notts, S81 9LB -------------------------------------------------------------------------- -------- Original Message -------- Subject: [Samba] Samba + BDE and slow speed on reading (long) (06-Feb-2008 15:32) From: giovani@mrinformatica.com.br To: damiend@mckennagroup.co.uk> Hello list. > > I'm new here, and I'm joining because I'm having a problem wich I can't > figure out the solution myself. Here's what's happening: > > A Samba 3.0.24 is serving files to seven Windows XP clients. Three of those > > clients run an application with a BDE database. The problem is that when > running this application on Samba, it gets very, VERY slow, causing it to > hang. I have noticed also an unusual low speed when receiving files from > the > samba server over network. When sending files to the server, the speed is > OK. Since the databases used by that apllication have about 50Mb each, the > problem must be caused by that slow speed on receiving files from the > server. > > I've twiked the configuration a bit, and came to this results: > > socket options = SO_RCVBUF=65535 SO_SNDBUF=65535 TCP_NODELAY > IPTOS_LOWDELAY - Very slow on reading, fast when writing > socket options = TCP_NODELAY IPTOS_LOWDELAY - still slow on read, but a > little better. Fast when writing > socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=32768 - significant > improvement when reading files, but the application still hangs due to the > slow speed. Fast when reading. > socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=32768 > SO_RCVBUF=32768 - same as above, but writing speed shows deterioration. > > Other significant parameters: > > max connections = 50 > dos filetimes = yes > max open files = 4000 > nt acl support = yes > preserve case = yes > strict locking = no > deadtime = 15 > unix charset = iso8859-1 > display charset = cp850 > oplocks = no > kernel oplocks = no > level2 oplocks = no > local master = yes > os level = 64 > domain master = yes > time server = yes > preferred master = yes > domain logons = yes > name resolve order = wins bcast host lmhosts > wins support = yes > wins proxy = yes > dns proxy = no > > > So, I went for socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=32768 > and got these results: > > Copying a 45678592 bytes throug samba, it takes from 45 to 60 seconds to > transfer. The same file though FTP takes only 3.9 seconds. I know FTP is > the > fastest protocol and cannot be compared to samba, but still, that's a HUGE > difference. > > As a desperate measure, I've copied the whole database to a XP machine, > shared the folder to the network, mapped it to the other stations, and the > application runs perfectly again. > > Conclusion: there's definitely a problem when reading files from samba > server. It's not network related, since FTP is really fast, and when > serving > the database from XP, the speed is OK too. The server is a brand new Core 2 > > Duo E4500, 2GB RAM, 160 GB HD SATAII, NIC Realtek r8169 connected to a > DES-1008D Gigabit Switch. The distro in question is FC5 fully updated. > > As a related topic, I've came across a situation (two times and couting) > when writing files to the samba server is painfully slow. On both cases, > setting SO_RCVBUF=1 has resolved the problem. I don't know why, but it did. > > Both times, the server was connected to a D-Link DES-1024 switch. Switching > > NIC's and cables had no effect, but SO_RCVBUF=1 solved it instantly. Could > it be related tho this version of samba and the problem I'm having now? > > Any thoughts? > > Thanks, > > Giovani Moda > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/listinfo/samba > > To: samba@lists.samba.org