Re: ima: use of radix tree cache indexing == massive waste of memory?

Dave Chinner
2010-10-17T02:12:09Z

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
$

$ 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....

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com