linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "John Berthels" <jjberthels@gmail.com>
To: Matt Mackall <mpm@selenic.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Fengguang Wu <wfg@mail.ustc.edu.cn>,
	Balbir Singh <balbir@linux.vnet.ibm.com>,
	Denys Vlasenko <vda.linux@googlemail.com>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCH][RESEND] maps: PSS(proportional set size) accounting in smaps
Date: Wed, 19 Sep 2007 09:37:21 +0100	[thread overview]
Message-ID: <57d8e7a0709190137v3d90d8e4r40eb254b657e9a94@mail.gmail.com> (raw)
In-Reply-To: <20070917161027.GY4219@waste.org>

On 17/09/2007, Matt Mackall <mpm@selenic.com> wrote:
> The big downside to PSS is that it's expensive to track. We have to
> either visit each page when we report the count or we have to update
> each PSS counter when we change the use count on a shared page. There
> might be some tricks we can pull here but RSS and VSS, on the other
> hand, are effectively O(1). An efficient in-kernel PSS calculator
> might be a little painful if used in something like top(1), but the
> map2 approach definitely won't be fast enough here.

This is the advantage of exmap/pagemap. You don't pay any runtime penalty.

Personally, I'd probably rather make do with RSS and VSS to see which
processes are 'large'. There usually aren't many.

If there's a significant/measurable penalty to tracking PSS in kernel
I'd say why bother? It's a very useful number *when you are interested
in it*. On those occasions you can fire up the more complex tool and
pay the time to walk the page tables. It's not a very dynamic
quantity, so a snapshotting approach works well.

Also exmap (I don't know if pagemap does this) grovels through ELF and
/proc/<pid>/maps so you can see which section+symbol of your shared
lib is hurting you. You're generally going to want this info in order
to do anything about bad PSS numbers, so I'm not sure raw PSS numbers
are directly useful.

Is map2 -mm tree only (I didn't get anything on a grep of mainline
2.6.22.6)? Sorry, I'm a bit out of touch. If I could drop the kernel
module from exmap and use an existing interface that would be great.

jb

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2007-09-19  8:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070917024054.GA12036@mail.ustc.edu.cn>
2007-09-17  2:40 ` Fengguang Wu
2007-09-17  6:51   ` Andrew Morton
2007-09-17  7:08     ` Userspace tools (was Re: [PATCH][RESEND] maps: PSS(proportional set size) accounting in smaps) Balbir Singh
2007-09-17  9:00       ` Christoph Hellwig
2007-09-17  9:11         ` Balbir Singh
2007-09-17  9:15           ` Christoph Hellwig
2007-09-17 12:29             ` Userspace tools Karel Zak
2007-09-17  9:13         ` Userspace tools (was Re: [PATCH][RESEND] maps: PSS(proportional set size) accounting in smaps) Andrew Morton
     [not found]     ` <20070917072136.GA5706@mail.ustc.edu.cn>
2007-09-17  7:21       ` [PATCH][RESEND] maps: PSS(proportional set size) accounting in smaps Fengguang Wu
2007-09-17 16:10     ` Matt Mackall
2007-09-17 17:49       ` Denys Vlasenko
2007-09-19  8:37       ` John Berthels [this message]
     [not found]         ` <20070919085625.GA5910@mail.ustc.edu.cn>
2007-09-19  8:56           ` 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=57d8e7a0709190137v3d90d8e4r40eb254b657e9a94@mail.gmail.com \
    --to=jjberthels@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=mpm@selenic.com \
    --cc=vda.linux@googlemail.com \
    --cc=wfg@mail.ustc.edu.cn \
    /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