pcp
[Top] [All Lists]

PCP and flamegraphs/Heatmaps

To: "Frank Ch. Eigler" <fche@xxxxxxxxxx>, Ken McDonell <kenj@xxxxxxxxxxxxxxxx>, pcp@xxxxxxxxxxx, Brendan Gregg <bgregg@xxxxxxxxxxx>, Martin Spier <mspier@xxxxxxxxxxx>
Subject: PCP and flamegraphs/Heatmaps
From: Amer Ather <aather@xxxxxxxxxxx>
Date: Tue, 9 Sep 2014 13:59:32 -0700
Delivered-to: pcp@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=mime-version:date:message-id:subject:from:to:content-type; bh=vQx5VG8aOA7m82jb6Uqudl1lfIJGC2eXxJ8oSA17ItU=; b=IyWs6T8nUnlU0gQGpIpm6l4SeqmXDQyCIzzsWafN8izN3sKputcjR29BfQrN82gZ/I gA1UjVKednxvITe0QEJqNyyM88WH/PHQ3Uz9hLwY5m61dMI4yiyrkxmXE33u7IPPFEBU tbVbQdp2WEddLkHhlT/v70PXDTYYjSupte/G8=
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.Â

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:
# perf record -a -g -F 97 sleep 60ÂÂ
# perf scrpt > out.stackÂ
# stackcollapse-perf.pl < out.stacks > out.folded
# flamegraph.pl <out.folded >out.svg

Where out.svg contains interactive flamegraph of all stack samples captured using "perf" tool. In Flame Graphs each box represents a function: y-axis shows the stack depth and x-axis show the sample count. Box width is proportional to the the total time a function or its children (called functions) were on the CPU.Â

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.Â

--
Thanks,

Amer Ather
Cloud Performance Engineering
<Prev in Thread] Current Thread [Next in Thread>