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
81
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
840
ヒューマンスキル / The Humanskills
eller86
0
500
医療機関向けシステムの信頼性 / Reliability of systems for medical institutions
eller86
0
270
Server-side Kotlinを使うスタートアップでどんなDetektルールが育ったか / Detekt rules made in start-up working with Server-side Kotlin
eller86
0
1.2k
Java開発者向けのKotlin Gradleビルドスクリプト入門 / Gradle Build Script in Kotlin 101
eller86
1
1.4k
Goodbye JSR305, Hello JSpecify!
eller86
2
4.5k
Java8〜16におけるバイトコード生成の変化 / Changes of Bytecode Generation from Java 8 to 16
eller86
4
4k
Javaプログラミングの体験向上に関する活動 / DX enhancement around Java programming
eller86
0
3.6k
静的解析ツールで生産性向上
eller86
1
840
Other Decks in Technology
See All in Technology
サービスの持続的な成長と技術負債について
siva_official
PRO
10
4.4k
[2024最新版]AWS Control Towerを使ったセキュアなマルチアカウント環境の作り方
hiashisan
0
270
What is DRE? - Road to SRE NEXT@広島
chanyou0311
3
620
Git 研修 Basic【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
310
Scaling Technical Excellence at 104: Evolution in AWS and Developer Empowerment
scotthsieh825
1
150
Github Actions 로 Android 팀의 효율성 극대화
hadonghyun
0
160
20240725 LLMによるDXのビジョンと、今何からやるべきか @Azure OpenAI Service Dev Day
nrryuya
3
1.1k
成長期に歩みを止めないための創業期の開発文化形成
mayah
6
420
LLMアプリケーションの評価の実践と課題 ~PharmaXにおける今後の展望~
pharma_x_tech
2
160
可視化プラットフォームGrafanaの基本と活用方法の全て
hamadakoji
0
230
MySQLのロックの種類とその競合
yoku0825
6
1.6k
スレットハンティングについて知っておきたいこと
hacket
0
130
Featured
See All Featured
It's Worth the Effort
3n
181
27k
Side Projects
sachag
451
42k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
90
47k
Done Done
chrislema
179
15k
Clear Off the Table
cherdarchuk
89
320k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
35
6.3k
Docker and Python
trallard
37
2.9k
What's new in Ruby 2.0
geeforr
338
31k
Adopting Sorbet at Scale
ufuk
71
8.8k
Teambox: Starting and Learning
jrom
130
8.6k
Fireside Chat
paigeccino
25
2.8k
The Invisible Customer
myddelton
117
13k
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