From: Andrew Morton <akpm@zip.com.au>
To: Ed Tomlinson <tomlins@cam.org>
Cc: linux-mm@kvack.org
Subject: Re: slablru for 2.5.32-mm1
Date: Sun, 01 Sep 2002 23:50:38 -0700 [thread overview]
Message-ID: <3D730A3E.98F7386E@zip.com.au> (raw)
In-Reply-To: <200208281306.58776.tomlins@cam.org>
[-- Attachment #1: Type: text/plain, Size: 1736 bytes --]
hm. Doing a bit more testing...
mem=512m, then build the inode and dentry caches up a bit:
ext2_inode_cache: 20483KB 20483KB 100.0
buffer_head: 6083KB 6441KB 94.43
dentry_cache: 4885KB 4885KB 100.0
(using wli's bloatmeter, attached here).
Now,
dd if=/dev/zero of=foo bs=1M count=2000
ext2_inode_cache: 3789KB 8148KB 46.50
buffer_head: 6469KB 6503KB 99.47
size-512: 1450KB 1500KB 96.66
this took quite a long time to start dropping, and the machine
still has 27 megabytes in slab.
Which kinda surprises me, given my (probably wrong) description of the
algorithm. I'd have expected the caches to be pruned a lot faster and
further than this. Not that it's necessarily a bad thing, but maybe we
should be shrinking a little faster. What are your thoughts on this?
Also, I note that age_dcache_memory is being called for lots of
tiny little shrinkings:
Breakpoint 1, age_dcache_memory (cachep=0xc1911e48, entries=1, gfp_mask=464) at dcache.c:585
Breakpoint 1, age_dcache_memory (cachep=0xc1911e48, entries=2, gfp_mask=464) at dcache.c:585
Breakpoint 1, age_dcache_memory (cachep=0xc1911e48, entries=4, gfp_mask=464) at dcache.c:585
Breakpoint 1, age_dcache_memory (cachep=0xc1911e48, entries=12, gfp_mask=464) at dcache.c:585
Breakpoint 1, age_dcache_memory (cachep=0xc1911e48, entries=21, gfp_mask=464) at dcache.c:585
Breakpoint 1, age_dcache_memory (cachep=0xc1911e48, entries=42, gfp_mask=464) at dcache.c:585
Breakpoint 1, age_dcache_memory (cachep=0xc1911e48, entries=10, gfp_mask=464) at dcache.c:585
I'd suggest that we batch these up a bit: call the pruner less
frequently, but with larger request sizes, save a few cycles.
[-- Attachment #2: bloatmeter --]
[-- Type: text/plain, Size: 134 bytes --]
#!/bin/sh
while true
do
clear
grep -v '^slabinfo' /proc/slabinfo \
| bloatmon \
| sort -r -n +2 \
| head -22
sleep 5
done
[-- Attachment #3: bloatmon --]
[-- Type: text/plain, Size: 413 bytes --]
#!/usr/bin/awk -f
BEGIN {
printf "%18s %8s %8s %8s\n", "cache", "active", "alloc", "%util";
}
{
if ($3 != 0.0) {
pct = 100.0 * $2 / $3;
frac = (10000.0 * $2 / $3) % 100;
} else {
pct = 100.0;
frac = 0.0;
}
active = ($2 * $4)/1024;
alloc = ($3 * $4)/1024;
if ((alloc - active) < 1.0) {
pct = 100.0;
frac = 0.0;
}
printf "%18s: %8dKB %8dKB %3d.%-2d\n", $1, active, alloc, pct, frac;
}
next prev parent reply other threads:[~2002-09-02 6:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-26 22:09 MM patches against 2.5.31 Ed Tomlinson
2002-08-26 23:58 ` Andrew Morton
2002-08-27 0:13 ` Rik van Riel
2002-08-28 17:06 ` slablru for 2.5.32-mm1 Ed Tomlinson
2002-08-28 21:24 ` Andrew Morton
2002-08-28 22:23 ` Rik van Riel
2002-09-02 5:26 ` Andrew Morton
2002-09-02 15:00 ` Ed Tomlinson
2002-09-02 18:35 ` Andrew Morton
2002-09-02 19:09 ` Ed Tomlinson
2002-09-02 19:51 ` Andrew Morton
2002-09-02 6:50 ` Andrew Morton [this message]
2002-08-28 22:11 Ed Tomlinson
2002-09-06 4:07 Craig Kulesa
2002-09-06 4:24 ` Robert Love
2002-09-08 21:43 ` Daniel Phillips
2002-09-09 4:36 ` Robert Love
2002-09-09 5:10 ` Daniel Phillips
2002-09-06 4:38 ` Andrew Morton
2002-09-06 11:39 ` Ed Tomlinson
2002-09-06 18:57 ` Craig Kulesa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D730A3E.98F7386E@zip.com.au \
--to=akpm@zip.com.au \
--cc=linux-mm@kvack.org \
--cc=tomlins@cam.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox