From: Andrew Morton <akpm@digeo.com>
To: "Patrick R. McManus" <mcmanus@ducksong.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Memory Measurements and Lots of Files and Inodes
Date: Wed, 11 Dec 2002 16:09:34 -0800 [thread overview]
Message-ID: <3DF7D3BE.59F4B212@digeo.com> (raw)
In-Reply-To: 20021211235258.GA10857@ducksong.com
"Patrick R. McManus" wrote:
>
> ...
> Just sitting back and watching vmstat while this runs my 'free' memory
> drops from ~600MB to about ~16MB.. the buffers and cache remain roughly
> constant.. at 16MB some sort of garbage collection kicks in - there is
> a notable system pause and ~70MB moves from the used to the 'free'
> column... this process repeats more or less in a steady state.
Probably `negative dentries' - cached directory entries which say
"this file isn't there" so we don't need to go into the fs to
find that out.
If you could share your test apps that would help a lot.
> If, while this is going on, I run another little app that does
> {x= malloc(300MB), memset (x,0,300MB), free (x)}.. suddenly I can move
> 300MB from the used to the 'free' state...
The slab cache (general kernel memory allocator+cache) has mechanisms
for freeing cached objects when memory gets tight. That will recycle
all those negative dentries. If that's what you're seeing.
> ...
> Can anybody provide a better metric for "ram free for userspace
> allocations"?
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.
next prev parent reply other threads:[~2002-12-12 0:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-11 23:52 Memory Measurements and Lots of Files and Inodes Patrick R. McManus
2002-12-12 0:09 ` Andrew Morton [this message]
2002-12-12 0:21 ` Patrick R. McManus
2002-12-12 0:27 ` Andrew Morton
2002-12-13 8:39 ` David Schwartz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DF7D3BE.59F4B212@digeo.com \
--to=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcmanus@ducksong.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.