Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Re: TCP Socket, Forking, Memory exhaustion
in thread TCP Socket, Forking, Memory exhaustion

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        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://649500]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-03-29 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found