Subject: Re: vm.execmin: sysctl() failed with Invalid argument
To: Arto Selonen <arto+dated+1113310471.833e35e27ea66f0f@selonen.org>
From: sigsegv <sigsegv@rambler.ru>
List: current-users
Date: 04/13/2005 10:10:15
On Tue, 12 Apr 2005 15:53:24 +0300 (EEST)
Arto Selonen <arto@selonen.org> wrote:

> Hi!
> 
> On Mon, 11 Apr 2005, sigsegv wrote:
> 
> > I boot the system with default sysctl values, then I edit /etc/sysctl.conf
> >
> > vm.anonmin=80
> > vm.anonmax=95
> > vm.execmin=10
> > vm.execmax=60
> > vm.filemin=1
> > vm.filemax=1
> >
> > Running sysctl to set new vm.* values produces the following error message:
> 
> I haven't checked, but I assume that it makes the changes one at a time,
> and then fails a consistency check. When it fails, anonmin is 80 and 
> filemin is 10, so execmin can not be more than 5, as the sum of the 
> minimums can not be grater than 95. I guess. :)
> (See src/sys/uvm/uvm_meter.c UPDATEMIN macro definition)
> 
> So, try setting vm.file* first, then vm.exec* and finally vm.anon*.
> 

I'm doing the following workaround to make sure my settings take effect without errors on boot:

#reset to min values to avoid invalid argument errors
vm.anonmin=1
vm.anonmax=1
vm.execmin=1
vm.execmax=1
vm.filemin=1
vm.filemax=1

#set to real values
vm.anonmin=80
vm.anonmax=95
vm.execmin=10
vm.execmax=60
vm.filemin=1
vm.filemax=1