RE: [flalug] more memory questions...

From: Larry Brown (larry.brown@dimensionnetworks.com)
Date: Sun Mar 14 2004 - 05:43:52 EST


Just wanted to thank everyone for the input, especially Eben. I found the
problem in a directive that was misunderstood in the httpd.conf file. It
was allowing a child to remain in memory for extended periods of time and I
believe I have fixed the problem. I still wish I had a better understanding
of exactly what each of these memory figures correlates to and consequently
why some of the other memory numbers don't add up. I used the information
out of the status pages in proc to load into an array and sort by size to
find out which had the largest VmSize and it was httpd at over 200mb on one
process at the time of the memory spike. If I knew how to break down what
all of these mean, I would configure the script to look at unusual numbers
and give diagnostic results to the user and consequently offer some code to
the community to reuse to diagnose problems they may have.

As that code is now, it loads up and loops at a rate specified by the user
(ie: 30 seconds). It checks a temp file similar to a pid file that just
holds the size of virtual memory useage on last check, it gets the current
size and makes a comparison. If the new size is larger than the original
size (by percentage given as an arguement on execution ie 10 percent) it
starts to output a list of all processes and their
PID,Name,VmSize,VmLck,VmRSS,VmData,VmStk,VmExe and VmLib ordered by VmSize.
I could set it up to take in a threshold amount to only output process with
a size over a certain percentage of the whole etc.

Anyway, just a thought.

Thanks again for the help.

Larry

-----Original Message-----
From: flalug@nks.net [mailto:flalug@nks.net]On Behalf Of Eben King
Sent: Wednesday, March 10, 2004 6:19 PM
To: flalug@nks.net
Subject: RE: [flalug] more memory questions...

On Wed, 10 Mar 2004, Larry Brown wrote:

> So each numbered folder in proc is associated with each running process

yes; /proc/self -> /proc/<reading process' PID>, so you're always
guaranteed that one will exist.

> and status is the file tracking its current size etc.?

Got me. There's all kinds on nifty information in "status".

> FDSize
> VmSize
> VmLck
> VmRSS
> VmData
> VmStk
> VmExe
> VmLib
>
> I take it Vm does not mean Virtual Memory?

Actually I think it does, FVO "virtual" == "real + swap + memory-mapped
files".

> As RSS means the portion loaded into memory right?

"Resident Set Size", IIRC. I don't know exactly what that implies, but my
"top" says vmware has a SIZE of 349M, and a RSS of 348M, and I don't think
all that is swapped in now. ICBW, of course.

> Do you know where can I get a breakdown of the significance of these
> values?

Mmm, try http://www.mozilla.org/projects/footprint/footprint-guide.html
about 2/3 the way down. Also examine "statm", alongside "status";
explanation in Table 1-2 of /usr/src/linux/filesystems/proc.txt .

--
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar
LIBRA:  A big promotion is just around the corner for someone
much more talented than you.  Laughter is the very best medicine,
remember that when your appendix bursts next week.  -- Weird Al



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:15:44 EDT