Re: ima: use of radix tree cache indexing == massive waste of memory?
From: J.H.
Date: Mon Oct 18 2010 - 14:14:15 EST
On 10/16/2010 07:11 PM, Dave Chinner wrote:
> On Sat, Oct 16, 2010 at 05:54:11PM -0700, J.H. wrote:
>> There does seem to be a boot option to disable it, but it seems to be on
>> by default if it's compiled in, and it's not like it's obvious that this
>> is there and chewing up resources, is there a way to find out how much
>> memory this is chewing up?
>
> $ grep iint_cache /proc/slabinfo | awk '// { print $2 * ($4 + 560) / 1048576 "MiB" }'
> 1164.91MiB
> $
Exciting, I saw that too. Not sure I'm going to get to do a reboot on
master before Kernel summit (and it's OS upgrade) but I'm re-compiling
the kernel with IMA disabled.
Master's live backup machine was chewing nearly 4G of memory, and
if/when I flip some of the big frontend machines over this is going to
be a completely unacceptable waste of memory.
For the record I'm really not happy or keen on having to maintain a
custom kernel just to get this disabled, but if it's going to save me 4G
on a single quiet machine I can only assumes it's going to save me
several 10s of gigs on some of the bigger machines.
> $ while [ 1 ]; do
>> grep iint_cache /proc/slabinfo | awk '// { print $2 * ($4 + 560) / 1048576 "MiB" }'
>> sleep 5
>> done
> 955.706MiB
> 937.438MiB
> 928.851MiB
> 920.912MiB
> 919.067MiB
> 919.086MiB
> 919.111MiB
> .....
>
> This is only with about 1.2M inodes cached - yesterday I saw the
> inode cache grow to 3.5M inodes during an rsync run....
>
> Also, it's doing a good job of fragmenting the radix tree node cache
> - it's currently at 50% population - 3.8M entries, 1.9M in use. i.e.
> wasting another ~1GB of RAM itself right now....
Ouch, thanks for giving us a heads up on it, definately not something I
expected to quietly creep in and bite me. I should have a solution, if
one I'm not happy with, in the short term. Hopefully Fedora/upstream
will have a better solution soon.
For the record I liked the explicit opt-in that was mentioned vs. and
automatic opt-in without disable we have now.
- John 'Warthog9' Hawley
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/