[linux-cifs-client] Slow Folder Traversal on One system, Fast on Another
Tanthrix
tanthrix at gmail.com
Tue Jan 19 18:58:19 MST 2010
Jeff Layton wrote:
> The two kernels are using different infolevels for the FIND_FIRST call
> (not too surprising since this code has changed significantly in 10
> releases).
>
> The main difference though is that the later kernel is doing a
> QPathInfo against all of the inodes, and the earlier one isn't. The
> readdir code doesn't trigger this, so I suspect that the time
> difference is due to differences in userspace. i.e., the later release
> appears to be doing more than just readdir() type calls when you call
> 'ls -R'.
>
> One question...when you do the "ls" on ubuntu, is the output colorized?
> If so, can you run:
>
> $ unalias ls
>
> ...and then in the same shell, redo your 'ls -R' test on the ubuntu
> box. Does it go faster?
Jeff,
Indeed it does! In fact, it is now identically fast to my older system,
which strangely enough also gives colorized output from the ls -R
command without using QPathInfo. In any event, great detective work!
Now, the dillemma: As you may imagine, my original problem was not the
slow down when doing ls -R, but instead, a slowdown with an application
I use. More specifically, MythTV, and its plugin MythVideo which for my
use is basically a glorified file browser with an OSD that allows me to
play back media files on the TVs in the house.
Each time I open this program, something I do frequently, it reads the
full list of files on my CIFS mounted share to show me all my home
videos, pictures, movies, etc.. And as you have already guessed, it too
is causing a QPathInfo for each file, causing serious slowdown compared
to my older systems.
So I guess my question is this: Is there anything I can do from a CIFS
client perspective to prevent this problem? Or am I completely at the
mercy of the code in this application? And if that is the case, would it
be possible to use the earlier version of the CIFS client on my current
system, or is that something built into the kernel that would be
non-trivial/impossible to swap out?
Thanks for all the help, it's much appreciated!
More information about the linux-cifs-client
mailing list