Subject: Re: More pools
To: Jaromir Dolecek <jdolecek@NetBSD.org>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-kern
Date: 10/28/2003 23:46:19
Jaromir Dolecek wrote:
> Simon Burge wrote:
> > The following diff adds pools for credentials, session headers and lockf
> > structures. These appear to be the last of the fixed-sized structures
> > that are malloc'd with any serious frequency (at least for my usage
> > patterns).
>
> AFAIK most credentials are heavily shared between processes, there
> is (or should be) mostly just one per logged user. Probably not
> worth using pools for it. I'm not sure if pools would give any
> significant performance difference for lockf/session headers - both
> seems to be used seldomly. Pools actually create some memory use
> overhead (they allocate memory by a whole page), so probably
> shouldn't be used universaly.
My main server is averaging >1 cred malloc per second over 78 days (it's
up to 8114504 mallocs now). Current usage is 59KB, with a maximum
use of 79KB. lockf is even worse - 108582208 calls at neary 16 per
second, currently using 10KB from a maximum of 11KB. sessions are
"only" malloc'd about once every 90 seconds, and are currently using
13KB out of a maximum of 15KB. This might be approching "seldom",
but the first two certainly aren't.
> It would be nice to have some malloc(9) variant using kernel_map,
> for all such nointr allocations.
Maybe, but that's beyond the scope of what I was wanting to do :-)
Simon.
--
Simon Burge <simonb@wasabisystems.com>
NetBSD Support and Service: http://www.wasabisystems.com/