0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

PDB のクローン時に使用するリソースについて(TDEあり)

0
Posted at

はじめに

Oracle AI Database のマルチテナント・アーキテクチャにおけるPDBのクローン作成でどのようなリソースを消費するかを試す第2弾として、素朴な疑問であるTDE(透過的なデータ暗号化)されたPDBのクローンも試します。PDB(19.29)における暗号化設定については別記事(リンク)にまとめておきます。

環境と手順について

2つの環境を準備し、2つのパターンでPDBクローンを実行します。最初は1つのCDBでローカル環境でのクローン、もう1つは2つの物理的に異なるCDBを準備し、リモートクローンを実行します。後者でもVersionは同一のものを使用しました。
(ここまでは、PDB Cloneが使用するリソースについて:リンク のCase1と同様)
既にCDBは作成済みだったのですが、CDBに対する統合モードでのTDE設定を施して作成されるユーザデータ表領域は暗号できるようにします。

Q35-01.png

ここでもAHFは25.11 / Oracle Database は 19c 19.29を使用し、無風状態のOSリソース負荷状況を確認しておきます。

[root@node1 ~]# ahf -v
AHF version: 25.11.0
Build Timestamp: 20251215070451
TFA version: 25.11.0
Compliance version: 25.11.0
Compliance metadata version: 20251215
 
SQL*Plus: Release 19.0.0.0.0 - Production on 火 1月 6 13:05:35 2026
Version 19.29.0.0.0
SQL> show pdbs
 
    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB                            READ WRITE NO

scott と schema object の作成 + LOBデータによるそれなりのデータを作成します。
今回は、GoldenGateのマニュアルから概要説明の一部をLOBデータとして使いました。

CREATE TABLE TBLCLOB1 ( col1 CLOB) LOB(col1) STORE AS SECUREFILE TABLESPACE users;
INSERT INTO TBLCLOB1 values ('Oracle GoldenGateが必要な理由: 企業のデータは一般的に企業内で異種データベースに分散されています。様々なデータ・ソースからデータを取得するために、Oracle GoldenGateを使用します。社内のトランザクションのロード、分散およびフィルタリングをリアルタイムで行うことができ、停止時間をほとんど発生させずに異なるデータベース間での移行が可能になります。 これを実現するためには、リアルタイムでシステムからシステムに停止時間なしでデータを効率よく移す手段が必要です。Oracle GoldenGateは、データをレプリケートして統合するためのオラクル社のソリューションです。 Oracle GoldenGateのモジュラ・アーキテクチャにより、異種システム間でデータを抽出、変換およびレプリケートする方法の柔軟性が提供されます。このアーキテクチャにより、Extract、Replicat、Collectorプロセスなどの様々なコンポーネントおよび証跡ファイルを構成して、特定のニーズにあわせてデータの移動を調整できます。このモジュール性により、異なるプラットフォームやトポロジ間でトランザクション・レベルでデータを効率的に処理できます。');
INSERT INTO TBLCLOB1 Select * from TBLCLOB1;
INSERT INTO TBLCLOB1 Select * from TBLCLOB1;
INSERT INTO TBLCLOB1 Select * from TBLCLOB1;
UPDATE TBLCLOB1 SET col1=col1||col1||col1||col1||col1||col1||col1||col1;
commit;

Q36-01.png

Q36-02.png

最終的に160GB程度のTDEされた表領域を準備しました。

ローカル環境でのTDEされた表領域を持つPDBクローン作成

SQL Developer によるプラガブル・データベースのクローン作成を実施

Q36-03.png

クローンの開始 開始 12:24 ⇨ 12:27 (約3分でクローン生成完了)
AHF Insight で OSのリソース推移のグラフを取得(直近の1時間分)

[root@node1]# ahf analysis create --type insights --last 1h
Starting analysis and collecting data for insights
Collecting data for AHF Insights (This may take a few minutes per node)
AHF Insights report contains information of 1:00:00 hrs
From Date : 01/15/2026 11:28:17 - To Date : 01/15/2026 12:28:17
Report is generated at :  /opt/oracle.ahf/DATA/oracle.ahf/data/repository/collection_Thu_Jan_15_12_28_25_JST_2026_node_all/ptvm15_insights_2026_01_15_12_28_52.zip

(参考情報 : 無風状態のOSリソース)

Q36-04.png

  • TDEされたPDBをローカルクローンした際のリソース使用

Q36-05.png

I/O負荷周りの詳細

Q36-06.png

