45
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | プロフェッショナルが語る!Oracle GoldenGate テクニカルセミナー Oracle GoldenGate Technical Deep Dive 2016511日本オラクル株式会社 クラウド・テクノロジー事業統括 CloudBig DataDISプロダクト本部 エンジニアリング部 後藤 陽介

GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

  • View
    448

  • Download
    2

Embed Size (px)

Citation preview

Page 1: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

プロフェッショナルが語る!Oracle GoldenGate テクニカルセミナー

Oracle GoldenGate Technical Deep Dive 2016年5月11日 日本オラクル株式会社 クラウド・テクノロジー事業統括 Cloud/Big Data/DISプロダクト本部 エンジニアリング部 後藤 陽介

Page 2: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, 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

Page 3: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

アジェンダ

• Oracle GoldenGate 12c のパッチ運用

• Integrated Capture / Integrated Replicat の動作と監視

3

Page 4: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

GoldenGate 12c for Oracle DB の導入時の確認事項

• 導入環境(ソース/ターゲット)のサポートを確認

– OSの種類、CPUアーキテクチャ、バージョン・アップデートレベル

– DBバージョン・パッチセットレベル

Certification Matrixを確認

GoldenGate 12.2 : http://www.oracle.com/technetwork/middleware/data-integration/goldengate12-2-x-cert-matrix-2769360.xls

GoldenGate 12.1 : http://www.oracle.com/technetwork/middleware/fusion-middleware/documentation/fmw-1212certmatrix-1970069.xls

関連製品のCertification Matrix 一覧 : http://www.oracle.com/technetwork/middleware/ias/downloads/fusion-certification-100350.html

• GoldenGate 12c for Oracle DB のバイナリ・パッチの入手

– GoldenGate バイナリの入手

– GoldenGate のパッチの入手

– Oracle DB に対するGoldenGate推奨パッチの入手

4

Page 5: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

GoldenGate のバイナリ入手

• Patch Set Release(PSR) レベルまでを確認し、Oracle Software Delivery Cloud からバイナリを入手 – https://edelivery.oracle.com/osdc/faces/Home.jspx

– OUIでインストール

•最新のPSRレベル(2016/05/11時点) – 12.2 : Oracle GoldenGate 12.2.0.1.0

– 12.1 : Oracle GoldenGate 12.1.2.1.0 ※ PSRレベルは 4桁目の”1” が該当

5

Page 6: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

GoldenGateのPatch Set Update(PSU)の入手

• My Oracle Supportより入手 1. https://support.oracle.com にアクセス・サインイン

2. 「パッチと更新版」タブをクリック

3. 「製品またはファミリ(拡張)」タブから、製品(Oracle GoldenGate) – PSUレベルを選択し、必要なプラットフォームのPSUをダウンロード

• 希望するプラットフォームのPSU無い場合は、SRでのリクエストにより入手可能なケースあり

4. opatch で適用

•最新PSU (2016/05/11時点) – 12.1 : Oracle GoldenGate 12.1.2.1.11

– 12.2 : Oracle GoldenGate 12.2.0.1.160223 ※ PSUレベルは5桁目で表示。今後は全て日付表示に変更予定

6

Page 7: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Oracle DBに対する GoldenGate推奨パッチの入手

• My Oracle Support より入手 1. Oracle GoldenGate -- Oracle RDBMS Server Recommended Patches (ドキュメントID

1557031.1) を参照 1. https://support.oracle.com/epmos/faces/DocumentDisplay?id=1557031.1

2. Oracle DB のパッチレベル、Exadata/Non-Exadata の環境に合わせて適切なパッチを入手

3. opatch で適用

7

Page 8: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

補足・注意点

• GoldenGate 11.2 / GoldenGate 12c for Non-Oracle DB へのパッチは製品ビルドとして提供されます。新規インストールもしくは現行バイナリの上書きによって導入します

