Subject: Re: File/Buffer cache consumes all memory even when constrained in
To: George Michaelson <ggm@apnic.net>
From: Wojciech Puchar <wojtek@tensor.3miasto.net>
List: current-users
Date: 05/17/2004 17:33:18
vm.filemax=6
vm.filemin=3
vm.execmin=20
vm.execmax=90
vm.anonmax=95
vm.anonmin=50
vm.bufcache=5

maybe strange config but works nice both for low memory machine (so apps
REALLY gets memory) and for high memory.


in case of free memory filecache (and anything else) can get above given
max - it's just the first to remove in case of memory shortage.

>
>
> I have:
>
> $ sudo sysctl vm
> Password:
> vm.loadavg: 1.76 1.63 1.11
> vm.nkmempages = 32768
> vm.anonmin = 10
> vm.execmin = 5
> vm.filemin = 10
> vm.maxslp = 20
> vm.uspace = 16384
> vm.anonmax = 80
> vm.execmax = 30
> vm.filemax = 50
> vm.bufcache = 15
> vm.bufmem = 72824832
> vm.bufmem_lowater = 20106240
> vm.bufmem_hiwater = 160849920
> $
>
> But even with this, I find that on my 1GB IBM X31, a cvs followed by a build.sh
> forces available memory for apps down below 30Mb.
>
> I'm not sure this matters, (runtime speed on this baby is awesome compared to
> my 700Mhz Dell with 256Mb, 1.6Ghz 1Gb is just lovely!) -but its confusing to
> a l(user) like me that the apparent restriction in sysctl terms on memory usage
> doesn't seem to stop it consuming all free space.
>
> My take is that sysctl vm tuning is still a black art.
>
> -George
>
> --
> George Michaelson       |  APNIC
> Email: ggm@apnic.net    |  PO Box 2131 Milton QLD 4064
> Phone: +61 7 3858 3150  |  Australia
>   Fax: +61 7 3858 3199  |  http://www.apnic.net
>