Re: [mp1 and mp2] Grokking memory

2005-02-13 Thread Steven Lembark
...creating a hash of words from a CR-delimited list of words. The hash winds up taking up a few megabytes of RAM, but it's absolutely never written to, so I figured it would be shared between the mod_perl processes. However, each process grows by a few megs... What's the best way to get around th

Re: [mp1 and mp2] Grokking memory

2005-02-11 Thread Perrin Harkins
On Thu, 2005-02-10 at 19:33 -0500, Richard F. Rebel wrote: > Does this report or help illustrate shared COW pages between apache > processes? I certainly though it did, but this work was done by my friend Doug Steinwand, not by me. I don't really know much more about it, but it always seemed to w

Re: [mp1 and mp2] Grokking memory

2005-02-10 Thread Richard F. Rebel
Ugh, okay. Last BSD system I really payed much attention to was a BSDI system, and that was years ago. There was a simple way to calculate shared memory between processes at the time in BSD/OS, but alas, I am sure it's somewhat different from Linux and I surely don't remember it. On Thu, 2005-0

Re: [mp1 and mp2] Grokking memory

2005-02-10 Thread Richard F. Rebel
Hi Perrin, Does this report or help illustrate shared COW pages between apache processes? I thought that particular part of /proc//statm reported the pages potentially shared with other processes as they are part of dynamically loaded libraries. On my 2.6 kernel: bash-2.05b$ echo $$ 25964 bash

Re: [mp1 and mp2] Grokking memory

2005-02-10 Thread ben syverson
Arg -- I'm not being specific enough again. Sorry. This is all in FreeBSD, which I know handles memory much differently than Linux. Here's a sample line from top: PID USERNAMEPRI NICE SIZERES STATETIME WCPU CPU COMMAND 91778 nobody40 13496K 12584K select

Re: [mp1 and mp2] Grokking memory

2005-02-10 Thread Perrin Harkins
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 th

Re: [mp1 and mp2] Grokking memory

2005-02-10 Thread Richard F. Rebel
Gosh, I am going to take a crack at this, but it's been a long while. I know somewhere this stuff is documented. On Linux these things are not terribly well documented anywhere that I have found. Okay, the VIRT/VSZ/VSS is the virtual memory size of your process. This includes all shared pages

Re: [mp1 and mp2] Grokking memory

2005-02-10 Thread ben syverson
Hi Richard, Sorry -- I should have been more specific: On Feb 10, 2005, at 4:40 PM, Richard F. Rebel wrote: How are you detecting that a process is growing by a couple megs? Via "top" on the command line. Also, you mention that the processes grow by a couple megs. By this do you mean that each sub

Re: [mp1 and mp2] Grokking memory

2005-02-10 Thread Richard F. Rebel
Hi Ben, How are you detecting that a process is growing by a couple megs? Are you looking at the VSS (virtual segment size) because if you are, on most un*x-es this figure should remain roughly the same despite shared segments. Also, you mention that the processes grow by a couple megs. By thi

[mp1 and mp2] Grokking memory

2005-02-10 Thread ben syverson
I don't think I'm getting mod_perl's shared memory scheme yet. I have a package that gets loaded in my startup.pl, and it basically does this: use vars qw(%words); open FILE ... while { $words{$_} = 1; } close FILE; ...creating a hash of words from a CR-delimited list of words. The hash