- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
1#
发表于 2012-4-8 00:47:13
|
查看: 5529 |
回复: 0
Block Change Tracking
RMAN retrieves checkpoint SCN of a parent incremental backup
RMAN identifies blocks to read based on a bitmap in a BCT file
BCT development for 5 years ?
Comments in oraus.msg dated back to 2001
Only available in the Enterprise Edition
BCT File Block Structure
Blocks are 512 bytes (Linux)
Generally same format as datafile blocks
1st byte – block type
0x29 – BCT file header (X$KRCFH)
0x2F – datafile descriptors extent header
0x30 – datafile descriptor block (X$KRCFDE)
0x33 – bitmap extent header (X$KRCFBH)
0x34 – bitmap block (X$KRCBIT)
2nd byte – block format (0x22 for BCT file)
Some fields are not used (like SCN)
BCT File Header
Table X$KRCFH
FHSWV and FHCVN – version information
FHDBI and FHDBN – DBID and DB name
FHFSZ – file size
FHBSZ – block size (512 bytes on Linux)
EXTBLKS – extent size in blocks (64 on Linux)
RSZ_NEWEXTCNT – next chunk size in extents
320 * 64 * 512 bytes = 10 MB
First block of the file is skipped so file header is the second block
Datafile Descriptors
Table X$KRCFDE
FNO – datafile #
CHUNK – chunk size in database blocks
32 kilobytes on Linux
CRESCN & CRETIME – datafile creation SCN and time
CURR_LOWSCN – starting SCN for the current version
CURR_HIGHSCN – highest SCN (max possible – 248-1)
CURR_FIRST/LAST – header block# of first/last bitmap extents
CURR_EXTCNT – number of bitmap extents
CURR_VERCNT & VERTIME – current version number & TIME
HIST_FIRST/LAST/EXTCNT/VERCNT/VERTIME
OLDEST_LOW – starting SCN of the oldest version available
Pre-created according to db_files init.ora parameter
One descriptor per datafile, 4 descriptors per block
One extent holds 252 datafiles
Passing info to CTWR
Server process tracks blocks changed in private area at the time it generates redo
On commit, CT info goes to shared area
CTWR dba buffer
Event “block change tracking buffer space”
CTWR Wait Events
Updates block 18 (X$KRCCDE) every 20-60 seconds
change tracking file synchronous read
change tracking file synchronous write
While updating CTWR
Reads and writes to controlfile
control file sequential read
control file parallel write
Reads and writes to BCT file (except bitmap extents)
change tracking file synchronous read
change tracking file synchronous write
Bitmap updates are not instrumented – no wait event posted
Issues pwrite64 system call
Supposed to be change tracking file parallel write?
CTRW dba buffer full?
block change tracking buffer space
New enqueues
enq: CT %
New latches
change tracking state change latch
change tracking optimization SCN
change tracking consistent SCN
Hidden parameters
_bct_public_dba_buffer_size – total size of all public change tracking dba buffers, in
_bct_initial_private_dba_buffer_size – initial number of entries in the private change tracking dba buffers
_bct_bitmaps_per_file – number of bitmaps to store for each datafile
_bct_file_block_size – block size of change tracking file, in bytes
_bct_file_extent_size – extent size of change tracking file, in bytes
_bct_chunk_size – change tracking datafile chunk size, in bytes
_bct_crash_reserve_size – change tracking reserved crash recovery SGA space, in bytes
_bct_buffer_allocation_size – size of one change tracking buffer allocation, in bytes
_bct_buffer_allocation_max – maximum size of all change tracking buffer allocations, in bytes
_bct_buffer_allocation_min_extents – mininum number of extents to allocate per buffer allocation
_bct_fixtab_file – change tracking file for fixed tables
Oracle 10g Block Change Tracking Inside Out.ppt
(357.5 KB, 下载次数: 3, 售价: 10 金钱)
|
|