NBUF and pstat

William Roberts; liam at cs.qmw.ac.uk
Thu Jan 17 08:23:14 AEST 1991


In <2657 at dftsrv.gsfc.nasa.gov> jim at jagubox.gsfc.nasa.gov (Jim Jagielski) 
writes:


>Currently, my kernel is built with NBUF being 0, meaning that 10% of
>the free space at start-up is utilized for disk buffers. I want more.
>The question is how many buffers are there???

>I would guess, using pstat, that NBUF is actually set to 1551 since
>that is the value that pstat returns for buffers.... Is this right?

I believe that you are right: certainly the comments in /usr/include/sys/var.h
seem to agree with you, as does examination of various different machines I
have to hand. On our machines we have SBUFSIZE set to 2048, NBUF set to zero, 
and we see

  4 Meg => 135 buffers
  5 Meg => 185 buffers   (extra 40 for 1 Meg extra memory)
  8 Meg => 339 buffers   (extra 204 for 4 Meg extra memory)

204*2K = 408K which is pretty much 10% of 4 megabytes. The 5 Meg machine is a 
Mac II not a IIcx and has one of the infamous old EtherPort II ethernet cards, 
so the kernel is going to be a bit different and occupy a different amount of 
space, hence slightly fewer extra buffers than you might expect.

Your figure of 1551 seems very high - let me guess: either you are running a 
32 Megabyte machine, or you have SBUFSIZE set to 1024 and you are running a 16 
Meg machine.

For networking stuff there is also NMBUFS, which we set to 500, and 9 
different NBLK* values associated with streams buffering, all of which are 
also types of "buffers" and affect the amount of memory you have available.
--

William Roberts                 ARPA: liam at cs.qmw.ac.uk
Queen Mary & Westfield College  UUCP: liam at qmw-cs.UUCP
Mile End Road                   AppleLink: UK0087
LONDON, E1 4NS, UK              Tel:  071-975 5250 (Fax: 081-980 6533)



More information about the Comp.unix.aux mailing list