|No such thing as a small change
Re: Is it possible to use IPC COW with Perl?by John M. Dlugosz (Monsignor)
|on May 22, 2011 at 19:47 UTC
In a thread from a couple days ago, it was noted that the normal exit of perl will cause everything to be copied since it cleans up and frees data structures!
If you are looking at running programs, you might not be able to tell how much memory is allocated from private (unique) memory. I looked into that to see what my web app was doing, and the replies indicated that in general you might not know if/when pages are shared at all. I only noted that the total memory used by all the processes was larger than my actual memory, so that's a good sign.
Also, there may be a minimal allocation size involved. So try allocating a large amount of stuff, then make many forks and see how the memory load on the machine fares. Be sure the stage the terminations or kill them, or you'll run out during exit!
I was also told to consider "Kernal SamePage Merging" which is available in Linux now.