Subject: re: BUFCACHE
To: Antti Kantee <pooka@iki.fi>
From: matthew green <mrg@eterna.com.au>
List: port-sparc
Date: 12/12/1999 10:34:38
Has anyone noticed anything strange with options BUFCACHE lately on
sparc (or even ever, as this is my first install)? Shouldn't
options BUFCACHE=14
imply something else than:
total memory = 48980 KB
avail memory = 45580 KB
using 128 buffers containing 512 KB of memory
My fault or someone else's fault?
it is the sparc port's fault.
due to several issues, the sparc port is by default limited to what
you see above. you can work around this by editing the sparc
machdep.c to change the code that limits these values, and also
decreasing MAXBSIZE so that kernel memory is not overused. i
personally use these values:
options MAXBSIZE=16384
options NBUF=2048
options BUFPAGES=4096
and do not set BUFCACHE (though this is easier). the BUFPAGES
value gets clipped at 3072 for some reason i haven't yet worked out
(it doesn't bother me much, from what i can see from 'systat buf'):
total memory = 65348 KB
avail memory = 49068 KB
using 2048 buffers containing 12288 KB of memory
and in machdep.c:mdallocsys(), i have this change:
- if (CPU_ISSUN4C && bufpages > (128 * (65536/MAXBSIZE)))
- bufpages = (128 * (65536/MAXBSIZE));
+ if (CPU_ISSUN4C && bufpages > ((6*128) * (65536/MAXBSIZE)))
+ bufpages = ((6*128) * (65536/MAXBSIZE));
(which, looking at it, is the cause of the 3072 buffer limit i see :-)