mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Victoria Muntean" <vikimun@gmail.com>
To: "Hugh Dickins" <hugh@veritas.com>
Cc: "Kernel Linux" <linux-kernel@vger.kernel.org>
Subject: Re: size of swapped-out part of the process
Date: Mon, 17 Nov 2008 16:09:32 +0200	[thread overview]
Message-ID: <ab4346860811170609j2d98a49aif9fcabf3a0402fbc@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0811171343340.11044@blonde.site>

On Mon, Nov 17, 2008 at 4:02 PM, Hugh Dickins <hugh@veritas.com> wrote:
> On Mon, 17 Nov 2008, Victoria Muntean wrote:
>> How can I calculate size of swapped-out part of the process from
>> /proc/PID/*, even if approximately ?
>> For example, I have VmSize=1216192 kB, VmRSS = 628788 kB, but global
>> swap-in-use==0.
>> Hence (VmSize - VmRSS) is far from being swapped-out part of the
>> process. What is ?
>
> I'm sorry, we don't record those numbers per process or per mm,
> so you won't find them in /proc/PID/status or /proc/PID/statm.
>
> And we'd probably resist accepting a patch to add them,
> so as not to enlarge key data structures to hold them.
>
> There's also an ambiguity about what "swapped-out" means: does
> it include shared file pages which were once mapped into the
> process, but have since been freed under memory pressure?
>
> But it looks like you're interested in swapped-out to mean written
> on swap.  In that case, if you have CONFIG_PROC_PAGE_MONITOR=y,
> you can read /proc/PID/smaps and add up all the "Swap:" lines.

ok thanks

> But don't keep reading it in a tight loop: that would
> tend to detract from the performance of your system.

  reply	other threads:[~2008-11-17 14:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ab4346860811170452t2cbcb451u407edca19c9e0ba6@mail.gmail.com>
2008-11-17 12:53 ` Victoria Muntean
2008-11-17 13:33   ` J.R. Mauro
2008-11-17 13:47     ` Victoria Muntean
2008-11-17 13:55       ` J.R. Mauro
2008-11-17 14:08         ` Victoria Muntean
2008-11-17 14:14           ` J.R. Mauro
2008-11-17 14:02   ` Hugh Dickins
2008-11-17 14:09     ` Victoria Muntean [this message]
2008-11-17 19:42     ` Victoria Muntean
2008-11-17 20:31       ` Bryan Donlan
2008-11-17 21:14       ` Andreas Schwab
2008-11-18  1:33       ` 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=ab4346860811170609j2d98a49aif9fcabf3a0402fbc@mail.gmail.com \
    --to=vikimun@gmail.com \
    --cc=hugh@veritas.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®