This would be a great wiki page ;-)

On Jun 13, 2012, at 2:46 PM, Daniel Pittman wrote:
> On Wed, Jun 13, 2012 at 1:32 PM, Peter Meier <peter.me...@immerda.ch> wrote:
>> 
>>> Actually, this is a group where y'all probably *can* deliver on
>>> this request:
>>> 
>>> If you are experiencing poor performance, it would be awesome if
>>> you could generate some profiling data for us.
>>> 
>>> perftools.rb is the nicest profiler for Ruby I have found, and if
>>> y'all could install it, grab a sample of the system while it is
>>> being slow, and give us the data that would be awesome.
>> 
>> I can do that. What would be helpful is to get a step by step
>> description on how to do that. Otherwise, I need more time to figure
>> that out and I will probably send you the right thing in the first place.
> 
> It is pretty simple: `gem install perftools.rb` - once that completes
> successfully, generate the profile:
> 
> env CPUPROFILE=/tmp/puppet-agent.profile \
>    CPUPROFILE_REALTIME=1 \
>    CPUPROFILE_FREQUENCY=500 \
>    RUBYOPT="-r`gem which perftools | tail -1`"  =
>    /usr/bin/puppet ...
> 
> Then you can generate a report - which needs graphviz and ps2pdf (or
> ghostscript) with:
> 
> pprof.rb --pdf /tmp/puppet-agent.profile > puppet-agent.pdf
> pprof.rb --callgrind /tmp/puppet-agent.profile > puppet-agent.grind
> 
> The will show the details of where wall-time was spent.  The PDF is
> immediately useful.  The callgrind report is useful for investigation
> with kcachegrind or qcachegrind, which we have here.
> 
> The 'CPUPROFILE' variable sets where the output goes; that is the
> input for pprof.rb reporting.
> -- 
> Daniel Pittman
> ⎋ Puppet Labs Developer – http://puppetlabs.com
> ♲ Made with 100 percent post-consumer electrons
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Developers" group.
> To post to this group, send email to puppet-dev@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-dev+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-dev?hl=en.
> 

-- 
Jo Rhett
Net Consonance : net philanthropy to improve open source and internet projects.



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to