Re: [mp1 and mp2] Grokking memory

[prev] [thread] [next] [Date index for 2005/02/10]

From: Perrin Harkins
Subject: Re: [mp1 and mp2] Grokking memory
Date: 23:32 on 10 Feb 2005
On Thu, 2005-02-10 at 18:28 -0500, Richard F. Rebel wrote:
> As far as I know, especially on linux, there is no way to tell exactly
> how 'shared' your apache processes are, except by using apache+mod_perl
> with GTop (and it's associated apache module).  I certainly don't know
> of a way to get this figure from the command line.  Maybe someone else
> on the list does.

You can read it from /proc.  From Apache::SizeLimit:

sub linux_size_check {
    my($size, $resident, $share) = (0, 0, 0);

    my $file = "/proc/self/statm";
    if (open my $fh, "<$file") {
        ($size, $resident, $share) = split /\s/, scalar <$fh>;
        close $fh;
    } else {
        error_log("Fatal Error: couldn't access $file");
    }

    # linux on intel x86 has 4KB page size...
    return ($size * 4, $share * 4);
}

- Perrin

(message missing)

[mp1 and mp2] Grokking memory
ben syverson 22:27 on 10 Feb 2005

Re: [mp1 and mp2] Grokking memory
Richard F. Rebel 22:40 on 10 Feb 2005

Re: [mp1 and mp2] Grokking memory
ben syverson 22:51 on 10 Feb 2005

Re: [mp1 and mp2] Grokking memory
Richard F. Rebel 23:28 on 10 Feb 2005

Re: [mp1 and mp2] Grokking memory
Perrin Harkins 23:32 on 10 Feb 2005

Re: [mp1 and mp2] Grokking memory
Richard F. Rebel 00:33 on 11 Feb 2005

Re: [mp1 and mp2] Grokking memory
ben syverson 23:43 on 10 Feb 2005

Re: [mp1 and mp2] Grokking memory
Richard F. Rebel 00:35 on 11 Feb 2005

Re: [mp1 and mp2] Grokking memory
Perrin Harkins 21:57 on 11 Feb 2005

Re: [mp1 and mp2] Grokking memory
Steven Lembark 19:39 on 13 Feb 2005

Generated at 11:21 on 20 Feb 2005 by mariachi v0.52