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
Profiling for JVM (beta)
Search
Kengo TODA
October 06, 2012
Technology
1
80
Profiling for JVM (beta)
What is profiling? Why we need it? This slide tells you the reason.
Kengo TODA
October 06, 2012
Tweet
Share
More Decks by Kengo TODA
See All by Kengo TODA
JavaとGroovyで書かれたGradleプラグインをKotlinで書き直した話 / Converted a Gradle plugin from Groovy&Java to Kotlin
eller86
0
630
ヒューマンスキル / The Humanskills
eller86
0
480
医療機関向けシステムの信頼性 / Reliability of systems for medical institutions
eller86
0
250
Server-side Kotlinを使うスタートアップでどんなDetektルールが育ったか / Detekt rules made in start-up working with Server-side Kotlin
eller86
0
960
Java開発者向けのKotlin Gradleビルドスクリプト入門 / Gradle Build Script in Kotlin 101
eller86
1
1.2k
Goodbye JSR305, Hello JSpecify!
eller86
2
4.3k
Java8〜16におけるバイトコード生成の変化 / Changes of Bytecode Generation from Java 8 to 16
eller86
4
3.8k
Javaプログラミングの体験向上に関する活動 / DX enhancement around Java programming
eller86
0
3.6k
静的解析ツールで生産性向上
eller86
1
780
Other Decks in Technology
See All in Technology
開発生産性大幅アップ!Postman VS Code拡張機能
nagix
2
360
継続的な改善 x ⾮連続的な進化
sansantech
PRO
3
130
KubeConにproposalを送りたい人へのアドバイス
sat
PRO
2
190
HEXA OSINT CTF V3 作戦会議
meow_noisy
0
130
GraphQL 成熟度モデルの紹介と、プロダクトに当てはめた事例 / GraphQL maturity model
mh4gf
7
1.3k
推しは推せるときに推せ! プロダクトにフィードバックしていこう
nakasho
0
260
アクセシビリティを考慮したUI/CSSフレームワーク・ライブラリ選定
yajihum
2
990
Vertex AI を中心に 生成AIのアップデートを共有します
kaz1437
0
280
Tableau事例紹介 / Tableau Case Study of Eureka
kazuya_araki_tokyo
1
180
反実仮想機械学習とは何か
usaito
PRO
8
3k
4年前、あるじゃん老害エンジニアLT合戦に登壇、米国西海岸コンピュータ歴史博物館体験記の続編
toshi_atsumi
0
220
Meta Quest 3 で動く桜マシマシ WebXR アプリを IBM Cloud Code Engine と Babylon.js で作った話
1ftseabass
PRO
0
120
Featured
See All Featured
Side Projects
sachag
451
41k
Building a Scalable Design System with Sketch
lauravandoore
455
32k
jQuery: Nuts, Bolts and Bling
dougneiner
59
7.1k
How GitHub (no longer) Works
holman
304
140k
Embracing the Ebb and Flow
colly
79
4.1k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
124
32k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Code Reviewing Like a Champion
maltzj
513
39k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
240
1.2M
Visualization
eitanlees
135
14k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
13
1.5k
Practical Orchestrator
shlominoach
181
9.7k
Transcript
PROFILING FOR JVM How to verify your hypothesis - @eller86
Agenda Process to detect the cause of performance problem What
is “profiling”? Tools to profile
Process to detect the cause of performance problem Make hypothesis
from experience and knowledge Get Servlet’s log from middle ware like Jetty Read source code, do debugging, do profiling
What is “profiling”? what? why? GC storm algorithm CPU Other
reading code heap dump I/O Lock? Waiting other system? I/O GC Other thread dump IZQPUIFTJT WFSJpDBUJPO
Tools to profile jmap jstack jstat VisualVM
Taking heap dump $ jmap -dump:format=b,file=dump.dat [PID]
Taking thread dump $ jstack -l [PID] > thread-dump.txt
Judging the reason why JVM uses CPU heavily $ jstat
-gcutil [PID] 250 7 S0 S1 E O P YGC YGCT FGC FGCT GCT 12.44 0.00 27.20 9.49 96.70 78 0.176 5 0.495 0.672 12.44 0.00 62.16 9.49 96.70 78 0.176 5 0.495 0.672 12.44 0.00 83.97 9.49 96.70 78 0.176 5 0.495 0.672 0.00 7.74 0.00 9.51 96.70 79 0.177 5 0.495 0.673 0.00 7.74 23.37 9.51 96.70 79 0.177 5 0.495 0.673 0.00 7.74 43.82 9.51 96.70 79 0.177 5 0.495 0.673 0.00 7.74 58.11 9.51 96.71 79 0.177 5 0.495 0.673 GC was fired Young generation GC was fired
Detecting method which costs too much time
Key point Hypothesis needs verification Know “normal” performance to detect
“abnormal” one
Reference JDK tools and utilities Browsing heap dump VisualVM Diagnosis
documentation @ developerWorks My gist about JVM profiling