[SOLUTION] Slow connection with smbclient (Windows in the same machine works fine!) - Sorry, message a little long...

Henrique Cesar Ulbrich henrique at digerati.com.br
Mon Feb 3 16:50:11 GMT 2003

> Historians believe that, in Tue 14 Jan 2003 18:30, Ken Barber said:
> > If I were in your shoes my next step would be to fire up a packet
> > sniffer (Ethereal for instance) and see what is coming and going on the
> > wire.

Ken and everybody here, I must apologise.

I told you I have already sniffed my eth0, but I think I have made something 
wrong. There werre really odd things ocurring on the wire. When I realised 
what was wrong the solution came instantly.

For those who dont remember the issue, a little explanation.

Maybe you can remember it. I was having performance problems with my Red Hat 
8 box in an all-Windows network. My station and the Samba 2.2.7 Server were 
the only two Linux machhines over the network. All Windows boxes were fast 
accessing the network, but my linux box was not. It took as long as 20 
minutes to accomplish a simple LS comand and more than one hour to transfer 
a 170 kB GIF file from a nearby machine.

I had already sniffed my eth0 with ethereal and tcpdump, but could not 
extract from there any conclusions.

After I wrote to the list (and Ken Barber kindly answered - thanks!) I 
decided to try again. Fired up an ethereal instance in WinXP and in Linux 
(both on my machine), made a copy of an 1Mb file to the net in both OSs and 
compared the logs.

I dont know what I've done wrong, but this time the issue showed up. I've 
found out that my smbclient was rescanning the mounted volume (for 
directory information, file names, etc.) with a delta-time between them 
less than 1s (one second). Finding this out, solution is easy. 

You just have to mount your SMB volumes with the TTL option set. The 
Samba.org distribution default fot TTL is 1000 (which means one thousand 
milisseconds or 1s). BUT Red Hat's distribution of samba-clients have set 
this to less than a second (TTL=100 or even TTL=10). I dont know why and 
didn't bother to search for. I've heard that you can have a smbclient.conf 
(is it real?) with the default settings for all samba-client programs 
(smbmount, smbclient etc) but my system does not have such file.

Anyway, with the command below

smbmount //HOST/share /home/henrique/mnt/HOST/share/ -o 
username=henrique%pass, ... other options ... ,TTL=10000

My problems were solved. I set up TTL to 10 seconds.

Do you think this is a Red Hat problem? They shipped RH8 with Samba 2.2.7-2. 
Is this version known for this kind of bug? I looked for it on samba.org 
and didn't find any mention to it.

Thanks everybody, and I hope my findings would help people with the same 

Best regards
Henrique Cesar Ulbrich
henrique at digerati.com.br

     "Once the rockets are up,
      who cares where they come down?
      That's not my department,
      says Werner von Braun."
                        Tom Lehrer

More information about the smb-clients mailing list