The document discusses DynamoDB, Amazon's key-value and document database that delivers single-digit millisecond performance at any scale. It provides an overview of DynamoDB, including its features like automatic scaling of throughput capacity and storage as demand increases. The document also covers DynamoDB data modeling concepts like primary keys, secondary indexes and global secondary indexes to help with query and access patterns.
AWS Japan YouTube 公式チャンネルでライブ配信された 2022年4月26日の AWS Developer Live Show 「Infrastructure as Code 談議 2022」 の資料となります。 当日の配信はこちら からご確認いただけます。
https://youtu.be/ed35fEbpyIE
The document discusses graph databases and their properties. Graph databases are structured to store graph-based data by using nodes and edges to represent entities and their relationships. They are well-suited for applications with complex relationships between entities that can be modeled as graphs, such as social networks. Key graph database technologies mentioned include Neo4j, OrientDB, and TinkerPop which provides graph traversal capabilities.
This document provides information about an AWS webinar on AWS Step Functions hosted by Yuta Imamura from Amazon Web Services Japan. The agenda includes an overview of Step Functions, state machines, data input and output, describing states, checking execution status, and additional details. Step Functions allows orchestrating distributed applications and microservices using state machines defined in Amazon States Language (ASL). States can pass data and parameters between each other to synchronize processes.
The document discusses redundancy connections between on-premises environments and AWS. It introduces AWS Network Solutions Architect Kikuchi Nobuaki and the agenda which includes why redundancy is needed, options for redundancy, achieving higher availability, operating securely, and conclusions. Redundancy is important to ensure reliable connectivity between on-premises networks and AWS VPCs. The document reviews example outages and AWS' efforts to ensure availability. Common redundancy options with AWS include connecting with multiple Direct Connect circuits or using a combination of Direct Connect and VPN connections.
AWS Black Belt Online Seminarの最新コンテンツ: https://aws.amazon.com/jp/aws-jp-introduction/#new
過去に開催されたオンラインセミナーのコンテンツ一覧: https://aws.amazon.com/jp/aws-jp-introduction/aws-jp-webinar-service-cut/
AWS Japan YouTube 公式チャンネルでライブ配信された 2022年4月26日の AWS Developer Live Show 「Infrastructure as Code 談議 2022」 の資料となります。 当日の配信はこちら からご確認いただけます。
https://youtu.be/ed35fEbpyIE
The document discusses graph databases and their properties. Graph databases are structured to store graph-based data by using nodes and edges to represent entities and their relationships. They are well-suited for applications with complex relationships between entities that can be modeled as graphs, such as social networks. Key graph database technologies mentioned include Neo4j, OrientDB, and TinkerPop which provides graph traversal capabilities.
This document provides information about an AWS webinar on AWS Step Functions hosted by Yuta Imamura from Amazon Web Services Japan. The agenda includes an overview of Step Functions, state machines, data input and output, describing states, checking execution status, and additional details. Step Functions allows orchestrating distributed applications and microservices using state machines defined in Amazon States Language (ASL). States can pass data and parameters between each other to synchronize processes.
The document discusses redundancy connections between on-premises environments and AWS. It introduces AWS Network Solutions Architect Kikuchi Nobuaki and the agenda which includes why redundancy is needed, options for redundancy, achieving higher availability, operating securely, and conclusions. Redundancy is important to ensure reliable connectivity between on-premises networks and AWS VPCs. The document reviews example outages and AWS' efforts to ensure availability. Common redundancy options with AWS include connecting with multiple Direct Connect circuits or using a combination of Direct Connect and VPN connections.
AWS Black Belt Online Seminarの最新コンテンツ: https://aws.amazon.com/jp/aws-jp-introduction/#new
過去に開催されたオンラインセミナーのコンテンツ一覧: https://aws.amazon.com/jp/aws-jp-introduction/aws-jp-webinar-service-cut/
作って(壊して?)学ふ?インターネットのしくみ サイハ?ーエーシ?ェントの実験用ASの紹介 / Introduce experimental AS in ...whywaita
?
サイバーエージェントの社内エンジニアカンファレンス CA BASE CAMP 2021で発表した資料です
再アップロード版: https://speakerdeck.com/whywaita/as-introduce-experimental-as-in-cyberagent-internet-seminer
Using JCache
This document discusses Java Caching (JCache), the Java standard for caching APIs specified in JSR-107. It introduces caching concepts and benefits, describes the key interfaces and classes in JCache like CacheManager and Cache, and demonstrates features like entry processors. It also discusses JCache implementations like Hazelcast and annotations for method-level caching. The future of JCache is outlined, with plans for JCache 1.1, 2.0 aligned with Java EE 8, and 3.0 aligned with future Java versions. The document ends with information on Hazelcast's JCache support.
1. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
パフォーマンス ボトルネック
国内あるある事例
タクトシステムズ株式会社
ソリューション事業部
2. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
弊社について
?タクトシステムズ株式会社
– 1986年設立 社員数140名
– 独立系SIerとして顧客要望に合わせたシステムを構築
– dynaTraceの国内第1号販売代理店
– ユーザとして実際にdynaTraceを利用することで
発見した事例をより多くの皆様に伝えたい→本発表に至る
– JJUGの鈴木会長にご提案し、お使い頂いております
1
+
3. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
ボトルネックとは
?直訳すると 「瓶(びん)の首」
?最も流れが滞る箇所
?システムのパフォーマンスについてのボトルネックとは、
ある処理の実行時間のうち、1番時間がかかっている箇所
特徴
?ボトルネック以外の箇所を改善しても効果が薄い
?ボトルネックは移動する
– ボトルネックを改善することで、その箇所はボトルネックではなくなり、
新たな箇所がボトルネックとなる
2
4. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
ボトルネックの種類
?プログラム視点のボトルネック
– 大きな一つの処理がある
– 経験とカンである程度予測できる
→システムの複雑化により特定が困難に
– SQL が原因のケースがよくある
?トランザクション視点のボトルネック
– 大量の処理がある
– 従来の観点?手法では特定が困難
– ループ誤り、非効率なロジック
3
5. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
事例紹介
?dynaTraceにより発見した以下事例をご紹介
1. DBコネクション(プーリング未設定)
2. Synchronizedによる排他処理
3. 大量のSQL実行
4. 文字列結合
5. Proxy設定のトラブル<番外編>
4
6. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
事例1. DBコネクション(プーリング未設定)
5
DBサーバ
コネクション
プール
org.apache.commo
ns.dbcp.BasicDa
taSource
getConnection()
org.springframewor
k.jdbc.datasource.
DriverManager
DataSource
getConnection()
(デフォルト)
プーリングなし プーリングあり
毎回新しくコネクションを張り、
ボトルネックとなっていた
○×
7. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
事例1. DBコネクション(プーリング未設定)
6
種類 プログラム視点のボトルネック
要因 I/O
内容 SpringフレームワークのDBコネクション設定をデ
フォルトのまま使用していたため、コネクション
プールを使用しない動作となっていた。
対応 コネクションプールを使用する設定へ変更した。
原因 フレームワークの設定を全て把握することは難し
い。とりあえずデフォルトで動かしていた。
発見難易度:中 DB接続周りのログは、確認しやすいが、
思い込みによって、コネクションプーリングを利用
していないことに気付かない場合がある。
8. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
事例2. Synchronizedによる排他処理
7
スレッド1
???
マスタデータ
取得処理
Synchronized
Synchronized
スレッド2 スレッド3
Synchronized
待ち
待ち
×
×
×
9. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
事例2. Synchronizedによる排他処理
8
種類 プログラム視点のボトルネック
要因 同期待ち
内容 ログイン時の処理でSynchronizedによる排他をか
けたところ、同時アクセスで同期待ちが大量発生。
対応 処理タイミングをログイン時からアプリケーション
起動時に変更した。
原因 スレッドセーフを実現するために、安易に
Synchronizedを使用していた。
排他をかける範囲や必要性を吟味すべき。
発見難易度:高 JMXよりスレッドの状態、スレッドのブロック時間、
さらにはスタックトレースを何度も繰り返し取得し
分析する必要がある。
10. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
事例2. Synchronizedによる排他処理
9
11. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
事例3. 大量のSQL実行
10
DBサーバ
アプリケーション
サーバ
Insert文
1回の実行時間は短いが…
繰り返すと
ボトルネックに…
×
○
executeBatch
で格段に早く
DBサーバ
アプリケーション
サーバ
12. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
事例3. 大量のSQL実行
11
種類 トランザクション視点のボトルネック
要因 I/O
内容 大量のデータ登録処理を、データ1件ずつInsert
文を発行していた。結果、30秒以上の処理時間と
なった。
対応 JDBCのバッチ更新機能に変更した。結果、0.3秒
に短縮された。
原因 大量のデータ登録を想定せずに実装した。
テストは少量データで実施し、パフォーマンスの
問題として顕在化しなかった。
発見難易度:中 Insert文1回の実行時間が短く、リソース(CPU, メ
モリ)の消費も低いため、サーバ視点で見ても問
題が見つからない。
13. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
事例4. 文字列結合
12
String str = "";
for (int i = 0; i < 1000000; i++) {
str += i;
}
StringBuilder sb = new StringBuilder();
for (int i = 0; i < 1000000; i++) {
sb.append(i);
}
String str = sb.toString();
String str = "";
for (int i = 0; i < 1000000; i++) {
str = new StringBuilder().append(str).append(i).toString();
}
(JDK1.5以上の場合)
実質的には…
インスタンス
の生成を
1000000回
繰り返す…
×
○ 上に比べて、
数百倍速い
14. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
事例4. 文字列結合
13
種類 トランザクション視点のボトルネック
要因 CPU
内容 大量の文字列結合に?+?を使用したところ、スト
リングバッファのnewとappendが発生し、配列コ
ピーでCPU負荷が高くなった。
対応 StringBuilder appendに書き換えることで解消。
原因 記述の容易さや可読性の良さにより、?+?を使用
しがち。 StringBuilder appendとの動作や性能の
違いを意識しているプログラマーばかりではない。
発見難易度:中 目視によるコードレビューでは限界がある。
有識者であれば発見は早いが、そうでなければ
ログを出力して分析する必要あり。
15. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
クライアント
ブラウザ
事例5. Proxy設定のトラブル<番外編>
14
アプリケーション
サーバ
Proxy
サーバ
リダイ
レクト
エラー
×
16. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
事例5. Proxy設定のトラブル<番外編>
15
要因 ネットワーク
内容 HTMLからリダイレクトを繰り返して実行する処理
で、ネットワーク上のProxyサーバが弾いていた。
対応 細かく分けていた処理をまとめ、リダイレクトの回
数を減らした。
原因 Proxyサーバの挙動について認識していなかった。
発見難易度:高 インフラに精通していないと特定は困難。
アプリケーション側のログを分析しても原因不明。
17. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
まとめ
?ボトルネックの種類
– プログラム視点のボトルネック
– トランザクション視点のボトルネック
?ボトルネックの特定は、困難になる一方
– 複雑化するシステム構成
– 従来の観点?手法では、限界
?dynaTraceにより短時間でボトルネックを特定できた
16
クラウド
Webサービス モバイル
仮想化
18. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
最後に???
17
内容
現在タクトシステムズでは、本日ご紹介した『dynaTrace』を活用し
【パフォーマンスボトルネック調査サービス】を実施しております。
本セミナにご参加頂きました皆様には特別価格(通常の50%)5万円にて
ご提供いたします(6月末までの期間限定)。
※詳細は配布資料の最終ページをご確認ください。
特徴
早い! dynaTrace導入から2時間以内にボトルネックを特定いたします。
安い! 成功報酬型でボトルネックを特定できない場合は無料です。
簡単! 対象システムの設定変更やログ出力の追加などは不要です。
皆様もdynaTraceの効果を体験しませんか?
パフォーマンスボトルネック調査サービスを提供中
19. Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow
18
お問合せ先 : タクトシステムズ株式会社
〒111-0051 東京都台東区蔵前3-1-10 蔵前セントラルビル2F
ソリューション事業部 (03)5820-8150
〒532-0003 大阪市淀川区宮原4-5-36 セントラル新大阪ビル7F
ソリューション営業部 (06)6399-1700
http://www.takt.co.jp/
Please “CON ” us.Technology and Knowledge for TomorrowTechnology and Knowledge for Tomorrow