go ahead... be a heretic | |
PerlMonks |
Re^2: TCP Socket, Forking, Memory exhaustion (threads)by tye (Sage) |
on Nov 07, 2007 at 15:39 UTC ( [id://649500]=note: print w/replies, xml ) | Need Help?? |
You could use threads instead of forked processes, that should decrease memory usage. To follow that advice also requires not using Perl. Because Perl's idea of "threads" actually uses more memory than forking (on systems that support real forking not fork emulated using Perl threads, obviously). Perl threads also use the extra memory less efficiently, greatly increasing the cost of thread creation (and destruction). For this situation, switching to Perl threads would have significant disadvantages and no advantages. Yes, I realize that you are suggesting using something other than a Perl script as the heart of the server infrastructure. But I felt that your opening sentence required some clarification since it is the completely wrong approach when dealing with a server written in Perl, and that wasn't made clear. - tye
In Section
Seekers of Perl Wisdom
|
|