http://bugzilla.spamassassin.org/show_bug.cgi?id=3839
------- Additional Comments From [EMAIL PROTECTED] 2004-09-29 10:20 ------- Subject: Re: New: perl's refcounting may be causing us trouble with copy-on-write -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Matt Sergeant writes: > On 28 Sep 2004, at 21:23, [EMAIL PROTECTED] > wrote: > > > 3a. *the plan*: that those N subprocesses never copy that memory; they > > can share > > the read-only config data with the parent process. > > > > 3b. *reality*: shared RAM is very low; each subprocess has its own > > copy of these > > pages, as this "top -b1 -n -c" output from linux 2.6.6 demonstrates: > > > > PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND > > 25963 jm 25 0 1032 24416 21m 4140 0 0.0 2.5 0:00 > > /usr/bin/perl -T > > 25969 jm 25 0 1032 24416 21m 4140 0 0.0 2.5 0:00 > > spamd child > > 25970 jm 25 0 1032 24416 21m 4140 0 0.0 2.5 0:00 > > spamd child > > 25971 jm 25 0 1032 24416 21m 4140 0 0.0 2.5 0:00 > > spamd child > > 25972 jm 25 0 1032 24416 21m 4140 0 0.0 2.5 0:00 > > spamd child > > 25973 jm 25 0 1032 24416 21m 4140 0 0.0 2.5 0:00 > > spamd child > > > > "SHARE" is actually an accurate illustration of how much of that > > memory is being > > shared between those processes; as you can see, the vast majority of > > the SIZE is > > *not* being shared. > > Your analysis is wrong. RSS is the memory being used by the process, > not SIZE. In the above, most of the memory *is* shared. Maybe this > isn't a problem at all? see the bug -- I'd screwed up copying and pasting those lines, and the header doesn't match the other lines. correct output: PID USER PR NI CODE VIRT RES SHR nDRT %CPU %MEM TIME COMMAND 25963 jm 25 0 1032 24416 21m 4140 0 0.0 2.5 0:00 /usr/bin/perl -T 25969 jm 25 0 1032 24416 21m 4140 0 0.0 2.5 0:00 spamd child 25970 jm 25 0 1032 24416 21m 4140 0 0.0 2.5 0:00 spamd child 25971 jm 25 0 1032 24416 21m 4140 0 0.0 2.5 0:00 spamd child 25972 jm 25 0 1032 24416 21m 4140 0 0.0 2.5 0:00 spamd child 25973 jm 25 0 1032 24416 21m 4140 0 0.0 2.5 0:00 spamd child Note that SHR is 4140 KB for all procs, and RES 21 MB. That's 20% of the memory usage being shared (according to the maps, that's all the shared library and interpreter segments) and 80% has been copied for each process (pretty much all the process' heap). > See the section "Process Memory Measurements" in the mod_perl guide > (not sure where it is - I'm referring to the book version). great! I now have pretty much every other perl book O'Reilly have printed, but I don't have a copy of that ;) - --j. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Exmh CVS iD8DBQFBWu7jQTcbUG5Y7woRAmUJAKDosKsNRBMP07RTqyB1z0wjhWd1pACfbxpg WAstMuNYft5N7Nsk5KGS2S8= =Cwmt -----END PGP SIGNATURE----- ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
