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’il vous faut !
Search
Nicolas Peters
April 19, 2018
Technology
1
270
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
クラウドサインにおけるプロダクトマネージャーの役割と開発プロセス / 20240410_cloudsign-PdM
bengo4com
1
670
カオナビの利用実績をアウトカムへつなげる旅 / example-of-data-management-startup-in-kaonavi
kaonavi
0
120
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs (QCon London)
inesmontani
PRO
0
150
テストプロセスで大事にしていること #jasstnano
makky_tyuyan
0
100
2024/4/26 コンピュータ歴史博物館解説告知
toshi_atsumi
0
190
Hands-on / Kaname Frusawa / Cloud Compare Users Meetup 2024 at University of Tokyo on April 17
paraworld
2
470
株式会社EventHub・エンジニア採用資料
eventhub
0
1.9k
検証を通して見えてきたTiDBの性能特性
lycorptech_jp
PRO
5
2.5k
o11y入門_外形監視を利用したWebアプリケーションへの最適なモニタリング_TechBrew
k5k
2
100
DevOpsメトリクスとアウトカムの接続にトライ!開発プロセスを通して計測できるメトリクスの活用方法
ham0215
0
180
転移学習とドメイン適応の基礎
kmatsui
2
570
Signals Unleashed: The Full Guide
rainerhahnekamp
0
360
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
6.9k
Building Adaptive Systems
keathley
29
1.8k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
29
6k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
243
20k
Mobile First: as difficult as doing things right
swwweet
216
8.6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
75
41k
Done Done
chrislema
178
15k
Optimising Largest Contentful Paint
csswizardry
7
2.3k
4 Signs Your Business is Dying
shpigford
175
21k
Building Your Own Lightsaber
phodgson
97
5.7k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
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