Issue #17828 has been updated by Per Cederqvist.
--evaltrace can help, but in my case it isn't that helpful: <table> <tr><td>Total wallclock time</td><td>1047.6 seconds</td></tr> <tr><td>Total time reported by --evaltrace</td><td>241.9 seconds</td></tr> <tr><td>Time reported by /var/lib/puppet/reports</td><td>2.42 seconds</td></tr> <tr><td>Number of resources that --evaltrace reports</td><td>37882</td></tr> <tr><td>Total wallclock time after adding recurselimit => 1</td><td>34.37 seconds</td></tr> <tr><td>Number of resourced after adding recurselimit => 1</td><td>786</td></tr> </table> The top ten largest evaltrace times: <pre>4.68 Info: /Stage[main]/Puppet::Impl::Client/Service[puppet]: Evaluated in 4.68 seconds 2.80 Info: /Stage[main]/Puppet::Impl::Client/Package[puppet]: Evaluated in 2.80 seconds 2.42 Info: /var/lib/puppet/reports: Evaluated in 2.42 seconds 2.38 Info: /Stage[main]/Puppet::Master/Service[puppetmaster]: Evaluated in 2.38 seconds 2.02 Info: Class[Puppet::Report]: Evaluated in 2.02 seconds 2.01 Info: /File[/var/lib/puppet/reports/autocluster-3.oslo.osa/201211201948.yaml]: Evaluated in 2.01 seconds 1.98 Info: /File[/var/lib/puppet/reports/centurion.linkoping.osa/201211031102.yaml]: Evaluated in 1.98 seconds 1.91 Info: Class[Puppet::Impl::Client]: Evaluated in 1.91 seconds 1.89 Info: /File[/var/lib/puppet/reports/minibuilder5.oslo.osa/201211062115.yaml]: Evaluated in 1.89 seconds 1.89 Info: /File[/var/lib/puppet/reports/autocluster-10.oslo.osa/201211180220.yaml]: Evaluated in 1.89 seconds </pre> So removing something that according to evaltrace took 2.42 out of 1047 seconds saved me over 1000 seconds. I don't think that is obious. (Note: the measurements were made with the speedup from issue #17820 applied.) ---------------------------------------- Bug #17828: Warn when eval_generate creates ridiculously many files https://projects.puppetlabs.com/issues/17828#change-77657 Author: Per Cederqvist Status: Needs More Information Priority: Normal Assignee: Per Cederqvist Category: performance Target version: Affected Puppet version: 3.0.1 Keywords: Branch: I had this innocent-looking file resource: <pre> file { "/var/lib/puppet/reports": owner => 'puppet', group => 'puppet', recurse => true, require => Package['puppetmaster'], } </pre> Over time, more and more files accumulated. I now have over 36000 files, and it takes over an hour to process them. Issue #17820 reduces the time to 20 minutes, but by adding recurselimit => 1 I still ensure that the directories are writeable, and "puppet agent --test" now takes only 30 seconds. Quite an improvement over the 4000+ seconds it took yesterday. Tracking down the issue was hard. The enclosed patch prints a warning if more than 1024 files are used, like this: <pre>Warning: Considering 36870 files under File[/var/lib/puppet/reports]; you may want to specify a recurselimit</pre> It would have saved me a couple of days of running ruby-prof and adding debug statements. Running <pre>chown -R puppet:puppet /var/lib/puppet/reports</pre> takes 0.43 seconds. Using the file resource of Puppet to do the same thing in Puppet 3.0.1 takes 4000+ seconds, even when all files have the proper owner. I wonder if something besides issue #17820 could be done about that... -- 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.
