Subject: Re: LFS performance and kern.maxvnodes
To: Adam Hamsik <>
From: David Holland <>
List: tech-kern
Date: 09/11/2007 21:21:10
On Tue, Sep 11, 2007 at 01:15:47PM +0200, Adam Hamsik wrote:
 > How is this self tuning mechanism done in other operating systems ?
 > Something like self workload tuning would be great.
 > I see 2 ways to do this:
 > 1) Create kernel thread for monitoring in kernel data/statistics and  
 > tune uvm/vnode/ other option appropriate to them.
 > 2) Create userspace daemon for monitoring and that daemon will use  
 > sysctl to tune kernel parameters.

Well, there's really two different things going on here. 

The kernel can (and does) adapt internally based on workload. The
kernel can also export knobs for experts to twiddle, and then the
system can provide a gizmo that twiddles said knobs automatically when
an expert isn't available.

Which values are internal and which are meant to be externally
twiddled is an important design decision, which should not be based on
the mechanism intended to handle the external twiddling.

(That said, there are a number of reasons why any automated twiddling
of external knobs should be done by a userspace daemon; not least is
that the algorithms you'll be using will tend to come from the AI
community and won't be much fun to shoehorn into the kernel.)

There's been quite a bit of research on this subject recently; I
believe the current buzzword is "autonomic computing". I'm not all
that up on it though.

   - David A. Holland /