• GoldenGate 12c for Oracle DB のPSUは1カ月~3か月程度の間隔でリリースされていますが、将来のリリーススケジュールの公開はしておりません

• Patch Set Release / Patch Set Update での変更点は同梱されるリリースノートを参照ください

• GoldenGate のPSUおよびOracle DBへの推奨パッチは導入時のみでなく、メンテナンスタイミングでの最新版適用を推奨します

8

Page 9: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

アジェンダ

• Oracle GoldenGate 12c のパッチ運用

• Integrated Capture / Integrated Replicat の動作と監視

9

Page 10: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

• Integrated Capture

• Integrated Extract

• 統合キャプチャ

• 統合モードのExtract

本資料は “Integrated Capture” に統一

• Integrated Replicat

• Integrated Apply

• Integrated Delivery

• 統合Replicat

• 統合モードのReplicat

本資料は “Integrated Replicat “に統一

10

Integrated Capture / Integrated Replicat 機能の呼称

Page 11: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Integrated Capture / Integrated Replicat

LogMining Server

Capture Pump

Replicat Inbound Server

11

Integrated Capture Oracle DBと連携したトランザクションキャプチャ 初期リリース: GoldenGate 11.2 (2012年前半) 対応DBバージョン : Oracle 11.2.0.3以降 ※Oracle 11.2.0.3にはパッチ適用必須

Integrated Replicat Oracle DBと連携したトランザクション適用 初期リリース: GoldenGate 12.1 (2013年後半) 対応DBバージョン : Oracle 11.2.0.4以降

Page 12: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

• Integrated Capture

–データ型・オブジェクトの対応拡張(※1)

• 圧縮表 / XML型 / ユーザー定義型 / etc

– RAC対応の強化 • ノード数の増減に再構成不要で追従

• 複数インスタンスへのパラレルDML / XA

– Native DDL Apply • トリガー/DDL管理表が不要(※2)

– Multitenant Architecture 対応 • Integrated Captureが必須

• Integrated Replicat

–トランザクション適用の自動並列化 • レコード/トランザクションの依存性を 自動計算

• 多重化を考慮したReplicatの設計が不要

12

主な機能

※1 GoldenGate / Oracle DB のバージョンにより対応が 異なるので詳細はマニュアルを参照ください ※2 GoldenGate 12.1以降 / Oracle DB 11.2.0.4 以降の 組み合わせで対応

Page 13: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Integrated Capture のアーキテクチャ

13

Oracle Database内の Logmining Server と連携したトランザクションのキャプチャ

Extract

• Logmining ServerからLCRを取得

• マッピングや変換処理を行う

Trailファイルに書き込む

Reader Capture Builder

Logmining Server

Preparer N

Preparer 2

Preparer 1

Oracle Database

Integrated

Capture Trail

Files

Logmining Server (複数のOracleバックグランドプロセス。Streams Pool を使用)

• Reader: REDOを読み取り、複数に分割

• Preparer: 分割されたREDOをスキャンとパラメータファイルに基く事前フィルタリングを行う

• Builder: Prepare によって処理されたレコードをSCN順に統合

• Capture: Logical Change Records(LCRs)の形式に変換しGoldenGateプロセスに転送

Page 14: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Integrated Capture 注意点

• Integrated Capture を構成すると、未キャプチャのアーカイブREDOログをRMANコマンドで削除できなくなります –レプリケーションのデータロストを回避するための仕組み

• Integrated Captureの長時間の停止や、長時間の遅延が発生した場合に、アーカイブ領域を使い切り、ソースDBトランザクションの処理が継続できなくなる可能性があります

•対応 – Integrated Capture の処理が追いついてからアーカイブを削除

– Integrated Captureを削除(プロセスのdelete と Oracle DBからの unregister)の上、アーカイブも削除

14

Page 15: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Integrated Replicat (Integrated Delivery)のアーキテクチャ

15

Oracle Database内の Inbound Server と連携したトランザクションのキャプチャ

Trail

Files Replicat

Lightweight Streaming

API

