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

From: Dave Chinner
Date: Sat Oct 16 2010 - 22:12:13 EST


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@xxxxxxxxxxxxx
--
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/