Mais conteúdo relacionado
Semelhante a (Tech DeepDive #1) Java Flight Recorder を活用した問題解決 (20)
(Tech DeepDive #1) Java Flight Recorder を活用した問題解決
- 1. Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Tech Deep Dive #1
#1 Java Flight Recorder でJavaアプリに潜む問題をタダで解消できる
かもしれない件
https://techdeepdive.connpass.com/
Akira Matsubayashi
Middleware Sales Consultant
Oracle Japan
- 2. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
2
- 3. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
今日お伝えしたいこと
1. システムのトラブル
2. よくあるトラブルと JFR による解析
3. 告知
3
- 4. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
システムのトラブル
• 色々ありますよね。。。
4
止まる 遅い エラー発生・動かない
(主に開発・テスト時)
- 5. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Application
サーバ
User
Application
Javaを使用したWebシステムだと
5
WEB
サーバ
Database
サーバ
JVM
OS/HWOS/HW OS/HW
- 6. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Application
サーバ
User
Application
Javaを使用したWebシステムだと
6
WEB
サーバ
Database
サーバ
JVM
OS/HWOS/HW OS/HW
User Applicationのコー
ドに起因する問題
システムリソース以上
の想定外の流量が発
生している
効率の悪い
SQL文の問題
ヒープサイズやGCアル
ゴリズムの設定の問題
CPU・メモリ・ディスクが
枯渇、ディスクIO
スレッドやコネクション
の枯渇に起因する問題
1 2 3
4
5
6
- 7. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Java Flight Recorderを使用して解決できたか
ご紹介します
7
- 8. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
ケース)Javaフレームワーク
8
- 9. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
2005年~2009年頃システム開発案件で
流行ったフレームワーク
• アーキテクチャ
9
WebLogic Server / Tomcat / JBoss AP
Spring Framework
Hibernate
iBatis
独自フレームワーク(業務共通)
ユーザー アプリケーション
Struts1.x
- 10. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
某フレームワーク ― 問題
• 結合試験を実施しているが、特定の情報だけ取得できない(常に件数0)
• 結合試験環境でエラーも発生していない
– アプリケーションの業務ログにもエラーの形跡なし
– アプリケーションサーバのログも同様
• 開発者の証言では、UT(ローカルDB)ではデータがちゃんと取得できたと
のこと
• テストデータ及び当該SQLの書き方のどちらかが悪いと予想し
開発メンバーで手分けして総点検
10
- 11. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
某フレームワーク ― JFRで分析
11
- 12. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
某フレームワーク ― 大量発生する例外!
12
- 13. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
某フレームワーク ― Catchで食べている。。。
• フレームワーク側のミス。。。
13
try {
Method method = Framework.class.getMethod(“XXXXXXXX");
method.invoke("");
} catch (NoSuchMethodException e) {
}
「Effective Java」でも
例外を無視してはいけない!と記載アリ
きほんのき
けど意外と気づかない。。。
タイポ
- 14. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
某フレームワーク ― 複雑な問題
14
業務ロジック開発者
フレームワーク(共通処理)開発者
当時はSubversion
コミット
コミット
夜間ビルドで翌日の結合テスト版
UTでは、サンプル
データでテストして
取得できていたの
で、問題ないはず
特にErrorもないか
ら修正版コミット!
- 15. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Q)静的チェックツールの使用で解決できたのでは?
15
A)YES
但し、このときはビルドサーバに静的チェックツールを仕込んでいなかった
この後、ビルドサーバーに静的チェックが追加された
ソースコード
コミット
夜間
ビルド
コミット禁止
メール送信
結合テスト用
アプリケーション
コード
静的チェック
追加
- 16. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
ケース)IoTシステム
16
- 17. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• 拠点内の位置情報をリアルタイムにモニタリングするシステム
IoTシステム ― システム概要
17
可視化
モバイルブラウザ
PCブラウザ
- 18. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
サーバーサイド
IoTシステム ― システム構成概要
18
GW端末
API(収集系)
MySQL
GW端末
GW端末
GW端末
GW端末GW端末
GW端末
GW端末
GW端末
GW端末
GW端末
拠点A
拠点B
拠点C
API(参照系)
IoT
Tag
IoT
Tag
IoT
Tag
- 19. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
IoTシステム ―システムの課題
• 参照系がスローダウンしてしまいユーザビリティが悪い
– 運用開始時はまったく問題なかったが、数ヵ月後に表示不具合多発
19
遅
遅
まれに表示
されない
表示が遅い
- 20. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
IoTシステム ― APIサーバの構成
20
OS:Linux系OS
Tomcat 8
API アプリケーション
Spring Framework
Oracle JDK 8
MVC JDBC
OS:Linux系OS
MySQL
- 21. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
IoTシステム ―スローダウンの原因分析
• やったこと
– topコマンドで監視しつつ、
– vmstatで確認
• 結果、特に問題が無かった
– CPU 使用率が100%張り付きではない
• 一瞬100%近くに上がってはいるけど
– メモリが逼迫しているわけでもない
– ディスクI/Oもほぼなし
21
OSのコマンドを使用した調査
APIアプリケーションの業務ログは若
干不親切(情報が足りていない・・・)
- 22. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
某IoTシステム ― JFRで分析
22
- 23. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
某IoTシステム ― JFRで分析
• CPU使用率:vmstat、topでも確認済み
• GC:特に問題なし
• Thread:特にロック等が発生しているわけでもない
23
そもそも取りたい情報が取れていない
何がスローダウンの原因か分からない
- 24. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
【復習】WebLogic Server で取得できる有用なJFRイベント
24
Servlet
JDBC
Java
こういった有用な情報を取得できると便利だが
- 25. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Tomcatだと
25
Servlet、JDBC、EJB(TomcatにEJBコンテナ存在しないが)
等のイベントは出力されない
Tomcatでは、上記のイベントは取得できない・・・・。
- 26. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Tomcat/Spring Framework向けに独自Eventを作成
• 下記の2種類のイベントを追加
– Spring MVCのREST Controllerが呼ばれたとき
– Spring JDBC経由でSQLを実行したとき
26
独自に追加したJFR Event
- 27. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
REST APIの実行イベント
27
- 28. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
SQLの実行イベント
28
SQL文や取得した結果行数など記録
- 29. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
その結果・・・
29
やたら実行時間の遅いSQL(SELECT文)を即座に発見
- 30. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
原因のSQL文
30
SELECT
table1.type,
table1.lt_val,
table1.ln_val,
table1.detect_time
FROM table1 INNER JOIN table2
ON table1. bid = table2.id
WHERE
table2.user_id = xxxx
AND table2.guid=“xxxxxxxx"
ORDER BY table1.detect_time DESC
LIMIT 100
SELECT
table1.type,
table1.lt_val,
table1.ln_val,
table1.detect_time
FROM table1
WHERE
table1.bid =
(SELECT table2.id
FROM table2
WHERE
table2.guid = “xxxxxxxx“
AND table2.user_id =xxxx )
ORDER BY table1.detect_time DESC
LIMIT 100
変更
- 31. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
その結果・・・
31
やたら実行時間の遅いSQL(SELECT文)を即座に発見
MySQLで当該SQLの実行計画を見てみると (explain文)一部のFull Scan
• アプリケーションの画面で、検索する際に使用するWhere句の一部にIndexが
張られていない
• 不要なテーブルも結合
• Index追加
• SQL文を変更
- 32. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Q)MySQL の スロークエリログ でも原因がわかるのでは?
32
A)YES
但し、設定していなかった
(デフォルトではOFF)
- 33. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
【ご参考】MySQL入門(チューニング基礎編)
33
https://downloads.mysql.com/presentations/20151208_02_MySQL_Tuning_for_Beginners.pdf
- 34. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Applicationチームだけでクイックに原因追求できる
Java Flight Recorderはやっぱり重宝します
34
Database
インフラ担当
Application
Server
インフラ担当
Application
開発者
スロークエリーログJFR ダンプファイル
- 35. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
JDK9 以降のカスタムイベント作成方法(一部)
35
import com.oracle.jrockit.jfr.EventDefinition;
import com.oracle.jrockit.jfr.EventToken;
import com.oracle.jrockit.jfr.TimedEvent;
import com.oracle.jrockit.jfr.ValueDefinition;
@EventDefinition(path = "SpringFramework/Data/JDBC"
, name = "SQL Execute", description = "", stacktrace = true, thread = true)
public class MySpringJDBCEvent extends TimedEvent{
@ValueDefinition(name = "SQL Statement", description = "exected sql statement.")
private String sqlStatement;
public MySpringJDBCEvent(EventToken eventToken) {
super(eventToken);
}
public String getSqlStatement() {
return sqlStatement;
}
public void setSqlStatement(String sqlStatement) {
this.sqlStatement = sqlStatement;
}
}
import jdk.jfr.Category;
import jdk.jfr.Description;
import jdk.jfr.Enabled;
import jdk.jfr.Event;
import jdk.jfr.Label;
@Label("SQL execute")
@Description("Spring JDBC")
@Category({"Spring","Data"})
@Enabled(true)
public class MyJFREventJDBC extends Event{
@Label(“sql")
@Description(“executed sql statement.")
public String sql;
}
JDK 8以前
非サポートの作成方法(真似しないで下さい)
JDK9以降
正式なカスタムイベント作成方法
登壇者は上記の方法でカスタムイベントを作成
しましたがサポートされない方式です
【参考】http://hirt.se/blog/
- 37. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
【ご参考】Jfr4Jdbc
• JDBCを使用した処理に関するJFRカスタムイベント
https://github.com/chiroito/Jfr4Jdbc
37
Tech Deep Dive #0 登壇者
いとうちひろさん 作成
- 38. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
ケース)遅いバッチ
qiita.com/ の記事より
38
- 39. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• 月次の〆処理を行い、別のデータベースに結果を登録するバッチ
遅いバッチ ― システム概要
39
Database
Java Batch
SELECT
結果をINSERT
Database
- 40. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• どんどん劣化していくバッチの処理時間
遅いバッチ ― システム概要
40
30000
42000
50000
62000
3.2
8.6
16
25
0
5
10
15
20
25
30
0
10000
20000
30000
40000
50000
60000
70000
3月 4月 5月 6月
データ件数
データ件数
処理時間(Sec)
バッチ完了時間(秒)
- 41. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• 結局SELECT文が劣化しているのだろうと思いきやそうでもない
遅いバッチ ― システム概要
41
Database
Java Batch
SELECT
結果をINSERT
Database
ここは高速
- 42. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
遅いバッチ ― JFRで分析
42
- 43. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
遅いバッチ ― JFRで分析
43
Java.util.LinkedList#get
- 44. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
遅いバッチ ― JFRで分析
44
List<TrackHistoData> list = trackHistoDao.getLatestData(Resion.JP);
// 前処理
for(int i = 0 ; i < list.size() ; i++) {
if(list.get(i).bid.equals("I0.0")) {
list.get(i).deleteFlg = true;
}
}
ここの処理コストが高い
【理由】データの取得はシーケンシャルアクセス
- 45. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
遅いバッチ ― LinkedListとArrayList
45
ランダムアクセスと、シーケンシャルアクセス
- 46. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
遅いバッチ ― 拡張for文に変更
46
List<TrackHistoData> list = …
for(int i = 0; i < list.size(); i++) {
if(xxxx) {
// ビジネスロジック
}
}
List<TrackHistoData> list = …
for(TrackHistoData d : list) {
if(xxxx) {
// ビジネスロジック
}
}
変
更
- 47. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
遅いバッチ ― LinkedList
• ふつうに#get()すると
– ループ1回目:{1件目}
– ループ2回目:{1件目⇒2件目}
– ループ3回目:{1件目⇒2件目⇒3件目}
47
効率が悪い・・・。
ループの回数が多くなると、データのアクセスに時間がかかる
- 48. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
遅いバッチ ― LinkedList
• 拡張for文に変更すると
– ループ1回目:{1件目}
– ループ2回目:{2件目}
– ループ3回目:{3件目}
48
効率のよいアクセス
- 49. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 49
javapの実行結果
331: invokeinterface #179, 1 // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator
336: astore 8
338: goto 372
341: aload 8
343: invokeinterface #183, 1 // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
348: checkcast #92 // class com/gs/jfr/TrackHistoData
351: astore 7
353: aload 7
355: getfield #115 // Field com/gs/jfr/TrackHistoData.bid:Ljava/lang/String;
358: ldc #155 // String I0.0
360: invokevirtual #157 // Method java/lang/String.equals:(Ljava/lang/Object;)Z
363: ifeq 372
366: aload 7
368: iconst_1
369: putfield #162 // Field com/gs/jfr/TrackHistoData.deleteFlg:Z
372: aload 8
374: invokeinterface #189, 1 // InterfaceMethod java/util/Iterator.hasNext:()Z
拡張for文の場合、コンパイラがIteratorに変換する
- 50. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
遅いバッチ ― 拡張for文に変更(結果)
• データ約60,000件のとき
50
250000
6
0
50000
100000
150000
200000
250000
300000
変更前 変更後
処理時間
処理時間
変更前 25 秒 ⇒ 変更後 6ミリ秒
- 51. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
ケース)グリッド処理システム
51
- 52. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
グリッド処理システム―概要
52
JVM
JVM
JVM
JVM JVM
JVM
JVM
JVM
JVM
計算実行
結果返却 計算クラスタ
(複雑な計算処理)
MW
MW
MW MW
MW
MW
MW
MW
MW
- 53. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
グリッド処理システム―問題概要
53
JVM
JVM
JVM
JVM JVM
JVM
JVM
JVM
JVM
計算クラスタ
(複雑な計算処理)
クライアント
DOWN
計算実行すると、JVMがなぜかDOWNし、最終的にクラスタが停止する
結果まだー?
計算実行
MW
MW
DOWN
MW
MW
MW
MW
DOWN
- 54. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
【ご参考】データグリッドとは
54
• 複数マシン上で大量データを分散管
理する分散データ管理機能
分散データ管理
• 分散された大量データを効率的に処
理するためのデータ処理機能
分散データ処理
• 複数マシンを管理するためのクラスタ
機能
クラスタ管理
大量データを効率的に扱うためのアーキテクチャ
3つの特長
- 55. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
グリッド処理システム―アーキテクチャ概要
• インメモリデータグリッドのミドルウェア
– 3ノードのクラスタ
– ヒープ上にデータを展開
– 各JVMプロセスはヒープ上のデータに対して
計算処理を実行
55
JVM
アプリケーション
JVM
アプリケーション
JVM
アプリケーション
MW(IMDG)
MW(IMDG)
MW(IMDG)
- 56. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
グリッド処理システム― JFRのダンプファイルの確認
56
- 57. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
グリッド処理システム― JFRのダンプファイルの確認
• CPU使用率
57
JVM#1
JVM#2
JVM#3
- 58. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
グリッド処理システム― JFRのダンプファイルの確認
58
CPU使用率
スレッド数
300
JVM#1
スレッドも多いが、他のJVMも同様
- 59. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
グリッド処理システム― JFRのダンプファイルの確認
• 仮説が成り立つ
59
クラスター内のJVM毎のWorker Thread 数が多い
Thread間で激しいCPUの争奪戦が発生 ⇒ 枯渇する(100%張り付き)
クラスターがクラスター維持のために使用しているThreadもCPU使えなくなる
クラスター間のハートビートが途絶え、当該JVMがDOWN扱いとなりクラスターメン
バーから除外される
- 60. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
グリッド処理システム― JFRのダンプファイルの確認
• 仮説
– クラスターで働くThread数を少なくすればよいのではないか
– これによって、処理の並列度が落ちて、処理性能が劣化するかもしれないが
計算処理が途中で終了するよりはよい
60
クラスター内のJVM毎のWorker Thread 数を少しづつ減らしてテストしてみる
- 61. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
グリッド処理システム― 結果
61
並列分散処理系のクラスターを扱う際は、
計算処理だけにフォーカスせず、クラスターを維持するために働いている人用のシステムリソー
スも考慮する(CPU、メモリ等)
CPU使用率
スレッド数=512
CPU使用率
スレッド数=16
- 62. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Q)そもそもJVM#1だけがCPU100%になったのか?
62
A)クラスターの各JVMに割り当てるデータ量が
平準化されていなかったから
- 63. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
クラスターメンバーにやさしい社会を作ろう
63
常識的な話ですが、並列分散処理系のクラスターを扱う際は、
仕事量(各JVM)をなるべく均一化させることも大切
私だけ仕事
が多い
JVM#1 JVM#2 JVM#3
- 64. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
【ご参考】クラスターメンバーにデータを平準化させるには
• 製品によって異なる
• Oracle Coherenceの場合
– デフォルトで各クラスタメンバーが同量のデータを持つように平準化
64
JVMJVM JVM
Coherence Coherence Coherence
東京 東京 東京 東京大阪大阪 鳥取東京 大阪
- 65. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
【ご参考】Oracle Coherence
Partitioned Cacheのデータ分散方式
• Coherenceは内部で論理的なパーティションを保持
– パーティションとメンバー(JVM単位)の割り当て表を各メンバーが保持
– パーティション数が均等になるように各メンバーに割り当てられる
– メンバー情報は専用のクラスタ用プロトコル(TCMP)にて整合性を担保
• Keyのハッシュ値からパーティションにマッピング
65
Key Value Key Value Key Value
0 1 2 3 4 N
● ● ●
5
Member
ID=1
Member
ID=2
Member
ID=3
Member
ID=4
パーティション算出ロジック
① Key → パーティションID
Keyのシリアライス化したハッシュ値
からパーティションIDを算出
キャッシュデータ
論理的なパーティション
(デフォルト257、変更可
能)
CoherenceクラスタメンバJVM
(メンバIDによって区別される)
② パーティションID → メンバID
パーティション割り当て表から対象
のメンバIDを取得
- 66. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
【ご参考】クラスターメンバーにデータを平準化させるには
• Oracle Coherenceの場合
– あえて偏らせることも可能(KeyAssosiation)
– 一つのJVM上でまとめて処理したい場合
66
JVMJVM JVM
Coherence Coherence Coherence
東京 東京 東京 東京 大阪 大阪 鳥取
- 68. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Application
サーバ
User
Application
まとめ
Javaを使用したWebシステムだと
68
WEB
サーバ
Database
サーバ
JVM
OS/HWOS/HW OS/HW
User Applicationのコー
ドに起因する問題
システムリソース以上
の想定外の流量が発
生している
効率の悪い
SQL文の問題
ヒープサイズやGCアル
ゴリズムの設定の問題
CPU・メモリ・ディスクが
枯渇、ディスクIO
スレッドやコネクション
の枯渇に起因する問題
1 2 3
4
5
6
- 69. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Application
サーバ
User
Application
まとめ
Javaを使用したWebシステムだと
69
WEB
サーバ
Database
サーバ
JVM
OS/HWOS/HW OS/HW
User Applicationのコー
ドに起因する問題
システムリソース以上
の想定外の流量が発
生している
効率の悪い
SQL文の問題
ヒープサイズやGCアル
ゴリズムの設定の問題
CPU・メモリ・ディスクが
枯渇、ディスクIO
スレッドやコネクション
の枯渇に起因する問題
1 2 3
4
5
6
- 70. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
本日ご紹介した JFRで見つけることができた問題
• User Applicationのコードに起因する問題
– Catch節でなにもしない(例外もみ消し)
– 効率の悪いリストアクセス
• 効率の悪いSQL文
• 偏ったデータが起因するデータグリッド処理
70
- 71. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Application
サーバ
User
Application
まとめ
Javaを使用したWebシステムだと
71
WEB
サーバ
Database
サーバ
JVM
OS/HWOS/HW OS/HW
User Applicationのコー
ドに起因する問題
システムリソース以上
の想定外の流量が発
生している
効率の悪い
SQL文の問題
ヒープサイズやGCアル
ゴリズムの設定の問題
CPU・メモリ・ディスクが
枯渇、ディスクIO
スレッドやコネクション
の枯渇に起因する問題
1 2 3
4
5
6
- 72. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
まとめ ― 【ご参考】ガベージコレクションの確認(1)
72
マイナーGC、FullGCの発生
状況、停止時間を確認
- 73. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
まとめ ― 【ご参考】ガベージコレクションの確認(2)
73
実際の処理とGCの発生を
つき合わせて確認可能
- 74. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
References
• ドキュメント
– https://docs.oracle.com/javacomponents/jmc-5-5/jfr-runtime-guide/toc.htm
74
- 76. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Java Flight RecorderがOpen Source化の予定
76
JavaOne 2017 で発表
詳細な時期は、公式アナウンスを待ってください
- 77. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 77
Java Mission Control 6.0 大幅に変更されたUI
- 78. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The preceding is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
78