Receiver Preparer Coordinator

Inbound Server

Applier N

Applier 2

Applier 1

Oracle Database

Replicat

• Trail ファイルの読み取り

• Trailファイルの内容からlogical change

records (LCRs) を構成

• Lightweight Streaming APIを使用して、LCRをOracle DBに転送

Inbound Server (複数のOracleバックグラウンドプロセス。Streams Poolを使用)

• Receiver: LCRの読み取り

• Preparer: 主キー、一意キー、一意索引、外部キーの情報からトランザクション間の依存性を計算し、依存性に合わせたグルーピングと並べ替えを行う。

• Coordinator: 各Applierプロセスが処理するトランザクションと順序を調整

• Applier: 割り当てられたトランザクションの適用、競合検知とエラーハンドリングを行う

Page 16: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

トランザクション依存性について

• 依存性を無視した並列化の危険性

– ORA-1403

– デッドロック

– コミット順序の入れ換わりによるデータ不整合

• 従来の複数Replicat構成の対応

– 構築者がレプリケーション対象テーブルの制約を確認し、データ不整合が無いように各Replicatの担当範囲を決定(例:外部キーが関連されたテーブル同士は同一のReplicatで処理)

• Integrated Replicat の対応

– Inbound Server が受信したトランザクションの依存性を計算しApply Serverに割り当て、適用処理を並列実行する

– 依存性の計算のため、スケジュール列(PK, UK, UI, FK)のサプリメンタルロギングが必須。GoldenGate 12cであれば、ADD TRANDATA /ADD SCHEMATRANDATAコマンドで自動的に設定

16

Page 17: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

並列化のイメージ(SCOTT.EMP表)

17

列名 データ型 キー列

EMPNO NUMBER(4) PK

ENAME VARCHAR2(10)

JOB VARCHAR2(9)

MGR NUMBER(4) FK

HIREDATE DATE

SAL NUMBER(7,2)

COMM NUMBER(7,2)

DEPTNO NUMBER(2)

OFFICE VARCHAR2(10) UK

ソースDBのトランザクション

