On September 11, 2001 12:39 am, Rik van Riel wrote:
> On Mon, 10 Sep 2001, Linus Torvalds wrote:
>
> > (Ugly secret: because I tend to have tons of memory, I sometimes do
> >
> > find tree1 tree2 -type f | xargs cat > /dev/null
>
> This suggests we may want to do agressive readahead on the
> inode blocks.
>
> They are small enough to - mostly - cache and should reduce
> the amount of disk seeks quite a bit. In an 8 MB block group
> with one 128 byte inode every 8 kB, we have a total of 128 kB
> of inodes...
I tested this idea by first doing a ls -R on the tree, then Linus's find
command:
time ls -R linux >/dev/null
time find linux -type f | xargs cat > /dev/null
the plan being that the ls command would read all the inode blocks and hardly
any of the files would be big enough to have an index block, so we would
effectively have all metadata in cache.
According to your theory the total time for the two commands should be less
than the second command alone. But it wasn't, the two commands together took
almost exactly the same time as the second command by itself.
There goes that theory.
-- Daniel - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Sep 15 2001 - 21:00:31 EST