Re: Memory Measurements and Lots of Files and Inodes

Andrew Morton (akpm@digeo.com)
Wed, 11 Dec 2002 16:27:32 -0800


"Patrick R. McManus" wrote:
>
> ...
> > If you could share your test apps that would help a lot.
>
> sure! this is the "lots of files" program.

Yep, negative dentries:

dentry_cache: 149092KB 149092KB 100.0
ext3_inode_cache: 3425KB 10102KB 33.90
radix_tree_node: 594KB 1612KB 36.88
buffer_head: 543KB 1264KB 42.99

You can monitor these via /proc/slabinfo, or using Bill's bloatmeter
script from http://www.zip.com.au/~akpm/linux/patches/stuff/

> ...
>
> > On your machine it'll be "all of swap plus all of physical memory
> > minus whatever malloc'ed memory you're using now minus 8-12 megabytes".
> > There isn't much memory which cannot be reclaimed unless you have a
> > huge machine or you're doing odd things.
>
> this is useful advice, thanks. Basically what the new procps does?

I don't know what procps does.

But your fill-up-all-memory program will certainly do the trick.
Run it, create a huge swapstorm (or get oom-killed if there's no
swap) and then see what `free' says. That's as much memory as the
kernel will ever give you.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/