puppetlabs/puppet — pull request #234 by masterzen (2011-11-26 15:29:07+00:00)
Title: #11044 - agent should do catalog run in a child process

The current best practice among Puppet users is to run the puppet agent out of cron with —onetime. The rationale is that the puppet agent is a memory hog during a run, but due to the way the ruby interpreter works this memory can never be returned to the OS between runs. Running on cron makes sure puppet doesn’t hold this memory for more than the run.

A simple solution to this issue is to fork into a child process and do the catalog run there.
This process would exit at the end of the catalog execution, thus freeing the memory used during the run.