Subject: Re: buffer cache memory management revision
To: matthew green <mrg@eterna.com.au>
From: Paul Kranenburg <pk@cs.few.eur.nl>
List: tech-kern
Date: 12/23/2003 20:47:51
> i've been running tests with this patch for a few hours on my
> U5/270 without incident. works for me!
Good.
I'm still trying to decide what the best compromise is in order to
avoid excessive memory fragmentation (a danger with any pool based
allocation scheme) and still allow a fair degree of freedom for
configuring the buffer cache sizes. I'm thinking of using MAXBSIZE
pool page sizes for all buffer pools on machines with lots of
physical memory, while being more economical on low memory machines.
Anyway, here are a few statistics i've collected in the past days..
A `systat buf' sample on a 32MB sparcstation with default parameters
after 5 days of casual use.
/0 /1 /2 /3 /4 /5 /6 /7 /8 /9 /10
Load Average ||
There are 1871 metadata buffers using 9724 kBytes of memory.
There are 1672 pages for cached file data using 6688 kBytes of memory.
There are 561 pages for executables using 2244 kBytes of memory.
File System Bufs used % kB in use % Bufsize kB % Util %
/usr 804 42 2269 23 2285 23 99
/usr/src 492 26 3936 40 3936 40 100
/ 150 8 523 5 524 5 100
[all NFS filesystems from here]]
/home 9 0 58 1 58 1 100
/usr/pkg 7 0 56 1 56 1 100
/altroot 7 0 14 0 14 0 100
/altroot/usr 2 0 9 0 9 0 100
/usr/local/share 1 0 8 0 8 0 100
/usr/pkgsrc 1 0 8 0 8 0 100
/usr/xsrc 1 0 8 0 8 0 100
Total: 1474 78 6889 71 6906 71 100
Here's a `systat buf' sample on a 650MB machine (i386, PII) with bufcache
turned up to 80%, and after running `find / -name xxxx':
/0 /1 /2 /3 /4 /5 /6 /7 /8 /9 /10
Load Average |||
There are 89497 metadata buffers using 331531 kBytes of memory.
There are 84 pages for cached file data using 336 kBytes of memory.
There are 727 pages for executables using 2908 kBytes of memory.
File System Bufs used % kB in use % Bufsize kB % Util %
/mnt/lfs 29464 32 34767 10 34927 11 100
/mnt/nfs 11522 12 92176 28 92176 28 100
/mnt/ufsv2 4300 4 46542 14 46542 14 100
/ 1571 1 2597 1 2631 1 99
Total: 46857 52 176082 53 176276 53 100
This is my local NFS server (running a 3-week old kernel btw, w/ previously
posted patches):
/0 /1 /2 /3 /4 /5 /6 /7 /8 /9 /10
Load Average |
There are 13304 metadata buffers using 47881 kBytes of memory.
There are 249 pages for cached file data using 996 kBytes of memory.
There are 1135 pages for executables using 4540 kBytes of memory.
File System Bufs used % kB in use % Bufsize kB % Util %
/z 13119 98 47000 98 47000 98 100
/ 129 0 576 1 576 1 100
/usr 56 0 305 1 305 1 100
Total: 13304 100 47881 100 47881 100 100