From: "Richard F. Rebel" <rrebel@whenu.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: Mauricio Lin <mauriciolin@gmail.com>,
linux-kernel@vger.kernel.org,
Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Subject: Re: /proc/*/statm, exactly what does "shared" mean?
Date: Thu, 17 Feb 2005 11:33:22 -0500 [thread overview]
Message-ID: <1108658002.32711.753.camel@rebel.corp.whenu.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0502161559360.18376@goblin.wat.veritas.com>
[-- Attachment #1: Type: text/plain, Size: 3557 bytes --]
Hello Hugh,
On Wed, 2005-02-16 at 16:10 +0000, Hugh Dickins wrote:
> On Wed, 16 Feb 2005, Richard F. Rebel wrote:
> >
> > I have heard that this particular information, while very important to
> > userland developers like me, is probably too expensive to keep track of
> > for most users.
> >
> > Perhaps a way to enable it for developers, whom are willing to spend the
> > cpu cycles, and disable it for regular use would be a solution.
> >
> > Would it be possible develop a solution allowing us to enable/disable
> > this tracking via a sysctl call?
>
> Possible, but I don't think a sysctl would make much sense here.
>
> The most important thing is that any heavyweight information gathering
> should not be happening by default, as a side-effect of something
> frequently run.
Okay and agreed.
> So a lot of people would oppose putting back any such heavyweight
> work into any of the /proc/<pid>/statm fields. But if it goes into
> a separate /proc/<pid>/whatever, not read by current tools, then
> it's much less of a problem.
>
> I'm still resistant, because I think if the information you're
> interested in (how many private pages shared across forks) really
> were of interest to many people, then someone would soon write a
> top-like tool which kept sampling these values, and we'd be back to
> the original situation. Or if it's not of interest to many people,
> then isn't it better off as an out-of-tree patch?
Well, let's put it this way. In general, would you agree that the bulk
of Linux servers on the internet run apache? It's also not hard to
assume that many of these also run apache+php or apache+mod_perl.
Apache has lots of modules and code that can easily be shared between
processes. Especially when you use mod_perl or php. This sharing
significantly effects the memory footprint and saves us all from having
gigabytes of memory that we don't really need. My apache2 processes
have a VSS of around 120MB!
The capacity of a web serving machine is some combination of CPU,
Memory, and IO bandwidth. Being able to measure the copy-on-write pages
for processes is a key variable to determining a machine capacity. This
figure changes over the life of the process as well, and can be used to
tell children to exit once they reach a certain point.
Now, about keeping it in the vanilla kernel: AFAIK, the only way to
acquire this information is from the kernel. It's useful to developers,
and available on most other platforms. Copy on write pages make sense,
why waste tons of RAM when there is no real need? It makes sense to be
able to observe this behavior, and the information can guide developers
to make their applications more efficient.
In many organizations developers do not have the ability/skill to make
custom kernels. They are given development platforms, told to write
their applications, and so on and so on. Patching the kernel for
keeping track of cow's and subsequently maintaining that patch really
doesn't help them much. I could go on but this is getting a bit off
topic.
Best,
Richard Rebel
> But I don't have a dogmatic position on it,
> and trust others' judgement better than my own.
>
> Hugh
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Richard F. Rebel
cat /dev/null > `tty`
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-02-17 16:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-11 22:32 Richard F. Rebel
2005-02-12 13:06 ` Hugh Dickins
2005-02-12 14:39 ` Richard F. Rebel
2005-02-12 15:42 ` Hugh Dickins
2005-02-16 10:41 ` Mauricio Lin
2005-02-16 12:00 ` Hugh Dickins
2005-02-16 15:02 ` Mauricio Lin
2005-02-16 15:17 ` Richard F. Rebel
2005-02-16 16:10 ` Hugh Dickins
2005-02-17 16:33 ` Richard F. Rebel [this message]
2005-02-16 15:58 ` Hugh Dickins
2005-02-16 14:52 ` Benjamin LaHaise
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=1108658002.32711.753.camel@rebel.corp.whenu.com \
--to=rrebel@whenu.com \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
--cc=mauriciolin@gmail.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 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®