Issue #11044 has been updated by Ken Barber.
I tried this out and have some rough numbers for one of my average catalogues.
So the baseline for current 'master' is an RSS of around 94 mb:
root 19560 10.9 1.1 180220 94440 ? Ss 02:20 0:04 ruby
./bin/puppet agent
With this patch ... the main process uses around 40 mb, the catalog runner uses
around 93 mb:
root 17120 0.3 0.4 110300 39964 ? Ss 02:17 0:00 ruby
./bin/puppet agent
root 17122 39.5 1.1 179164 92892 ? R 02:17 0:03 puppet
agent: applyin
and once complete it settles on 40 mb:
root 17120 0.0 0.4 110300 40000 ? Ss 02:17 0:00 ruby
./bin/puppet agent
I'll run it for 24 hours and let you know if I see any major differences.
FYI for comparative reference:
# ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
# uname -a
Linux node1.cloud.bob.sh 2.6.39-2-amd64 #1 SMP Wed Jun 8 11:01:04 UTC 2011
x86_64 GNU/Linux
# cat /etc/debian_version
wheezy/sid
# ls -la /var/lib/puppet/client_yaml/catalog/node.yaml
-rw-r----- 1 root root 318K Nov 27 02:22
/var/lib/puppet/client_yaml/catalog/node.yaml
----------------------------------------
Feature #11044: Puppet agent should fork when applying the catalog
https://projects.puppetlabs.com/issues/11044
Author: Brice Figureau
Status: In Topic Branch Pending Review
Priority: Normal
Assignee: Brice Figureau
Category: agent
Target version:
Affected Puppet version:
Keywords:
Branch: https://github.com/masterzen/puppet/tree/tickets/2.7.x/11044
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. This process would exit at the end of the catalog execution, thus
freeing the memory used during the run.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.