Stability and Memory Pressure in 8.2

James Cameron quozl at laptop.org
Wed Sep 10 08:05:09 EDT 2008


I had a few hours look at the second largest process, the journal
activity, on Joyride 2412.

VmPeak:    40440 kB
VmSize:    40436 kB
VmLck:         0 kB
VmHWM:     28824 kB
VmRSS:     28824 kB
VmData:    11632 kB
VmStk:       172 kB
VmExe:         4 kB
VmLib:     21992 kB
VmPTE:        48 kB

so it costs 29Mb or so of RSS, most of which is presumably shared.

This is confirmed by smaps, which showed 9Mb or so used by heap.  That
was the main memory cost, so I concentrated on it.  It was the largest
Private_Dirty.

0824f000-08be9000 rw-p 0824f000 00:00 0          [heap]
Size:               9832 kB
Rss:                9608 kB
Pss:                9608 kB
Shared_Clean:          0 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:      9608 kB
Referenced:         9608 kB

For a while I tried working with /proc/$PID/mem until I figured it just
would not work, always got ESRCH on read(2), and mem_read showed I could
only do it to processes that are children of my process.  Odd, so
abandoned that method.

Then I used gdb to generate-core-file and wander through the heap memory
to get an idea of what it might contain.  I did not make a complete
analysis.  I need to learn more about the heap structures before I do
so.

But I did notice one odd thing that I wasn't fully aware of until now
... the byte-code of the built-in modules was present, complete with doc
strings ... for example;

(gdb) x/4bs 0x824f78c
0x824f78c:       "int(x[, base]) -> integer\n\nConvert a string or
number to an integer, if possible.  A floating point\nargument will be
truncated towards zero (this does not include a string\nrepresentation
of a floating"...
0x824f854:       " point number!)  When converting a string, use\nthe
optional base.  It is an error to supply a base when converting
a\nnon-string. If the argument is outside the integer range a long
object\nwill be retu"...
0x824f91c:       "rned instead."
0x824f92a:       ""

and not just once, twice:

$ strings journal.core |grep "supply a base when converting"
the optional base.  It is an error to supply a base when converting a
the optional base.  It is an error to supply a base when converting a

Has anyone got an idea of how to measure the heap by usage?

-- 
James Cameron    mailto:quozl at us.netrek.org     http://quozl.netrek.org/



More information about the Devel mailing list