[comp.sys.sgi] Tuning the buffer cache

shoshana@pdi.UUCP (Shoshana Abrass) (05/24/91)

  We're thinking of tuning the buffer cache to speed disk i/o.
  We often have to read two large files alternately (for example,
  a geometry model, then a texture map, then the model, then the 
  map, etc...) and we'd like to keep both (or many) of these 
  files in the cache, if possible. (Yes, we're looking at alternate
  schemes, but this is a fast hack. The two files are read by 
  separate processes that exit after reading, BTW.)

  The 'documentation' in /usr/sysgen/master.d/master.c says  

#define NBUF 0          /* # buffers in disk buffer cache */
			/* autoconfigure if 0 */

  What does 'autoconfigure' mean? does this configure when you 
  compile the kernel, or does it dynamically change depending on
  what your file usage profile is? And what's a real number that
  I can set this to, or how can I find out what it's autoconfigured
  to now?

  And while I'm on the subject.... Someone at my company is strongly
  of the belief that MIPS-based operating systems have the capability
  of running a RAM disk. Without flaming about the viability of this
  solution, can anyone confirm or deny it?

  Thanks for any help.

  -shoshana
  shoshana@pdi.com
  pdi!shoshana@sgi.com
  ...uunet!sgi!pdi!shoshana

--

jeremy@perf2.asd.sgi.com (Jeremy Higdon) (05/25/91)

In article <9105240159.AA10726@koko.pdi.com>, shoshana@pdi.UUCP (Shoshana Abrass) writes:
> 
>   We're thinking of tuning the buffer cache to speed disk i/o.
>   We often have to read two large files alternately (for example,
>   a geometry model, then a texture map, then the model, then the 
>   map, etc...) and we'd like to keep both (or many) of these 
>   files in the cache, if possible. (Yes, we're looking at alternate
>   schemes, but this is a fast hack. The two files are read by 
>   separate processes that exit after reading, BTW.)
> 
>   The 'documentation' in /usr/sysgen/master.d/master.c says  
> 
> #define NBUF 0          /* # buffers in disk buffer cache */
> 			/* autoconfigure if 0 */
> 
>   What does 'autoconfigure' mean? does this configure when you 
>   compile the kernel, or does it dynamically change depending on
>   what your file usage profile is? And what's a real number that
>   I can set this to, or how can I find out what it's autoconfigured
>   to now?

In IRIX 3.3 and beyond, cached file data does not use a buffer header.
Thus, if you have enough memory, your files will stay cached automatically.
Basically, whatever isn't in use by the kernel, user programs, etc. is
available for caching disk files.

Currently, autoconfiguring for the number of buffers is done at boot
time and depends on the amount of memory on your machine.  If I remember
correctly, it is 50 + (25 per 8MB).