lkml.org 
[lkml]   [1999]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: directory ops?


On Wed, 2 Jun 1999, Larry McVoy wrote:

> I was chatting with tchrist (the perl guy) today and he mentioned that
> BSD does a better job of very large directory handling than Linux. The
> suggested test was to create a directory with 10,000 files in it and
> compare
>
> ls -l
> ls -l first_file
> ls -l middle_file
> ls -l last_file
>
> under both BSD and Linux.
>
> Has anyone done this? If this is an area where we need some work, I'll
> add the appropriate test to lmbench.

Under which filesystem? Aside of one optimization we might do and BSD does
for some filesystems (memorizing last lookup position for a while and
restarting lookup from that place) I'ld say that claim is pure BS.
->readdir() in *BSD doesn't populate per-fs directory caches, so he
might have a point with 2.0.x - there we used to do stupid things like
that (with dcache) and ls -l on large directory might cause massive dcache
sweep. Doesn't happen with 2.2/2.3.

Adding the test will not hurt, indeed. Doing it accurately might be
tricky, though. E.g. ls -l sorts the entries. In userspace. So you'll have
to factor that out - I doubt that GNU ls does bogosort, but...


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.246 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site