Tx1 : INSERT INTO emp … (7902, … Tx1 : COMMIT;

Tx2 : UPDATE emp … EMPNO=7901; Tx2 : UPDATE emp … EMPNO=7902; Tx2 : COMMIT;

Tx3 : INSERT INTO emp … (7904, … Tx3 : COMMIT;

ターゲットDBのトランザクション実行イメージ(Integrated Replicat)

レコードの依存性

Commitの依存性

時間

時間

Tx1 : INSERT INTO emp … (7902, … Tx1 : COMMIT;

Tx2 : UPDATE emp … EMPNO=7901; Tx2 : UPDATE emp … EMPNO=7902; Tx2 : COMMIT;

Tx3 : INSERT INTO emp … (7904, … Tx3 : COMMIT;

Page 18: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Integrated Capture / Integrated Replicat の監視ポイント

LogMining Server

Extract Pump

Replicat Inbound Server

18

•従来の監視 (GGSCI の INFO, LAG, STATS,Report, ggserr.log, OGG Monitor/EM Pluginなど) •Extended Metrics

GoldenGateのためのDB監視 HealthCheck / UTL_SPADV / 各種ビュー / AWR&ASH / etc

Page 19: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Integrated Healthcheck Report

• Integrated Capture / Integrated Replicat に対応

• DBサーバー上でスクリプト実行により、HTML形式レポートを生成

• 定期的な取得を推奨

• 解析目的での使用

– 構成上の問題

– パフォーマンス

• コンポーネント / サブコンポーネントレベルでの解析が可能

• 事象内容により、サポートサービスより提供の依頼をする可能性あり

• My Oracle Supportに詳細を記載

– GoldenGate Integrated Capture and Integrated Replicat Healthcheck Script (ドキュメントID 1448324.1)

Oracle DB 内のGoldenGate関連情報のスナップショットを取得

19

Page 20: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Healthcheck レポート

Database の構成

Extract/Replicat の構成

Extract/Replicat の統計情報

サマリと通知

20

Page 21: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

HealthCheck レポート例:Notification Section

• INFO / WARNING / ERROR メッセージの出力

• Heartbeat Table

21

Page 22: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Record changes

Capture changes

Redo

Integrated Extract

Oracle Database

LCR1 LCR2 LCR3 …. ….

….

Logical Change Records

Integrated

Capture

Trail

Files

HealthCheckレポート例 :Integrated Captureの内部的なラグ

22

Page 23: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

• OGG Captureプロセス(上記EXT_1A)の”State”と Logmining ServerのCaptureプロセス(上記OGG$CAP_EXT_1A)の“Ready to send Chunks” “Delivered Chunks”を確認

• “Ready to send Chunks” >> “ Delivered Chunks” かつ “State” が “ Waiting for Client Requests“ OGG Captureプロセスの性能問題等に起因する遅延が発生している可能性あり

• Extended Metricsや TRANLOGOPTIONSパラメータを確認

• BUFFER_SIZE , _READAHEADCOUNT, ASYNCTRANSPROCESSING, etc …

HealthCheck レポート例:DBとOGG Captureプロセス間のラグ

23

Page 24: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

GoldenGate Extended Metrics (GoldenGate 12.2)

• URL経由でのアクセス

http://<hostname>:<mgr_port>/mpointsx

• 稼働中のGoldenGateプログラムの詳細情報をリアルタイムで表示

• GLOBALSパラメータファイルに ENABLEMONITORING の設定が必要

– Management Packライセンスが必要

24

ManagerプロセスのRestful インターフェース経由での情報取得

Page 25: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Extended Metrics

• ステータスと構成情報

• Capture, Pump, Replicatのプロセスレベルのメトリック

• Capture / Replicat のスレッドレベルのメトリック

• DB統計 – In-flightトランザクションとCache / Queue の統計(Capture用)

–テーブル統計 (Replicat用)

• ネットワーク統計

25

Page 26: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

26

https://java.net/projects/oracledi/downloads/download/GoldenGate/OGGPTK.jar Extend Metrics参照用のGUIツール

コンポーネント

プロセスの ステータス

メトリックの モニタ

記録可能

Page 27: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

HealthCheck レポート例:Replicat Apply Section

27

• Replicatプロセスがメモリ待機状態になっている => メモリ不足の可能性

• Replicatプロセスが使用できるメモリの増加

• Streams_Pool_Size や IntegratedParams MAX_SGA_SIZE パラメータで調整

Page 28: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

• Total LCRs with Dependencies indicates :行レベルの依存性を持つLCRの合計数

• Total LCRs with WM Dependency : 水位標依存性を持つLCR合計数

• Apply Processが他のApply Process ラージトランザクションを待機している可能性

HealthCheckレポート例:Integrated Replicat トランザクションの依存性

… … … … … … … … … …

20000

• EAGER_SIZE を超えるラージトランザクションを適用する場合、Integrated Replicatのトランザクション適用は直列化(Serialize)されるため、EAGER_SIZEの増加が可能かを検討

• EAGER_SIZEのデフォルト:OGG 12.1.2.1:9500 OGG 12.2 : 15100

20000

28

Page 29: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

HealthCheckレポート例 : Apply Server Statistics

• Apply Server Processesの待機イベント分析

– Oracle DBの一般的な待機: Enqueues, IO Waits, …

– レプリケーション関連の待機

• IOサブシステムやOracle DBチューニング (Index Rebuild等)の対応を検討

Integrated ReplicatのApply Server ProcessesのOracle DBセッションとしての統計

(wait on CPU /on CPU)

(wait on CPU /on CPU)

REPL Apply: dependency

29

Page 30: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Oracle DB内の GoldenGate関連ビュー

30

• データ・ディクショナリ – DBA_GOLDENGATE_PRIVILEGES

– DBA_GOLDENGATE_SUPPORT_MODE

– DBA_CAPTURE, DBA_CAPTURE_PARAMETERS

– DBA_GOLDENGATE_INBOUND

– DBA_GG_INBOUND_PROGRESS

– DBA_APPLY, DBA_APPLY_PARAMETERS

– DBA_APPLY_REPERROR_HANDLERS

– DBA_APPLY_HANDLE_COLLISIONS

– DBA_APPLY_DML_CONF_HANDLERS

•動的パフォーマンスビュー – V$GOLDENGATE_CAPTURE

– V$GG_APPLY_RECEIVER

– V$GG_APPLY_READER

– V$GG_APPLY_COORDINATOR

– V$GG_APPLY_SERVER

– V$GOLDENGATE_TABLE_STATS

– V$GOLDENGATE_CAPABILITIES

Page 31: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Oracle DB内の GoldenGate関連ビュー

• Integrated Capture

– Logmining Server のラグ確認

– SELECT capture_name, 86400 *(available_message_create_time - capture_message_create_time) latency_in_seconds FROM GV$GOLDENGATE_CAPTURE;

• Integrated Replicat

– Inbound Server のラグ確認

– SELECT r.apply_name, 86400 *(r.dequeue_time - c.lwm_message_create_time) latency_in_seconds FROM GV$GG_APPLY_READER r, GV$GG_APPLY_COORDINATOR c WHERE r.apply# = c.apply# and r.apply_name = c.apply_name;

31

活用例

Page 32: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

AWR

• Oracle DB 12.1 以降より、GoldenGateの統計情報をAWRレポート内に表示

32

Page 33: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

AWR出力例

33

Page 34: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

UTL_SPADV (Streams Performance Analyzer)

• Oracle DB 内にパッケージをインストール – SQL> @$ORACLE_HOME/rdbms/admin/utlspadv.sql

•パッケージから監視ジョブの有効化やレポート出力(Text or HTML)を行う – http://docs.oracle.com/cd/E49329_01/appdev.121/b71281/u_spadv.htm

34

Logmining Server / Inbound Server のリソース消費や待機等を表示

Page 35: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

SPADV出力例(Integrated Capture) PATH 2 RUN_ID 15 RUN_TIME 2014-FEB-21 22:32:17 CCA N

<C> OGG$CAP_EXT_1A 305260 305245 790813

LMR 0.0% 53.3% 33.3% "CPU + Wait for CPU"

LMP(2) 0.0% 0.0% 146.7% "CPU + Wait for CPU"

LMB 73.3% 0.0% 6.7% " "

CAP 20.0% 0.0% 73.3% "CPU + Wait for CPU"

<Q> "OGGADMIN"."OGG$Q_EXT_1A" 0.01 0.01 0

<E> EXT_1A 304027 80076708 790813 20% 6.7% 73.3% "CPU + Wait for CPU"

<B> NO BOTTLENECK IDENTIFIED

• LMR(Reader)はフロー制御待ち状態 (次のプロセスの処理完了待ち)

• LMP(Preparer) は idle 0% で CPUリソース消費が大きい

• LMB (Builder) はリソースを多く消費していない

• レプリケーション全体のLag等を確認の上、並列度(Preparerの数)の増加を検討

35

読み方

proc %idle %flowctrl %TopWait “Event”

※見やすいように改行を入れています

Page 36: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

SPADV出力例(Integrated Replicat) PATH 1 RUN_ID 16 RUN_TIME 2014-JAN-12 10:33:59 CCA Y

<R> REP_1A 1375 520424 0 0% 62.5% 37.5%

<Q> “SOESMALL”.“OGGQ$REP_1A” 1375 0.01 5001

<A> OGG$REP_1A 715 715 -1

APR 31.3% 68.8% 0% “” APC 100% 0% 0% “” APS(7) 68.8% 0% 481.3% “free buffer waits” <B> OGG$REP_1A APS 1219 22693 93.8% "free buffer waits“

• REP_1a(Replicat) と APR (Apply Reader) は主にフロー制御待ち

• APC (Apply Coordinator) はアイドル状態

• APS (Apply Server) は “free buffer waits”による待機が大きい

• AWR等でデータベースの状況を確認し、必要に応じて対応

36

読み方

proc %idle %flowctrl %TopWait “Event”

※見やすいように改行を入れています

Page 37: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

性能に影響する主な設定値 : Integrated Capture

• Oracle DB

– Streams_pool_size : (Integrated CaptureのMAX_SGA_SIZE * Parallelism) * 1.25

• Integrated Captureのパラメータ – Tranlogoptions

• BUFSIZE : 読み取りバッファサイズ

• ASYNCTRANSPROCESSING :Logmining ServerからのLCRを2つの制御スレッドで処理(デフォルト)

• _READAHEADCOUNT

– TRANLOGOPTIONS INTEGRATEDPARAMS (…) • MAX_SGA_SIZE : デフォルト値(1GB) で多くのケースは適切に動作

• Parallelism : デフォルト値 (2 : Oracle EE の場合) で多くのケースは適切に動作

37

Page 38: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

参考: Capture Report File / SEND EXTRACT, LOGSTATSコマンド

Page 39: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

• Oracle DB

– Streams_Pool_Size : 1GB * Apply Serverのプロセス数 * 1.25

• GoldenGate Integrated Replicat

– DBOPTION

• BATCHSQL

• GROUPTRANSOPS (Parallelismが1の時のみ有効)

– DBOPTIONS INTEGRATEDPARAMS (…)

• MAX_SGA_SIZE: デフォルトはINFINIT (Streams Pool で調整)

• PARALLELISM : 最低並列度。デフォルト4

– DBOPTIONS INTEGRATEDPARAMS (…) - cont

• MAX_PARALLELISM : 最大並列度。デフォルト50。Integrated Replicatの並列度はPARALLELISMとMAX_PARALLELISMの間で自動調整

• COMMIT_SERIALIZATION

– DEPENDENT_TRANSACTIONS : デフォルト。依存性のあるトランザクションのCOMMIT順序を保証し、データ整合性を維持。依存しないトランザクションのCOMMIT順序は保証せずにスループットを最大化。

– FULL : ソースDBでのCOMMIT順序を保証。スループット低下の可能性あり

• EAGER_SIZE : Inboud Server がCOMMITメッセージを受け取る前に適用を始めるレコード数の敷居値。デフォルト OGG 12.1.2.1:9500, OGG 12.2 : 15100

39

性能に影響する主な設定値: Integrated Replicat

Page 40: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

性能検証時の導入パターン

• 稼働時に追加で取得する情報

– HelthCheck レポートを定期的に生成

– UTL_STADVを定期的に統計取得

(従来からの情報 はGoldenGate/DB/OSそれぞれで取得)

• 初期設定

– Integrated Capture / Integrated Replicat の独自パラメータはデフォルト設定で多くのケースは適切に動作

• レプリケーションの稼働状況から、必要に応じてチューニングを検討

– HealthCheckレポート

– UTL_STADB

– AWR

– Extended Metrics

40

Page 41: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

参考情報

• MAA white paper Oracle GoldenGate Performance Best Practices

http://www.oracle.com/technetwork/database/availability/maa-gg-performance-1969630.pdf

• MOS Doc ID 1557031.1 Recommended patches for Integrated Capture/Replicat

• MOS Doc ID 1448324.1 OGG Integrated Healthcheck Script

• MOS Doc ID 1488668.1 GoldenGate Performance Data Gathering

• MOS Doc ID 1596493.1 GoldenGate Integration with AWR

• MOS Doc ID 1485620.1 Best Practices Downstream Capture

• セットアップガイド

– http://www.slideshare.net/oracle4engineer/oracle-goldengate-r122

41

Page 42: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, 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.

42

Page 43: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 43

Page 44: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Page 45: GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)