pmu-tools
HeatMap
pmu-tools | HeatMap | |
---|---|---|
3 | 1 | |
1,922 | 305 | |
- | - | |
9.2 | 0.0 | |
17 days ago | over 2 years ago | |
Python | Perl | |
GNU General Public License v3.0 only | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pmu-tools
-
Gallery of Processor Cache Effects
I am not seeing it mentioned anywhere, but for people looking for a good starting point on "low-level" CPU performance debugging, intel's CPU top-down u-architecture method (https://www.intel.com/content/www/us/en/docs/vtune-profiler/...) is a good systematic way to understand where you CPU is speeding most of it's cycle.
They also have two tools which basically implement this analysis and spit a bunch of very useful metric that are actionable and very easy to understand
- Intel Vtune is a fantastic tool to start with. It's currently free to use, support most OSes and very friendly to use for beginner.
- Intel pmu-tools (https://github.com/andikleen/pmu-tools) is basically command line version of Vtune.
-
if you had to restart at 0 knowledge what would you do?
Install some tool that would help you see the performance of your system, like a graph of the CPU usage, the top processes being used, disk activity/read/write, etc. Every time you run your program, glance at those numbers, eventually you'll develop an intuition. Basically write code and profile. A good exercise would be practicing with data structures, this site has an exhaustive list of them, find some stuff that's interesting then google the implementation, then build it yourself, test it, debug, profile, optimize, and understand the performance constraints. Eventually you'll develop better understanding and can compare between other people's works, optimizing them. If you want to go beyond, read some papers on lock-free algorithms https://github.com/JCTools/JCTools/tree/master/resources then read Brendan Gregg's blog and books. Read about how profiling tools work https://github.com/andikleen/pmu-tools/wiki/toplev-manual
-
Linux Perf Examples
Toplev is a godsend (thank you Andi Kleen!). If you work with perf you'll love this.
https://github.com/andikleen/pmu-tools
HeatMap
-
Linux Perf Examples
> [...] how Perf compares to vendor tools like vTune [...] ?
Regarding the hardware events that Perf can capture on x86, it has pretty much all of them. So it should be equivalent to vTune for all practical purposes.
The big difference is in the UI -- or absence thereof. Perf is a low-level tool and its output is mostly text files. There is a curses-based TUI for perf-report (and even gtk version, but it is essentially the same as the TUI, just using GTK2 widgets), but that's about it.
By contrast, vTune comes with a heavy (electron-based?) GUI and is quite helpful in guiding beginners, with many graphs and explanations.
Of course, one can (and is expected to) complement Perf with an assortment of tools that process its output for visualization. For example, the flamegraph [1] and heat map [2] tools described in the article. But also KDAB hotspot [3] or HPerf for a vTune-style perf-report.
[1] https://github.com/brendangregg/FlameGraph
[2] https://github.com/brendangregg/HeatMap
[3] https://github.com/KDAB/hotspot
[4] https://www.poirrier.ca/hperf/
What are some alternatives?
FlameGraph - Stack trace visualizer
bips - Bitcoin Improvement Proposals
hotspot - The Linux perf GUI for performance analysis.
Aeron - Efficient reliable UDP unicast, UDP multicast, and IPC message transport
JCTools
Event Store - EventStoreDB, the event-native database. Designed for Event Sourcing, Event-Driven, and Microservices architectures