in reply to
threads: spawn early to avoid the crush.
We had a similar issue in the past with a perl daemon that forked multiple working children to handle various tasks. Obviously the larger you forking process is the larger the children. His solution was to have the daemon imediatly fork off the "main" process and keep the small initial parent just for the job of forking new processes. If the main program needed another process it would ask the original parent to do it for it. As all the parent was doing was forking new processes it remained nice and small.
He also got to call it a realy cool name. "The Motherforker!" :-)
Remember that amateurs built Noah's Ark. Professionals built the Titanic.