Subject: Re: Simple thought...
To: None <current-users@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: current-users
Date: 06/08/2002 14:46:39
[ On Saturday, June 8, 2002 at 10:01:08 (-0700), Wolfgang Rupprecht wrote: ]
> Subject: Re: Simple thought...
>
> kern.maxvnodes: 26474 -> 65536
> 
> Ok, the number of vnodes was a bit on the small size.
> 
>     $ time du -a /usr/pkgsrc/ | wc
>        47292   94584 1959522
> 
>     real    0m7.897s
>     user    0m0.457s
>     sys     0m0.752s
> 
> It appears I have ~47k files and directories, and 64k vnodes.  I'm
> still seeing ~8 seconds to traverse the filesystem with the disk
> access light on for all 8 seconds.

hmmm.... do you have enough buffer cache for all those inodes and all
those directories combined?  Keep in mind that with 'du' you're only
really caching the directory data in the buffer cache, and everything
else is metadata, and I'm not sure how successfully it's cached.
/usr/pkgsrc is a really bad case to test against since you're pushing
several limits at a time

Reading mounds of real data, instead of all metadata, is also a better
test (closer to a wider variety of real-world uses):

	cd /usr/src/sys
	find . -name '*.[ch]' > /tmp/files
	xargs < /tmp/files time fgrep some_word_that_will_never_be_found

Here's what my development server does after first being sure to have
flushed any trace of the test data from the buffer cache:

$ xargs < /tmp/files time fgrep some_word_that_will_never_be_found
       18.23 real         0.02 user         1.78 sys
       26.37 real         0.12 user         2.16 sys
       10.13 real         0.06 user         0.77 sys
$ xargs < /tmp/files time fgrep some_word_that_will_never_be_found 
        1.06 real         0.12 user         0.88 sys
        2.20 real         0.10 user         1.35 sys
        0.89 real         0.03 user         0.47 sys

If you do "/usr/bin/time -l" instead you'll find the second invocations
do no block input operations at all (if your bufcache is big enough).

-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>