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
Devoxx 2018 - Async-Profiler, le profiler qu’i...
Search
Nicolas Peters
April 19, 2018
Technology
290
1
Share
Devoxx 2018 - Async-Profiler, le profiler qu’il vous faut !
async-profiler vous surprendra par sa facilité à faire des flamegraph sur une JVM
Nicolas Peters
April 19, 2018
More Decks by Nicolas Peters
See All by Nicolas Peters
Devoxx FR 2016 - Java vous déclare sa flamme
npeters
0
1.6k
Other Decks in Technology
See All in Technology
今年60歳のおっさんCBになる
kentapapa
1
330
本番環境でPHPコードに触れずに「使われていないコード」を調べるにはどうしたらよいか?
egmc
1
240
シン・リスコフの置換原則 〜現代風に考えるSOLIDの原則〜
jinwatanabe
0
150
「決め方」の渡し方 / How to hand over the "decision-making process"
pauli
8
1.3k
Podcast配信で広がったアウトプットの輪~70人と音声発信してきた7年間~/outputconf_01
fortegp05
0
240
AIを活用したアクセシビリティ改善フロー
degudegu2510
1
160
チームで育てるAI自走環境_20260409
fuktig
0
950
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
17k
デシリアライゼーションを理解する / Inside Deserialization
tomzoh
0
110
さくらのクラウドでつくるCloudNative Daysのオブザーバビリティ基盤
b1gb4by
0
120
2026-04-02 IBM Bobオンボーディング入門
yutanonaka
0
250
MCPゲートウェイ MCPass の設計と実装 エンタープライズで AI を「運用できる」状態にする
mtpooh
1
200
Featured
See All Featured
The Curious Case for Waylosing
cassininazir
0
290
30 Presentation Tips
portentint
PRO
1
270
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Odyssey Design
rkendrick25
PRO
2
560
How to build a perfect <img>
jonoalderson
1
5.3k
Bash Introduction
62gerente
615
210k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
95
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.7k
Making Projects Easy
brettharned
120
6.6k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.5k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
190
Transcript
#DevoxxFR Async-Profiler, le profiler qu’il vous faut ! 1
#DevoxxFR Qui ? 2 “You Build It, You Run It”
Nicolas Peters Lead Tech @nicolaspeters https://github.com/npeters
#DevoxxFR 3
#DevoxxFR 4
#DevoxxFR 5
#DevoxxFR 6
#DevoxxFR 7
#DevoxxFR Big Picture async-profiler JVM Classloader Heap Thread Event libasyncProfiler.so
profiler.sh Stack JVMTI attach 8
#DevoxxFR Le Profiling de CPU 9
#DevoxxFR Profiling de CPU: le Sampling 10 AppServerThreadPoolThread.run() Controller.getContents() RepoDAO.readContents()
JsonSerialier.json() Jdbc.execute() Jackson.write() MySql.bind() Temps ???
#DevoxxFR perf_event à la rescousse ! 11
#DevoxxFR perf_event + AsyncGetCallTrace 12
#DevoxxFR Flamegraph >./profiler.sh -d 30 -f /tmp/profile.svg jps 13
#DevoxxFR Flamegraph >./profiler.sh -d 30 -f /tmp/profile.svg jps 14
#DevoxxFR Le Profiling de Mémoire 15
#DevoxxFR Outillage classique pour le GC > jstat -gcutil <pid>
1000 > java -XX:+PrintGCDetails -XX:+PrintGCTimeStamps … 16 > jmap -histo <pid> ou jmap -dump:live,format=b,file=heap.bin
#DevoxxFR Async-profiler -e alloc >./profiler.sh -e alloc -d 30 -f
/tmp/profile-alloc.svg jps 17
#DevoxxFR Le Profiling des points synchronisation 18
#DevoxxFR 19
#DevoxxFR Async-profiler -e lock >./profiler.sh -e lock -d 30 -f
/tmp/profile-lock.svg jps 2 0
#DevoxxFR Microbenchmark 21
#DevoxxFR Microbenchmark 22 JMH
#DevoxxFR JMH > mvn archetype:generate \ -DinteractiveMode=false \ -DarchetypeGroupId=org.openjdk.jmh \
-DarchetypeArtifactId=jmh-java-benchmark-archetype \ -DgroupId=org.sample \ -DartifactId=test \ -Dversion=1.0 23
#DevoxxFR JMH public class MyBenchmark { @Benchmark public int testMethod()
{ ThreadLocalRandom random = ThreadLocalRandom.current(); return random.nextInt() + random.nextInt(); } } > mvn clean install ... > java -jar target/benchmarks.jar -tu ms -prof stack 24
#DevoxxFR JMH public class MyBenchmark { @Benchmark public int testMethod()
{ ThreadLocalRandom random = ThreadLocalRandom.current(); return random.nextInt() + random.nextInt(); } } > mvn clean install ... > java -jar target/benchmarks.jar -tu ms -prof stack 25
#DevoxxFR JMH et Async-profiler <dependency> <groupId>pl.project13.scala</groupId> <artifactId>sbt-jmh-extras</artifactId> <version>0.3.2</version> </dependency> >
mvn clean install ... > java -jar target/benchmarks.jar -tu ms -prof jmh.extras.Async Konrad Malawski 26
#DevoxxFR 27
#DevoxxFR 28
#DevoxxFR Références 29 • Playlist Youtube https://www.youtube.com/playlist?list=PLTT7JEJqc07b-Bx_GbSy7AU2HRu CmBEBc • The
Art of JVM Profiling https://assets.ctfassets.net/oxjq45e8ilak/4mfbX5FJuw0A8M00UK4uKa/ce6 0f2cab12408e01ce927e90ebb2f7a/Andrey_Pangin__Vadim_Tsesko._The_Ar t_of_JVM_Profiling.pdf • Container performance JVM https://www.dropbox.com/s/kp4m0mjr3uo4f54/Container-performance-J VM.pptx?dl=0 • Lightbend https://developer.lightbend.com/blog/2018-04-09-profiling-JVM-applicatio ns/ • Nitsan Wakart http://psy-lob-saw.blogspot.fr/ • Sasha Goldshtein http://blogs.microsoft.co.il/sasha/ • sbt-jmh https://github.com/ktoso/sbt-jmh
#DevoxxFR 30 100 Bullets
#DevoxxFR Merci / Question 31
#DevoxxFR 32
#DevoxxFR Overhead 33 The Art of JVM Profiling
#DevoxxFR Overhead 34 The Art of JVM Profiling
#DevoxxFR Perf vs Async-profiler 35 Container performance JVM
#DevoxxFR FlameScope 36
#DevoxxFR 3 7