smbfs very slow

Hactar eben at
Thu Oct 4 11:34:02 GMT 2001

On Thu, 4 Oct 2001, Urban Widmark wrote:

> On Wed, 3 Oct 2001, Hactar wrote:
> > If I wait long enough, it'll
> > continue, only to get hung up on a getdents() or a some flavor of stat().

> Do you only see the hang problems when doing strace?

No.  It hangs regardless (presumably in the same place).

> > There are now 27 sub-directories (not counting
> > hidden ones) totalling ~5700 files.
> Something that should improve performance for large dirs is to increase
> the time the cache is considered valid (default 1 second). Try giving
> ttl=10000 (10 seconds) as an option to mount.

Good idea.  I tried that just now -- still a long delay.

> > Oct  3 15:50:06 pc kernel: smb_get_length: recv error = 110

> More common are 104 (Connection reset by peer)

I see that too, 141 of them to 113 "110"s.

> This is just the server disconnecting (because you left the mount idle?),
> it should reconnect and continue to work.

For small values of "work".

I tried to use smbclient's "tar" option ("tar c pipename filename" in
smbclient, "tar xf - < pipename" in another shell), and it stopped after
about 24M/213 files/19 dirs, with "code 0 opening remote file" on all
subsequent files, plus a 20-second timeout for each file.  It appears to
stop at seemingly-random points.  While it's stopped, I can connect by
another smbclient and browse the offending directory.

-eben             eben at 
TAURUS:  You will never find true happiness - what you gonna do, cry about
it?  The stars predict tomorrow you'll wake up, do a bunch of stuff and then
go back to sleep.  -- Weird Al, _Your Horoscope for Today_

More information about the samba mailing list