Re: Memory Measurements and Lots of Files and Inodes

From: Andrew Morton (
Date: Wed Dec 11 2002 - 19:27:32 EST

"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

> ...
> > 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
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Dec 15 2002 - 22:00:23 EST