Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Memory is not released back to operating system

by shawnhcorey (Pilgrim)
on Mar 03, 2012 at 16:49 UTC ( #957690=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Memory is not released back to operating system
in thread Memory is not released back to operating system

The usual implementation is to have a small controller section of code that forks off the workload onto its child processes. Try to keep you memory footprint of the controller as small as possible. Both the controller section and the worker section are often included in the same binary or script, so that if you have one, you have everything you need to run.

If you are writing a true daemon, have it die and restart periodically. This will get rid of unused memory, open files and sockets, and zombie children that were never harvested. This is usually done by having an entry in the appropriate /etc/rc file.


Comment on Re^3: Memory is not released back to operating system
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2014-04-16 04:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (413 votes), past polls