mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: P@draigBrady.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: How do you accurately determine a process' RAM usage?
Date: Wed, 6 Jul 2005 18:16:23 -0700	[thread overview]
Message-ID: <20050706181623.3729d208.akpm@osdl.org> (raw)
In-Reply-To: <42CC2923.2030709@draigBrady.com>

P@draigBrady.com wrote:
>
> I wrote a tool to report how much RAM a
>  particular program (apache for e.g.) was using:
>  http://www.pixelbeat.org/scripts/ps_mem.py
> 
>  I was then pointed at the following:
>  http://wiki.apache.org/spamassassin/TopSharedMemoryBug
>  which describes how copy-on-write pages are
>  not counted as shared since 2.6.
> 
>  So how can one determine how much RAM a process is using?
>  Seems like a fundamental requirement to me.
>  Could we add a "SharedTotal" column to /proc/$$/statm for e.g. ?

Calculating this stuff accurately is very expensive.  You'll get a better
answer using proc-pid-smaps.patch from -mm, but even that won't tell you
things about sharing levels of the pages.


  reply	other threads:[~2005-07-07  1:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-06 18:55 P
2005-07-07  1:16 ` Andrew Morton [this message]
2005-07-07  8:26   ` P
2005-07-07  8:40     ` Andrew Morton
2005-07-07 10:42       ` Hugh Dickins
2005-07-12  9:44       ` P
2005-07-19 20:09         ` Mauricio Lin
2005-07-20 14:34           ` P
2005-07-20 15:32             ` Mauricio Lin
2005-07-20 15:48               ` P

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=20050706181623.3729d208.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=P@draigBrady.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®