Subject: Re: Simple thought...
To: Greywolf <greywolf@starwolf.com>
From: Greg A. Woods <woods@weird.com>
List: current-users
Date: 06/07/2002 14:58:22
[ On Friday, June 7, 2002 at 10:59:31 (-0700), Greywolf wrote: ]
> Subject: Simple thought...
>
> For those of you with large memory machines and a reasonably thought-out
> partitioning scheme, you might want to consider tossing /usr into a MFS
> somewhere along the line.  I haven't profiled yet, but access/load times
> for programs run from /usr seem to have improved.  It feels snappier.

Carefully expanded use of the normal buffer cache is almost certainly a
FAR more effective and efficient way to tune a system, especially now
with the unified buffer cache.  Unless you regularly run most of the
programs in /usr (and use most of the libraries and read all the other
data files), putting all that crap in a RAM disk, even if it ends up out
on swap, is, pardon the phrase, a rather stupid use of resources.

I.e. if you have tons of RAM (more than necessary for the active page
sets of all your running processes) then make BUFCACHE (much) bigger:

	options		BUFCACHE=25	# use up to 25% of RAM

That way _all_ disk accesses can benefit, regardless of filesystem.

Try it!  Do a "du" on a large filesystem.  Then do it again right away.
SEE the difference!  Do an "fgrep" on a large bunch of data.  Then do it
again right away.  FEEL the difference!  Be happy!  :-)

Even on a "reasonable"-sized machine, 10% of RAM helps a LOT:

	options         NBUF=1200
	options         BUFCACHE=10


	total memory = 319 MB
	avail memory = 275 MB
	using 1200 buffers containing 32720 KB of memory

Welcome BACK to the wonderful world of Unix!  (until UBC, NetBSD
positively sucked w.r.t. caching on-disk data in RAM and doing repeated
operations like those above suffered HORRIBLY, making NetBSD
uncomparable to any other Unix for such things!)  THANK YOU ALL for UBC,
especially chs!!!!

(a somewhat practical application that really takes advantage of the
buffer cache is something like the compiler (w/o -pipe), or C News)

-- 
								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>