![]() |
|
go ahead... be a heretic | |
PerlMonks |
Re: TCP Socket, Forking, Memory exhaustionby BrowserUk (Patriarch) |
on Nov 07, 2007 at 11:03 UTC ( #649453=note: print w/replies, xml ) | Need Help?? |
Are you sure that forking a script doubles your memory usage? I thought that on most systems running a second copy of a program, perl in this case, would only increase overall memory usage by the size of the read-write data area only. As the readonly data and code memory would be shared by the processes. Ditto for all subsequent copies. If you're using something like top or PS to assess the memory usage, it may be telling you porkies. Try starting one copy and then record the total free memory figure. Then start a second copy and record the total free memory figure again. The difference will be your actual per process consumption, which in many cases will be far less that the figure suggested by ps/top. Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|