Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Advanced Modular Software Performance Monitoring
Search
Sasha Mazurov
May 30, 2012
Technology
1
260
Advanced Modular Software Performance Monitoring
CPU profiling with Intel® VTune™ Amplifier XE
Sasha Mazurov
May 30, 2012
Tweet
Share
More Decks by Sasha Mazurov
See All by Sasha Mazurov
L1Calo Offline Software Status
mazurov
0
77
Performance and Regression tests for Simulation
mazurov
0
92
About v2
mazurov
0
70
L1Calo Offline Software Status
mazurov
0
100
L1Calo Offline Software Status
mazurov
0
100
LHCbPR V2
mazurov
0
150
Paper approval
mazurov
0
78
Conventions' Publications
mazurov
0
64
Ph.D final exam
mazurov
0
130
Other Decks in Technology
See All in Technology
OpenShiftでllm-dを動かそう!
jpishikawa
0
130
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
260
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
470
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
210
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
280
AIと新時代を切り拓く。これからのSREとメルカリIBISの挑戦
0gm
2
3k
今こそ学びたいKubernetesネットワーク ~CNIが繋ぐNWとプラットフォームの「フラッと」な対話
logica0419
2
130
Frontier Agents (Kiro autonomous agent / AWS Security Agent / AWS DevOps Agent) の紹介
msysh
3
180
Bill One 開発エンジニア 紹介資料
sansan33
PRO
5
17k
Greatest Disaster Hits in Web Performance
guaca
0
280
インフラエンジニア必見!Kubernetesを用いたクラウドネイティブ設計ポイント大全
daitak
1
380
Agent Skils
dip_tech
PRO
0
120
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
40
2.3k
Writing Fast Ruby
sferik
630
62k
Everyday Curiosity
cassininazir
0
130
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Scaling GitHub
holman
464
140k
How GitHub (no longer) Works
holman
316
140k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
37k
We Have a Design System, Now What?
morganepeng
54
8k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
Transcript
Advanced Modular Software Performance Monitoring CPU profiling with Intel® VTune™
Amplifier XE Alexander Mazurov Ferrara University, CERN
2 I. Event Processing Software II. Profilers III. Intel® VTune™
Amplifier XE IV. Gaudi Framework V. Gaudi Intel Profiler Auditor VI. Profiling examples
3 Physics events The Higgs Boson Simulation * Trigger *
Analysis I. Event Processing Software
4 Detector events Events to storage 106 events/sec 4500 events/sec
LHCb High Level Trigger (HLT) Software Moore
5 II. Profilers Collect information related to how an
application or system perform.
6 Measure frequency and duration of functions calls and/or code
instructions. CPU Profiler
7 Profiling Techniques - Hardware counters - Instrumenting the code
8 Hardware counters Exploit hardware performance counters from Performance Monitoring
Unit (PMU) Counters: - Translation lookaside buffer (TLB) misses - Cache misses - Stall cycles - Memory access latency - ... Perfmon2 * Intel VTune Amplifier
9 Instrumenting the code - Statically: * Change code manually
/ automatically * Compiler assisted (gcc -pg) - Dynamically (at runtime): * Change code in runtime - Valgrind - Google Performance Tools - Intel VTune Amplifier
10 III. VTune™ Amplifier XE Performance Profiling Tool - x86
(32 and 64-bit) - GUI and CLI
11 VTune™ Features Runtime instrumenting profiler - User-mode sampling -
Hardware-based sampling - Concurrency and locks and waits analysis - Threading timeline - Attach to a running process - Source view
12 1) Interupts a process 2) Collect samples of all
active instruction addresses 3) Restore a call sequence upon each sample. How user-mode sampling works?
13 User-mode analysis types - Hotspots - Concurrency - Locks
and Waits
14 User-mode sampling Hotspots analysis:
15 Group results
16 Call Stack
17 Filter by timeline
18 CPU time by code line Debug mode (-g)
19 User-mode sampling is a statistical method and does not
provide a 100% accurate results. Accuracy depends on: - Duration of the collection - Speed of processor - Amount of software activity - Sampling interval * recommended value is 10 ms * profiling is only 5% slower Sampling Accuracy
20 Integrating VTune™ Amplifier to Event Processing Framework
21 IV. Gaudi Event processing framework Moore Trigger Gauss Simulation
Brunel Reconstruction Online Monitoring and commissioning DaVinci Physics analysis
22 Gaudi Architecture Algorithms * Services * Tools
23 Moore Event Loop Hlt1DiMuonHighMassFilterSequence Hlt1DiMuonHighMassStreamer FastVeloHlt MuonRec Velo2CandidatesDiMuonHighMass GECLooseUnit
createITLiteClusters createVeloLiteClusters Algorithms Sequence How to profile algorithms?
24 V. Gaudi Intel Profiling Auditor VTune™ User API +
Gaudi Auditors API
25 VTune™ User API - Start/Pause profiling - Mark profiling
regions
26 Gaudi Auditors API Algorithm Start event End
event Callback functions
27 Algorithms profiling (I) CPU time per sequence branch
28 Algorithms profiling (II)
29 Gaudi configuration from Configurables import IntelProfilerAuditor profiler = IntelProfilerAuditor()
profiler.StartFromEventN = 5000 profiler.StopAtEventN = 15000 AuditorSvc().Auditors += [profiler]
30 Run: $> intelprofiler -o /collected/data job.py Analyze (GUI): $>
amplxe-gui /collecter/data/r001hs Analyze (CLI): $> amplxe-cl -reports hotspots -r /collecter/data/r001hs
31 VI. Profiling examples 1. Memory allocation functions 2. Measuring
profiling accuracy 3. Custom reports
32 1. Memory allocation functions operatornew from libstdc++ library: tc_new
from tcmalloc library: tc_new uses twice less time then operatornew
33 2. Measuring profiling accuracy Intel Profiling Auditor vs .
Timing Auditor Measures the absolute time of algorithm's run 1000 events
34 3. Custom reports Build reports using CSV files exported
from VTune Amplifier
35 Conclusions Intel® VTune™ Amplifier XE: + Various analysis types
and reports + Rich User API + Reasonable overhead time