http://qs321.pair.com?node_id=589655


in reply to Reliability of SvREADONLY

Shameless plug: if you want to see how much memory is really being used by different processes (taking copy-on-write etc into account), and you're running a relatively recent Linux, you might want to try Exmap (It's packaged in debian testing and recent ubuntu, so no real need to grab the source in those cases, unless you want the latest version).

It's not the world's most polished tool, but can give you some useful numbers.

Note: it's not particularly useful for single-process analysis, just for examining the degree of sharing between different processes (and breaking that down per file/elf section/elf symbol). In this case, you'll just get a big [heap] figure, but you'll be able to see the 'effective memory used' for each apache process.

It's not perl-specific, so apologies if this is off-topic.