Subject: Re: File/Buffer cache consumes all memory even when constrained in
To: George Michaelson <email@example.com>
From: Wojciech Puchar <firstname.lastname@example.org>
Date: 05/17/2004 17:33:18
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
> 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 Michaelson | APNIC
> Email: email@example.com | PO Box 2131 Milton QLD 4064
> Phone: +61 7 3858 3150 | Australia
> Fax: +61 7 3858 3199 | http://www.apnic.net