From: Ed Tomlinson <tomlins@cam.org>
To: Alexander Viro <viro@math.psu.edu>, Ed Tomlinson <tomlins@cam.org>
Cc: Rik van Riel <riel@conectiva.com.br>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Re: memory usage - dentry_cacheg
Date: Fri, 13 Apr 2001 09:36:01 -0400 [thread overview]
Message-ID: <01041309360100.32757@oscar> (raw)
In-Reply-To: <Pine.GSO.4.21.0104122154560.22287-100000@weyl.math.psu.edu> <01041300454100.06447@oscar>
In-Reply-To: <01041300454100.06447@oscar>
On Friday 13 April 2001 00:45, Ed Tomlinson wrote:
> On Thursday 12 April 2001 22:03, Alexander Viro wrote:
> > If you are talking about "unused" from the slab POV - _ouch_. Looks like
> > extremely bad fragmentation ;-/ It's surprising, and if that's thte case
> > I'd like to see more details.
> From the POV of dentry_stat.nr_unused. From the slab POV,
> dentry_stat.nr_dentry always equals the number of objects used as reported
> in /proc/slabinfo. If I could remember my stats from ages back I could
> take a stab at estimating the fragmentation... From experience if you look
> at memory_pressure before and after a shrink of the dcache you will usually
> see it decrease if there if there is more that 75% or so free reported by
> dentry_stat.nr_unused.
>
> The inode cache is not as good. With fewer inodes per page (slab) I
> would expect that percentage to be lower. Instead it usually has to be
> above 80% to get pages free...
>
> I am trying your change now.
And it does seem to help here. Worst case during an afio backup was:
inode_cache 14187 16952 480 2119 2119 1
dentry_cache 1832 3840 128 128 128 1
4 1 0 45256 1600 36828 165156 4 8 576 79 163 612 39 6 55
without the patch 20000+ inode slabs was not uncommon.
Here are some numbers snapshoting every 120
seconds at the start of a backup.
oscar% while true;do cat /proc/slabinfo | egrep "dentry|inode"; vmstat | tail -1;
sleep 120; done
inode_cache 11083 11592 480 1449 1449 1
dentry_cache 4477 4500 128 150 150 1
0 0 0 136 7116 17048 198072 0 0 36 64 129 443 20 3 77
inode_cache 11493 11816 480 1477 1477 1
dentry_cache 2611 3690 128 123 123 1
4 0 0 8784 1596 66728 152484 0 1 44 65 131 448 20 3 77
inode_cache 4512 6168 480 771 771 1
dentry_cache 2708 4320 128 144 144 1
3 0 0 24168 2936 170108 50196 0 3 62 66 135 457 20 4 76
inode_cache 1651 4184 480 523 523 1
dentry_cache 778 3330 128 111 111 1
2 0 0 156 18560 130504 74848 4 5 77 68 138 462 21 4 75
inode_cache 11426 11432 480 1429 1429 1
dentry_cache 672 3240 128 108 108 1
2 0 0 44928 1740 58292 151932 4 11 101 77 140 467 21 4 74
inode_cache 10572 11480 480 1435 1435 1
dentry_cache 1099 3240 128 108 108 1
3 0 0 45668 1852 21412 189600 4 11 126 79 142 474 22 4 74
inode_cache 10620 11416 480 1427 1427 1
dentry_cache 1611 3240 128 108 108 1
3 0 0 45648 2068 13020 202140 4 11 152 78 143 482 23 4 73
inode_cache 10637 11416 480 1427 1427 1
dentry_cache 1628 3240 128 108 108 1
3 0 0 45648 1588 12412 200832 4 11 171 77 143 489 24 4 72
inode_cache 10652 11416 480 1427 1427 1
dentry_cache 1643 3240 128 108 108 1
2 0 0 45648 1808 12556 191080 4 11 190 76 143 497 25 5 71
inode_cache 10698 11416 480 1427 1427 1
dentry_cache 1697 3240 128 108 108 1
2 0 0 45648 1736 12788 191300 4 10 208 75 143 504 26 5 70
inode_cache 10729 11416 480 1427 1427 1
dentry_cache 1728 3240 128 108 108 1
Looks like there is some fragmentation ocuring. It stays at near a 1:2 ratio for
most of the backup (using afio) and ends up with the slab cache having 10-20% more
entries than the dcache is using.
Thanks
Ed Tomlinson <tomlins@cam.org>
next prev parent reply other threads:[~2001-04-13 13:36 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-11 11:36 Fwd: Re: memory usage - dentry_cache Marcin Kowalski
2001-04-12 4:48 ` Fwd: Re: memory usage - dentry_cacheg Andreas Dilger
2001-04-12 5:45 ` Alexander Viro
2001-04-12 6:53 ` [PATCH] " Jeff Garzik
2001-04-12 7:10 ` [CFT][PATCH] Re: Fwd: Re: memory usage - dentry_cache Alexander Viro
2001-04-12 8:44 ` David S. Miller
2001-04-12 12:27 ` Marcin Kowalski
2001-04-12 12:43 ` Yoann Vandoorselaere
2001-04-12 13:54 ` Alexander Viro
2001-04-12 17:27 ` Andreas Dilger
2001-04-12 7:00 ` Fwd: Re: memory usage - dentry_cacheg Andreas Dilger
2001-04-12 7:27 ` [race][RFC] d_flags use Alexander Viro
2001-04-12 8:01 ` David S. Miller
2001-04-12 8:06 ` Alexander Viro
2001-04-12 11:46 ` [PATCH] Re: memory usage - dentry_cacheg Ed Tomlinson
2001-04-12 14:56 ` Rik van Riel
2001-04-12 15:12 ` Alexander Viro
2001-04-13 1:34 ` Ed Tomlinson
2001-04-13 2:03 ` Alexander Viro
2001-04-13 4:45 ` Ed Tomlinson
2001-04-13 13:36 ` Ed Tomlinson [this message]
2001-04-12 15:30 ` Marcin Kowalski
2001-04-14 3:28 ` Paul
2001-04-12 14:34 ` [PATCH] Re: Fwd: " Jan Harkes
2001-04-12 14:50 ` Alexander Viro
2001-04-12 15:07 ` Rik van Riel
2001-04-12 15:27 ` Alexander Viro
2001-04-12 15:42 ` Alexander Viro
2001-04-12 15:48 ` Rik van Riel
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=01041309360100.32757@oscar \
--to=tomlins@cam.org \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@conectiva.com.br \
--cc=viro@math.psu.edu \
/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