わずかにCPUまわりに負荷が現れるが、基本的にはDisk I/O負荷が顕著にあらわれる (ローカルクローンなので Read/ Write が同時に負荷がかかる)
状況としては TDEをしない状況下でのPDBクローンと差異がないため、リモート・クローンは実施しないこととした。

以下はalert.logから関連部分の抜粋
(暗号化されていないSYSTEM系表領域などのクローンでは警告がでる👈下の数行にわたり)

alert_orcl19c.log
…
      FILE_NAME_CONVERT=NONE
      KEYSTORE IDENTIFIED BY *
2026-01-15T12:24:44.932539+09:00
PDB(3): AUDSYS.AUD$UNIFIED (SQL_TEXT) - CLOB populated
PDB(3):KZTDE:WARNING: Detected that PDB needs to import keys from source. PDB can only open in restricted mode until import.
2026-01-15T12:26:52.775015+09:00
PDB_LOCAL02(5):Endian type of dictionary set to little
****************************************************************
Pluggable Database PDB_LOCAL02 with pdb id - 5 is created as UNUSABLE.
If any errors are encountered before the pdb is marked as NEW,
then the pdb must be dropped
local undo-1, localundoscn-0x0000000000000118
****************************************************************
PDB_LOCAL02(5):Media Recovery Start
2026-01-15T12:26:53.006162+09:00
PDB_LOCAL02(5):Serial Media Recovery started
PDB_LOCAL02(5):max_pdb is 5
2026-01-15T12:26:53.042833+09:00
PDB_LOCAL02(5):Recovery of Online Redo Log: Thread 1 Group 2 Seq 20 Reading mem 0
PDB_LOCAL02(5):  Mem# 0: /u01/app/oracle/oradata/ORCL19C/onlinelog/o1_mf_2_npg1oobd_.log
PDB_LOCAL02(5):  Mem# 1: /u01/app/oracle/fast_recovery_area/ORCL19C/onlinelog/o1_mf_2_npg1oog9_.log
2026-01-15T12:26:53.306291+09:00
PDB_LOCAL02(5):Incomplete Recovery applied until change 2640125 time 01/15/2026 12:26:52
2026-01-15T12:26:53.311264+09:00
PDB_LOCAL02(5):Media Recovery Complete (orcl19c)
PDB_LOCAL02(5):Pluggable database PDB_LOCAL02 pseudo opening
2026-01-15T12:26:53.904961+09:00
PDB_LOCAL02(5):Undo initialization recovery: Parallel FPTR failed: start:507558969 end:507558974 diff:5 ms (0.0 seconds)
PDB_LOCAL02(5):Undo initialization recovery: err:0 start: 507558969 end: 507559008 diff: 39 ms (0.0 seconds)
PDB_LOCAL02(5):Undo initialization finished serial:0 start:507558969 end:507559021 diff:52 ms (0.1 seconds)
PDB_LOCAL02(5):Database Characterset for PDB_LOCAL02 is AL32UTF8
PDB_LOCAL02(5):Pluggable database PDB_LOCAL02 pseudo closing
PDB_LOCAL02(5):JIT: pid 2691880 requesting stop
PDB_LOCAL02(5):Closing sequence subsystem (507559161959).
PDB_LOCAL02(5):Buffer Cache flush started: 5
2026-01-15T12:26:54.339421+09:00
PDB_LOCAL02(5):Buffer Cache flush finished: 5
Completed: CREATE PLUGGABLE DATABASE "PDB_LOCAL02" FROM "PDB"
      STORAGE UNLIMITED TEMPFILE REUSE
      FILE_NAME_CONVERT=NONE
      KEYSTORE IDENTIFIED BY *
