tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kernel memory consumption



Ilya Dogolazky <ilya.dogolazky%teleca.fi@localhost> wrote:
> I have done some measurement of the kernel runtime memory consumption on 
> ARM. Here is the link to my report in the NetBSD wiki:
> http://wiki.netbsd.se/NetBSD_Kernel_runtime_memory_consumption
> 
> There are a couple of questions:
> 
> 1. How to explain, that the value goes back but not to the starting level?
> 
> 2. How to explain the peak at the first "!"-mark?
> 
> 3. How to explain that the value is going very deep (but again --- not 
> so deep as the starting level) *after* the first "!"-mark?
> 
> 4. And last but not least --- any comments and suggestions are welcome!

It is actually interesting data.

In general - system tries to cache many things for optimisation purposes,
eg. keep memory if re-using of it is expected. Many subsystems use such
interfaces like pool(9)/pool_cache(9), which are designed for heavy use of
fixed-size allocations. So allocations are kept in the pool, freed gradually,
reclaimed when needed, etc. Even kmem(9) interface uses pool, via vmem(9),
to cache "popular" allocation sizes. UBC (buffer cache) is involved too,
also, UVM subsystem may just deactivate pages, instead of free, so pages
could be re-used later, or freed when needed. There are other caching and
reclamation mechanisms.

Kernel tries to be clever, and may do complex job :)

-- 
Best regards,
Mindaugas
www.NetBSD.org


Home | Main Index | Thread Index | Old Index