Dragan Krnic
2003-Jul-28 10:07 UTC
[Samba] Re: Marginal write performance & pauses in outgoing transfers
>Thanks a lot for your reply. Alright, it was not a >bug in Samba after all. You were right, I was wrong, >excuse me for blaming Samba and being an idiot :) >But please read on, because I'm still lost here.It's all right to feel repentant but don't exaggerate. You are OK, only a little stressed.>As I expected, this was not an issue with my physical >network setup or topology. These machines are on the >same desk with no routers in the middle, and my hub >might be old and suck but, as I had said, I can >achieve equal incoming/outgoing transfer rates with >other protocols such as FTP. By the way, by "there >are no collissions" I meant "no more collissions than >normal", just to remark that it wasn't a duplex or >network problem.OK.>This is what I did: I installed Windows XP in a >virtual machine (VMware) running inside the Windows >2000 box that was receiving from Samba at 100 KB/s, >with bridged networking. I transferred from Samba to >the virtual XP machine, and... consistent transfer, >with no pauses and very close to 10 mbps. It's still >the same physical computer and network card receiving >the traffic, but it's another OS picking it up.Of course, XP is supposed to be an improvement upon 2k, but that does not account fully for your problems.>So, my network was fine and there's something wrong >with my Windows 2000 installation, which means I'm >most likely going to be stuck with one of those >sticky Windows-like problems.Not necessarily. Have patience and take an unbiased look at your configuration. It may take some time but you can get it to work properly for sure.>This is a log generated by tcpdump for the transfer >of a 6 MB file from Samba to Windows 2000. It >includes the initial process of me hitting Ctrl+C on >the selected file and pasting it in a different >directory on the Win2k box. Win2k took about 3 >seconds just to copy the link to the clipboard before >turning the hourglass back into the normal pointer >(I know these terms sound lame but hey, it's Windows). > >http://nss.sytes.net/slow.smb.tcpdump.01.log > >Note how there are certain whole seconds where >there's no traffic at all, and some others where just >three or four packets go through.If necessary, use ethereal next time and store the fully detailed display in a print file. After compression it is much smaller. Your observation is correct, there are long pauses between payloads, but I don't see what it's waiting for.>Browsing a directory on a Samba share from the Win2k >box is really sloppy too: sometimes (at random), it >takes Windows a couple of seconds to retrieve >information on a file when selecting it, such as size >and whatever it shows in the status bar for the >currently selected file. Watching the hub's activity >LED indicates the presence of the evil traffic pauses >between packets.It's best to suppress the pop-up info in the file browser (clear the box at Options->Folder options->View->Popup-info) even when you don't have problems.>The main reason why I didn't want to send over my >smb.conf is that I had tried so many combinations >that I didn't know which to pick, but here's what I >had been always using: > >http://nss.sytes.net/smb.confIt's a clean little smb.conf. I don't believe those 8k buffer specifications in socket options do much good, but they're probably irrelevant. Therefore throw them out. On the other hand I wouldn't exclude "SO_KEEPALIVE" from socket options, so add it. I don't know what "dead time" does, but if you're sure you do, it's another toggle you can use in tests. I don't see much use for "interfaces" and "bind interfaces only". If you only have one NIC, you almost certainly don't need them. But who's the browser master in your workgroup? If you leave it undefined, then any of your clients will claim it and there'll be some broadcast storms from time to time when they're settling the issue who shall win the election. You should add the following options in [global]: wins support = Yes preferred master = Yes domain master = True and tell your clients to never start elections. That's "MaintainServerList"="No" under HKLM key SYSTEM\CurrentControlSet\Services\Browser\Parameters in the Win2K registry. I wish you good luck. ____________________________________________________________ Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005
Nicolas Gieczewski
2003-Jul-29 03:59 UTC
[Samba] Re: Marginal write performance & pauses in outgoing transfers
> If necessary, use ethereal next time and store the > fully detailed display in a print file. After compression it > is much smaller. Your observation is correct, there are > long pauses between payloads, but I don't see what it's > waiting for.I'll try that when I get some more time and post the results here, but I doubt we'll find anything fixable (yep, I'm the pessimistic kind). Actually, I'm starting to doubt Win2k SP4 regarding this issue. I'm not certain it's what caused the problem, but I installed it like last week and I've read many posts on different places about all the problems it's caused to thousands of people (much more serious than mine in many cases). It's a shame I hadn't used Samba to transfer large files for weeks, so now I'm not sure if things broke before or after I installed SP4, but there's a possibility it has something to do with this. The worst thing I could have done is delete the SP3 backup files one day before I found out about this problem. *sniffles*> It's best to suppress the pop-up info in the file browser (clear the box > at Options->Folder options->View->Popup-info) even when you don't > have problems.Pop-up info is alright, and I use it often actually. It's the status bar info what causes the slowdown while I have this problem and scroll through the files with the arrow keys (I use my keyboard extensively anywhere I can avoid using the mouse :) When I didn't have this problem, though, that wasn't an issue. It was nearly as fast as it is for local files. It doesn't really bother me that much anyway.> It's a clean little smb.conf. I don't believe those > 8k buffer specifications in socket options do much > good, but they're probably irrelevant. Therefore throw > them out. On the other hand I wouldn't exclude > "SO_KEEPALIVE" from socket options, so add it. I don't > know what "dead time" does, but if you're sure you do, > it's another toggle you can use in tests.Been there, done that. I've fiddled with exactly all the settings you mentioned and tried all possible combinations (I even made up a table to make sure I didn't skip any). Absolutely none of them had an effect on the traffic pauses, it was just the buffer settings which caused an impact on the size of the data bursts in between the pauses but, as I had previously said, the pauses were never affected. *bangs head against keyboard*> I don't see much use for "interfaces" and "bind interfaces only". > If you only have one NIC, you almost certainly don't need them.I have two NICs, and as paranoid as I am, I always restrict all my daemons only to that/those interface(s) where I need them to be listening. Even syslogd is restricted to listening only on the loopback interface and on one of my NICs where my Cisco DSL modem is connected, which logs to syslog. However, I think I even commented out that stuff while testing as a last resort. I've tried literally everything.> But who's the browser master in your workgroup? If you > leave it undefined, then any of your clients will claim it and > there'll be some broadcast storms from time to time when > they're settling the issue who shall win the election. You > should add the following options in [global]: > > wins support = Yes > preferred master = Yes > domain master = True > > and tell your clients to never start elections. That's > "MaintainServerList"="No" under HKLM key > SYSTEM\CurrentControlSet\Services\Browser\Parameters > in the Win2K registry.Still no improvement. I wasn't even doing name-based browsing, by the way, as I always access my machines by IP address. I know they're harder to type than names, but hey, I once had a dream where I got a new hosting service and I remembered the IP address they had assigned to me even after waking up. I think I need a break :) Anyway, I even made Samba listen on port 445 during my tests so as to get rid of any NetBIOS-specific overhead, with no success.> I wish you good luck.Thanks a bunch, I need it ;) Cheers, Nicolas Gieczewski Nix Software Solutions http://www.nixsoftware.com/