ALTER PLUGGABLE DATABASE PDB_LOCAL02 OPEN READ WRITE
PDB_LOCAL02(5):Pluggable database PDB_LOCAL02 opening in read write
PDB_LOCAL02(5):SUPLOG: Initialize PDB SUPLOG SGA, old value 0x0, new value 0x18
PDB_LOCAL02(5):Autotune of undo retention is turned on.
PDB_LOCAL02(5):Endian type of dictionary set to little
PDB_LOCAL02(5):Undo initialization recovery: Parallel FPTR complete: start:507559929 end:507559937 diff:8 ms (0.0 seconds)
PDB_LOCAL02(5):Undo initialization recovery: err:0 start: 507559929 end: 507559937 diff: 8 ms (0.0 seconds)
2026-01-15T12:26:54.968091+09:00
PDB_LOCAL02(5):[2691880] Successfully onlined Undo Tablespace 2.
PDB_LOCAL02(5):Undo initialization online undo segments: err:0 start: 507559937 end: 507560037 diff: 100 ms (0.1 seconds)
PDB_LOCAL02(5):Undo initialization finished serial:0 start:507559929 end:507560044 diff:115 ms (0.1 seconds)
PDB_LOCAL02(5):Deleting old file#9 from file$
PDB_LOCAL02(5):Deleting old file#10 from file$
PDB_LOCAL02(5):Deleting old file#11 from file$
PDB_LOCAL02(5):Deleting old file#12 from file$
PDB_LOCAL02(5):Adding new file#13 to file$(old file#9).             fopr-1, newblks-65280, oldblks-19200
PDB_LOCAL02(5):Adding new file#14 to file$(old file#10).             fopr-1, newblks-67840, oldblks-15360
PDB_LOCAL02(5):Adding new file#15 to file$(old file#11).             fopr-1, newblks-35840, oldblks-12800
****************************************************************
****************************************************************
PDB_LOCAL02(5):Database Characterset for PDB_LOCAL02 is AL32UTF8
2026-01-15T12:26:55.393637+09:00👈
PDB_LOCAL02(5):Warning: Oracle detects unencrypted tablespace SYSTEM (pdb 5) when
PDB_LOCAL02(5):         TABLESPACE_ENCRYPTION is set to AUTO_ENABLE. This setting
PDB_LOCAL02(5):         enforces existing tablespaces to be encrypted. Please refer
PDB_LOCAL02(5):         to the Oracle Database Advanced Security Administrator's
PDB_LOCAL02(5):         Guide to encrypt this tablespace.
PDB_LOCAL02(5):Warning: Oracle detects unencrypted tablespace SYSAUX (pdb 5) when
PDB_LOCAL02(5):         TABLESPACE_ENCRYPTION is set to AUTO_ENABLE. This setting
PDB_LOCAL02(5):         enforces existing tablespaces to be encrypted. Please refer
PDB_LOCAL02(5):         to the Oracle Database Advanced Security Administrator's
PDB_LOCAL02(5):         Guide to encrypt this tablespace.
PDB_LOCAL02(5):Warning: Oracle detects unencrypted tablespace SYSTEM (pdb 5) when
PDB_LOCAL02(5):         TABLESPACE_ENCRYPTION is set to AUTO_ENABLE. This setting
PDB_LOCAL02(5):         enforces existing tablespaces to be encrypted. Please refer
PDB_LOCAL02(5):         to the Oracle Database Advanced Security Administrator's
PDB_LOCAL02(5):         Guide to encrypt this tablespace.
PDB_LOCAL02(5):Warning: Oracle detects unencrypted tablespace SYSAUX (pdb 5) when
PDB_LOCAL02(5):         TABLESPACE_ENCRYPTION is set to AUTO_ENABLE. This setting
PDB_LOCAL02(5):         enforces existing tablespaces to be encrypted. Please refer
PDB_LOCAL02(5):         to the Oracle Database Advanced Security Administrator's
PDB_LOCAL02(5):         Guide to encrypt this tablespace.
Violations: Type: 2, Count: 2
PDB_LOCAL02(5):***************************************************************
PDB_LOCAL02(5):WARNING: Pluggable Database PDB_LOCAL02 with pdb id - 5 is
PDB_LOCAL02(5):         altered with errors or warnings. Please look into
PDB_LOCAL02(5):         PDB_PLUG_IN_VIOLATIONS view for more details.
PDB_LOCAL02(5):***************************************************************
PDB_LOCAL02(5):SUPLOG: Set PDB SUPLOG SGA at PDB OPEN, old 0x18, new 0x0 (no suplog)
2026-01-15T12:26:58.291866+09:00
PDB_LOCAL02(5):Opening pdb with no Resource Manager plan active
PDB_LOCAL02(5):joxcsys_required_dirobj_exists: directory object exists with required path /u01/app/oracle/product/19.0.0/dbhome_1/javavm/admin/, pid 2691880 cid 5
Pluggable database PDB_LOCAL02 opened read write
Completed: ALTER PLUGGABLE DATABASE PDB_LOCAL02 OPEN READ WRITE
2026-01-15T12:33:35.353803+09:00
Control autobackup written to DISK device
 
handle '/u01/app/oracle/fast_recovery_area/ORCL19C/autobackup/2026_01_15/o1_mf_s_1222605215_npjr0h8k_.bkp'

最後に

前回のリソース負荷に加え、TDEによる表領域暗号化されたPDBのクローンであっても、結論としては Disk I/O負荷がクローン時のリソース消費の殆どを占める事がはっきりしました。リモート・クローンの場合はTDEのマスター暗号化Keyの移植も必要になると思いますが、ここでは割愛します。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?