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
生成AIのガバナンスの全体像と現実解
fnifni
1
180
株式会社ログラス − エンジニア向け会社説明資料 / Loglass Comapany Deck for Engineer
loglass2019
3
31k
バクラクのドキュメント解析技術と実データにおける課題 / layerx-ccc-winter-2024
shimacos
2
1.1k
Oracle Cloudの生成AIサービスって実際どこまで使えるの? エンジニア目線で試してみた
minorun365
PRO
4
280
アップデート紹介:AWS Data Transfer Terminal
stknohg
PRO
0
180
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
260
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
250
サーバレスアプリ開発者向けアップデートをキャッチアップしてきた #AWSreInvent #regrowth_fuk
drumnistnakano
0
190
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
430
LINE Developersプロダクト(LIFF/LINE Login)におけるフロントエンド開発
lycorptech_jp
PRO
0
120
KnowledgeBaseDocuments APIでベクトルインデックス管理を自動化する
iidaxs
1
260
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
110
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
32
6.3k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
Designing Experiences People Love
moore
138
23k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
BBQ
matthewcrist
85
9.4k
How to train your dragon (web standard)
notwaldorf
88
5.7k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
GraphQLとの向き合い方2022年版
quramy
44
13k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Automating Front-end Workflow
addyosmani
1366
200k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
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