smbfs very slow
urban at teststation.com
Thu Oct 4 10:24:05 GMT 2001
On Wed, 3 Oct 2001, Hactar wrote:
> I can "cd" into ~/temp (as eben), and do an "ls" (or at least I could
> _this_ time, when I tried). I see what I should. If I run "strace find
> temp2/" from ~, it waits on getdents(). If I wait long enough, it'll
> continue, only to get hung up on a getdents() or a some flavor of stat().
> If I hit ^C, there's a long wait (minutes to hours), then the process
> (usually) exits.
Running strace on multithreaded programs on smbfs triggers a known bug
(but find isn't multithreaded). Do you only see the hang problems when
> Doind a "cat file > /dev/null" completes in a reasonable time, but there
> was a long delay doing a tab-completion on the filename.
> I thought it was "too many files in a directory" causing the problems, so
> I broke up the files. 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.
> Every 15 minutes or so, I get these (or something similar to them) in
> Oct 3 15:50:06 pc kernel: smb_get_length: recv error = 110
> Oct 3 15:50:06 pc kernel: smb_trans2_request: result=-110, setting invalid
> Oct 3 15:50:06 pc kernel: smb_retry: successful, new pid=25354, generation=2
> The last message is just smbfs reconnecting a mount, and I think the
> second one is too. How about the first one?
ETIMEDOUT, Connection timed out.
The first one triggers the second. And it is a strange error as no one is
trying to connect. More common are 104 (Connection reset by peer) and from
2.2 kernels 32 (Broken pipe).
This is just the server disconnecting (because you left the mount idle?),
it should reconnect and continue to work.
More information about the samba