Subject: Re: tuning recommendations
To: George Michaelson <>
From: Perry E. Metzger <>
List: tech-perform
Date: 08/03/2002 00:42:17
George Michaelson <> writes:
> Could somebody post at least the beginnings of a 'recommended' set
> of tunings for some common scenarios?
> 	laptop
> 	desktop, big and small memory
> 	appserver
> 	DB server

For UBC, none of them are any different from each other. Adjust the
vm.{anon,exec,file}{min,max} numbers until you stop paging. In
particular, you may have to jack up the anon and exec mins
and to lower the filemax to reduce interactive application trouble on
machines with relatively limited memory. In the old world order, you
couldn't chew up more than a few percent of memory for the buffer
cache, but in the new world order, filemax could let you chew up a lot
of memory for buffers and you end up throwing out executable pages to
do it. Your goal is basically to jack up the exec/anonmin protection
until such time as your working set stays in memory, but no more than
that so that you take advantage of the new extra-large buffer cache.

It is probably also of benefit on a modern machine (i.e. if you have
128M of memory or more) to start jacking up kern.maxvnodes. I have it
set to 32k on my laptop with 256M of memory, and to like half a mil on
the NetBSD releng automatic build server that has 2G of memory. The
maxvnodes number tells you (VERY approximately) how many different
files you can be caching data for. If you've got a lot of memory, and
you're touching lots of files, you obviously want it higher, but on a
small memory machine you end up wasting a lot of data for kernel
structures you never use.

> I tried to follow a couple of 'well, I do this' but its not clear if
> they help or not.
> In particular, I think network performance seems to interact badly with
> smaller-traffic net stuff (ie browsing is a dog, DNS lookup is a dog, when
> a huge slab of sup or ftp or ssh is happening)

UBC has no impact on network performance.

Perry E. Metzger
"Ask not what your country can force other people to do for you..."