public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: What obvious symptoms addressed by the slablru patch?
       [not found] <20020809192530.A7098@debian1.loaner.com>
@ 2002-08-10 12:06 ` Ed Tomlinson
  0 siblings, 0 replies; only message in thread
From: Ed Tomlinson @ 2002-08-10 12:06 UTC (permalink / raw)
  To: Kingsley G. Morse Jr.; +Cc: linux-kernel

HI Kingsley

You wrote:
>
>     If you are having slab memory problems or
>     dcache/icache get too large and seen not to be
>     pruned 'correctly' - This patch may well help.
>
> and
>
>     Feedback very welcome
>
> Can you elaborate on what:
>
>     slab memory problems and
>
>     dcache/icache
>
>         getting too large and
>         not being pruned 'correctly'
>
> look like to an end user?

Without slablru on a lightly loaded box you would see memory 'disappear'
ie. vmstat would show the free/buf/cache numbers decreasing.   If you
then looked at /proc/slabinfo you would see some caches (usually inode
and dentry) using lots of memory.  This memory eventually will get reclaimed
when we get vm pressure.  With out slablru this pressure comes too late
and is often caused by slab caches instead of real world loads...

What slablru does basicly is sync the shrinking of slab caches with the
rest of the vm.  So if you allocate lots of slab pages (like during an updatedb
run) the vm takes this into account and even with low vm pressure starts
trimming caches.  This means that, while slab caches can still get large, the
vm will trim them at the same rate it does other pages.  It no longer waits
until too long to do so.

One small detail in slablru.  There are currently two types of slab caches.
Those that free slabs directly and those that age their slabs before freeing
them.  The dcache (dentries) and inode caches age their members.  This
also contributed to the above problem.  The stock kernel ages and 
shrinks at the same time.  slablru factors out aging and shrinking.  This
helps keep these caches using their fair share (which can be large) of
the systems resources.

Ed Tomlinson


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-08-10 12:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20020809192530.A7098@debian1.loaner.com>
2002-08-10 12:06 ` What obvious symptoms addressed by the slablru patch? Ed Tomlinson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox