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
1
280
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
Tweet
Share
More Decks by Nicolas Peters
See All by Nicolas Peters
Devoxx FR 2016 - Java vous déclare sa flamme
npeters
0
1.5k
Other Decks in Technology
See All in Technology
商品レコメンドでのexplicit negative feedbackの活用
alpicola
2
360
月間60万ユーザーを抱える 個人開発サービス「Walica」の 技術スタック変遷
miyachin
1
140
Alignment and Autonomy in Cybozu - 300人の開発組織でアラインメントと自律性を両立させるアジャイルな組織運営 / RSGT2025
ama_ch
1
2.4k
Amazon Route 53, 待ちに待った TLSAレコードのサポート開始
kenichinakamura
0
170
AIアプリケーション開発でAzure AI Searchを使いこなすためには
isidaitc
0
110
ドメイン駆動設計の実践により事業の成長スピードと保守性を両立するショッピングクーポン
lycorptech_jp
PRO
12
2.1k
メールヘッダーを見てみよう
hinono
0
110
完全自律型AIエージェントとAgentic Workflow〜ワークフロー構築という現実解
pharma_x_tech
0
350
深層学習と3Dキャプチャ・3Dモデル生成(土木学会応用力学委員会 応用数理・AIセミナー)
pfn
PRO
0
460
When Windows Meets Kubernetes…
pichuang
0
300
Cloudflareで実現する AIエージェント ワークフロー基盤
kmd09
0
290
2025年に挑戦したいこと
molmolken
0
160
Featured
See All Featured
Scaling GitHub
holman
459
140k
Writing Fast Ruby
sferik
628
61k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
Building Your Own Lightsaber
phodgson
104
6.2k
Unsuck your backbone
ammeep
669
57k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
870
The Cost Of JavaScript in 2023
addyosmani
46
7.2k
Music & Morning Musume
bryan
46
6.3k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Making the Leap to Tech Lead
cromwellryan
133
9k
How to train your dragon (web standard)
notwaldorf
89
5.8k
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