Newsgroups: comp.os.minix
Subject: Re: about file system cache..
References: <8htap6$k6f$1@supernews.com> <8htnfs$lvq$1@eng-ser1.erg.cuhk.edu.hk> <8htpve$k0k$1@supernews.com>
Organization: Rochester Institute of Technology, Rochester, NY
From: aje9383@osfmail.isc.rit.edu (Andrew Erickson)
NNTP-Posting-Host: grace.isc.rit.edu
X-Original-NNTP-Posting-Host: grace.isc.rit.edu
Message-ID: <39428ffa@news.isc.rit.edu>
Date: 10 Jun 2000 14:59:06 -0500
X-Trace: 10 Jun 2000 14:59:06 -0500, grace.isc.rit.edu
Lines: 30
XPident: aje9383
X-Original-NNTP-Posting-Host: 129.21.4.100
XPident: Unknown
Path: news.adfa.oz.au!clarion.carno.net.au!news0.optus.net.au!news1.optus.net.au!optus!intgwpad.nntp.telstra.net!newspump.monmouth.com!newspeer.monmouth.com!europa.netcrusader.net!204.71.34.3!newsfeed.cwix.com!bloom-beacon.mit.edu!news.kodak.com!news-nysernet-16.sprintlink.net!news.sprintlink.net!news.isc.rit.edu!aje9383
Xref: news.adfa.oz.au comp.os.minix:35382

In article <8htpve$k0k$1@supernews.com>, Nick <wendynic1@lineone.net> wrote:
>Thx.  i have tired to change the value in the config.h file inside the Minix
>.
>at the IBM_PC par change the hash table from 128 to 512.
>but i can't find any different after the change.
>any good idea for test it?

There's two things to chage--the size of the hash table and the number of
blocks in the cache.  (The blocks are hashed by their block number; this
allows the FS to quickly determine if some block is in the cache or needs to
be read in.)

I don't recall the exact macro for the number of blocks, but it is right
next to the hash table size and fairly obvious.  You probably want to
increase both.

As for testing, one quick check is to see if the FS task size grew by what
you'd expect--a bit more than 1K for each additional cache block you added. 
Alternately, try cat some_pretty_big_file > /dev/null twice; the disk should
not be accessed (much) the second time if some_pretty_big_file fits in the
cache with a little left over.

As an aside, shouldn't we really be hashing the blocks by (say) their
block number plus some device number?  I'd imagine that would speed up
accesses to superblocks when several file systems are mounted at several
mount points.

Good luck.
-- 
Andrew Erickson
