Hi Amer,
----- Original Message -----
> Hi Frank and Ken,
>
> Thanks for all your help with pcp. With your help and support, we now have
> PCP 3.9.10-1 running on both Ubuntu Precise and Trusty. Our web tool that
> consumes basic PCP metrics is in beta and our plan is to start testing on
> cloud instances soon.
Great! Hey, OOC - I've been looking into web project builds a bit lately and
I was wondering what build framework you guys are using for this? (CMake? as
described over here... http://www.kitware.com/source/home/post/127 ? thanks!)
> Next phase of our project is to extend PCP to support Brendan's flamegraph .
> flamegraphs is a great tool for visualizing profiling data containing
> application and kernel stack traces. It helps with isolating hot functions
> and stack traces that may be contributing to performance regression.
>
> flamegraph is easy to setup and use:
> $ git clone https://github.com/brendangregg/FlameGraph.git
> # perf record -a -g -F 97 sleep 60
> # perf scrpt > out.stack
> [...]
> Our plan is to integrate flamegraph with PCP. This allows our web tool to
> trigger profiling on-demand basis on the cloud instance. PCP agent (python)
> will then collect 15-20 seconds worth of perf data, process it and save svg
> file in S3 bucket. PCP agent returns success/failure and path of S3 bucket
> to the web client. Web client polls the S3 bucket and displays the svg file
> containing flamegraph in browser.
>
> Please let us know if there is a better way to design this feature in PCP.
As mentioned on IRC, you might find the design here to be quite relevant
(the sleep you have above will be highly problematic for your PMDA):
http://www.pcp.io/pipermail/pcp/2014-June/004925.html
This describes use of perf(1) in the way you're looking for here, using the
PCP "event" metric type. If you've not come across 'em before, these metrics
are quite different to the sampled metrics you'll be familiar with already --
have a read through Chapter 3.6 "Performance Event Metrics" in the Programmers
Guide (http://www.pcp.io/doc/pcp-programmers-guide.pdf) for more details.
These event metric types can be accessed from pmwebd, pmcd and archives, so
whichever approach you wish to take with heatmaps/flamegraphs, this should be
a good approach for extracting the data initially.
Oh, also as discussed on IRC, pmwebd is missing support for the pmStore(3)
part of the PCP protocol - that'd need to be added for web clients (should
be added anyway I guess, independent of your need here - see Frank's notes
over in src/pmwebapi/TODO).
cheers.
--
Nathan
|