From: Fengguang Wu <wfg@mail.ustc.edu.cn>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: How to find out how many other processes share VM with $PID?
Date: Mon, 27 Aug 2007 20:13:54 +0800 [thread overview]
Message-ID: <388216835.20155@ustc.edu.cn> (raw)
Message-ID: <20070827121354.GA5616@mail.ustc.edu.cn> (raw)
In-Reply-To: <200708271256.31874.vda.linux@googlemail.com>
Hi Denys,
On Mon, Aug 27, 2007 at 12:56:31PM +0100, Denys Vlasenko wrote:
> Hi,
>
> I was a bit frustrated by bad quality of memory usage info
> from top and ps, and decided to write my own utility.
>
> One problem I don't know how to solve is how to avoid counting
> twice (or more) memory used by processes which share VM
> (by use of CLONE_VM flage to sys_clone).
>
> I know how to detect and correctly account for threads
> (processes created with CLONE_THREAD), but how to detect non-threads
> with shared VM?
There is a nice LWN article on this issue:
ELC: How much memory are applications really using?
http://lwn.net/Articles/230975/
Another helpful patch could be:
maps: PSS(proportional set size) accounting in smaps
http://lkml.org/lkml/2007/8/19/23
Fengguang
next prev parent reply other threads:[~2007-08-27 12:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-27 11:56 How to find out how many other processes share VM with $PID? Denys Vlasenko
2007-08-27 12:13 ` Fengguang Wu [this message]
2007-08-27 12:13 ` Fengguang Wu
2007-08-27 13:26 ` Denys Vlasenko
2007-08-28 0:10 ` Fengguang Wu
2007-08-28 0:10 ` Fengguang Wu
2007-08-28 20:00 ` Denys Vlasenko
2007-08-29 7:14 ` Fengguang Wu
2007-08-29 7:14 ` Fengguang Wu
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=388216835.20155@ustc.edu.cn \
--to=wfg@mail.ustc.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=vda.linux@googlemail.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.