[20171129]rman input memory buffer 5.txt
[20171129]rman input memory buffer 5.txt
--//Input Memory Buffers如何測試,不清楚.不過找到一本電子書.摘要如下:
Oracle RMAN 11g Backup and Recovery.pdf
作者:Robert G. Freeman Matthew Hart
頁數:689
出版社:Mc graw hill
出版號: ISBN: 978-0-07-162861-7
MHID: 0-07-162861-4
RMAN in Memory P80
RMAN builds buffers in memory through which it streams data blocks for potential backup. This
memory utilization counts against the total size of the PGA and, sometimes, the SGA. There are
two kinds of memory buffers. Input buffers are the buffers that are filled with data blocks read
from files that are being backed up. Output buffers are the buffers that are filled when the
memory-to-memory write occurs to determine whether a particular block needs to be backed up.
When the output buffer is filled, it is written to the backup location. The memory buffers differ
depending on whether you are backing up to or restoring from disk or tape. Figure 2-3 illustrates
input and output buffer allocation. It illustrates a backup of two datafiles being multiplexed into
a single backup set.
Input Memory Buffers
When you are backing up the database, the size and number of input memory buffers depend on
the exact backup command being executed. Primarily, they depend on the number of files being
multiplexed into a single backup. Multiplexing refers to the number of files that will have their
blocks backed up to the same backup piece. To keep the memory allocation within reason, the
following rules are applied to the memory buffer sizes based on the number of files being backed
up together:
■ If the number of files going into the backup set is four or less, then RMAN allocates four
buffers per file at 1MB per buffer. The total will be 16MB or less.
■ If the number of files going into the backup set is greater than four, but no greater than
eight, then each file gets four buffers, each of 512KB. This ensures that the total remains
at 16MB or less.
■ If the number of files being multiplexed is greater than eight, then RMAN allocates four
buffers of size 128KB. This ensures that each file being backed up will account for 512KB
of buffer memory.
--//可以想像如果輸入快取如果全部寫入輸出快取,透過輸出檔案寫到備份集中的資料分佈,也能猜測出輸入快取大小.
--//補充測試10個資料檔案作為1個備份集合的情況:(11G的情況)
1.環境:
SCOTT@book> @ &r/ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
CREATE TABLESPACE T01 DATAFILE '/mnt/ramdisk/book/T01.dbf' SIZE 6M AUTOEXTEND OFF LOGGING ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;
CREATE TABLESPACE T02 DATAFILE '/mnt/ramdisk/book/T02.dbf' SIZE 6M AUTOEXTEND OFF LOGGING ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;
CREATE TABLESPACE T03 DATAFILE '/mnt/ramdisk/book/T03.dbf' SIZE 6M AUTOEXTEND OFF LOGGING ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;
CREATE TABLESPACE T04 DATAFILE '/mnt/ramdisk/book/T04.dbf' SIZE 6M AUTOEXTEND OFF LOGGING ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;
CREATE TABLESPACE T05 DATAFILE '/mnt/ramdisk/book/T05.dbf' SIZE 6M AUTOEXTEND OFF LOGGING ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;
CREATE TABLESPACE T06 DATAFILE '/mnt/ramdisk/book/T06.dbf' SIZE 6M AUTOEXTEND OFF LOGGING ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;
CREATE TABLESPACE T07 DATAFILE '/mnt/ramdisk/book/T07.dbf' SIZE 6M AUTOEXTEND OFF LOGGING ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;
CREATE TABLESPACE T08 DATAFILE '/mnt/ramdisk/book/T08.dbf' SIZE 6M AUTOEXTEND OFF LOGGING ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;
CREATE TABLESPACE T09 DATAFILE '/mnt/ramdisk/book/T09.dbf' SIZE 6M AUTOEXTEND OFF LOGGING ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;
CREATE TABLESPACE T10 DATAFILE '/mnt/ramdisk/book/T10.dbf' SIZE 6M AUTOEXTEND OFF LOGGING ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;
create table t01 tablespace t01 as select rownum id ,lpad('A',32,'A') name from dual connect by level<=1e5;
create table t02 tablespace t02 as select rownum id ,lpad('B',32,'B') name from dual connect by level<=1e5;
create table t03 tablespace t03 as select rownum id ,lpad('C',32,'C') name from dual connect by level<=1e5;
create table t04 tablespace t04 as select rownum id ,lpad('D',32,'D') name from dual connect by level<=1e5;
create table t05 tablespace t05 as select rownum id ,lpad('E',32,'E') name from dual connect by level<=1e5;
create table t06 tablespace t06 as select rownum id ,lpad('F',32,'F') name from dual connect by level<=1e5;
create table t07 tablespace t07 as select rownum id ,lpad('G',32,'G') name from dual connect by level<=1e5;
create table t08 tablespace t08 as select rownum id ,lpad('H',32,'H') name from dual connect by level<=1e5;
create table t09 tablespace t09 as select rownum id ,lpad('I',32,'I') name from dual connect by level<=1e5;
create table t10 tablespace t10 as select rownum id ,lpad('J',32,'J') name from dual connect by level<=1e5;
alter system checkpoint;
alter system checkpoint;
2.測試備份的情況:
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
old RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE CHANNEL 1 DEVICE TYPE DISK CLEAR;
old RMAN configuration parameters:
CONFIGURE CHANNEL 1 DEVICE TYPE DISK RATE 128 K;
old RMAN configuration parameters are successfully deleted
--//前面的測試限速取消.
RMAN> report schema;
Report of database schema for database with db_unique_name BOOK
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 760 SYSTEM *** /mnt/ramdisk/book/system01.dbf
2 940 SYSAUX *** /mnt/ramdisk/book/sysaux01.dbf
3 1075 UNDOTBS1 *** /mnt/ramdisk/book/undotbs01.dbf
4 2166 USERS *** /mnt/ramdisk/book/users01.dbf
5 346 EXAMPLE *** /mnt/ramdisk/book/example01.dbf
6 42 TEA *** /mnt/ramdisk/book/tea01.dbf
7 6 T01 *** /mnt/ramdisk/book/T01.dbf
8 6 T02 *** /mnt/ramdisk/book/T02.dbf
9 6 T03 *** /mnt/ramdisk/book/T03.dbf
10 6 T04 *** /mnt/ramdisk/book/T04.dbf
11 6 T05 *** /mnt/ramdisk/book/T05.dbf
12 6 T06 *** /mnt/ramdisk/book/T06.dbf
13 6 T07 *** /mnt/ramdisk/book/T07.dbf
14 6 T08 *** /mnt/ramdisk/book/T08.dbf
15 6 T09 *** /mnt/ramdisk/book/T09.dbf
16 6 T10 *** /mnt/ramdisk/book/T10.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 414 TEMP 32767 /mnt/ramdisk/book/temp01.dbf
RMAN> backup datafile 7,8,9,10,11,12,13,14,15,16 filesperset 10 format '/home/oracle/backup/t123456789A_%U';
Starting backup at 2017-11-29 11:11:50
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/mnt/ramdisk/book/T01.dbf
input datafile file number=00008 name=/mnt/ramdisk/book/T02.dbf
input datafile file number=00009 name=/mnt/ramdisk/book/T03.dbf
input datafile file number=00010 name=/mnt/ramdisk/book/T04.dbf
input datafile file number=00011 name=/mnt/ramdisk/book/T05.dbf
input datafile file number=00012 name=/mnt/ramdisk/book/T06.dbf
input datafile file number=00013 name=/mnt/ramdisk/book/T07.dbf
input datafile file number=00014 name=/mnt/ramdisk/book/T08.dbf
input datafile file number=00015 name=/mnt/ramdisk/book/T09.dbf
input datafile file number=00016 name=/mnt/ramdisk/book/T10.dbf
channel ORA_DISK_1: starting piece 1 at 2017-11-29 11:11:50
channel ORA_DISK_1: finished piece 1 at 2017-11-29 11:11:51
piece handle=/home/oracle/backup/t123456789A_m8skpbjm_1_1 tag=TAG20171129T111150 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2017-11-29 11:11:51
Starting Control File and SPFILE Autobackup at 2017-11-29 11:11:51
piece handle=/u01/app/oracle/fast_recovery_area/BOOK/autobackup/2017_11_29/o1_mf_s_961326711_f1w9cqhz_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2017-11-29 11:11:52
$ strings t123456789A_m8skpbjm_1_1 | egrep "AAAAA|BBBBB|CCCCC|DDDDD|EEEEE|FFFFF|GGGGG|HHHHH|IIIII|JJJJJ" | cut -c11-20 | uniq -c
9978 AAAAAAAAAA
9978 BBBBBBBBBB
9978 CCCCCCCCCC
9978 DDDDDDDDDD
9978 EEEEEEEEEE
9978 FFFFFFFFFF
9978 GGGGGGGGGG
9978 HHHHHHHHHH
10080 AAAAAAAAAA
10080 BBBBBBBBBB
10080 CCCCCCCCCC
10080 DDDDDDDDDD
10080 EEEEEEEEEE
10080 FFFFFFFFFF
10080 GGGGGGGGGG
10080 HHHHHHHHHH
10416 AAAAAAAAAA
10416 BBBBBBBBBB
10416 CCCCCCCCCC
10416 DDDDDDDDDD
10416 EEEEEEEEEE
10416 FFFFFFFFFF
10416 GGGGGGGGGG
10416 HHHHHHHHHH
10752 AAAAAAAAAA
10752 BBBBBBBBBB
10752 CCCCCCCCCC
10752 DDDDDDDDDD
10752 EEEEEEEEEE
10752 FFFFFFFFFF
10752 GGGGGGGGGG
10752 HHHHHHHHHH
10416 AAAAAAAAAA
10416 BBBBBBBBBB
10416 CCCCCCCCCC
10416 DDDDDDDDDD
10416 EEEEEEEEEE
10416 FFFFFFFFFF
10416 GGGGGGGGGG
10416 HHHHHHHHHH
10752 AAAAAAAAAA
10752 BBBBBBBBBB
10752 CCCCCCCCCC
10752 DDDDDDDDDD
10752 EEEEEEEEEE
10752 FFFFFFFFFF
10752 GGGGGGGGGG
10752 HHHHHHHHHH
10416 AAAAAAAAAA
10416 BBBBBBBBBB
10416 CCCCCCCCCC
10416 DDDDDDDDDD
10416 EEEEEEEEEE
10416 FFFFFFFFFF
10416 GGGGGGGGGG
10416 HHHHHHHHHH
10752 AAAAAAAAAA
10752 BBBBBBBBBB
10752 CCCCCCCCCC
10752 DDDDDDDDDD
10752 EEEEEEEEEE
10752 FFFFFFFFFF
10752 GGGGGGGGGG
10752 HHHHHHHHHH
10416 AAAAAAAAAA
10416 BBBBBBBBBB
10416 CCCCCCCCCC
10416 DDDDDDDDDD
10416 EEEEEEEEEE
10416 FFFFFFFFFF
10416 GGGGGGGGGG
10416 HHHHHHHHHH
6022 AAAAAAAAAA
6022 BBBBBBBBBB
6022 CCCCCCCCCC
6022 DDDDDDDDDD
6022 EEEEEEEEEE
6022 FFFFFFFFFF
6022 GGGGGGGGGG
6022 HHHHHHHHHH
---//前解決8個資料檔案
9978 IIIIIIIIII
9978 JJJJJJJJJJ
10080 IIIIIIIIII
10080 JJJJJJJJJJ
10416 IIIIIIIIII
10416 JJJJJJJJJJ
10752 IIIIIIIIII
10752 JJJJJJJJJJ
10416 IIIIIIIIII
10416 JJJJJJJJJJ
10752 IIIIIIIIII
10752 JJJJJJJJJJ
10416 IIIIIIIIII
10416 JJJJJJJJJJ
10752 IIIIIIIIII
10752 JJJJJJJJJJ
10416 IIIIIIIIII
10416 JJJJJJJJJJ
6022 IIIIIIIIII
6022 JJJJJJJJJJ
--//備份集合大於8個,先備份8個資料檔案,輸入快取512K.繼續解決...,如此迴圈.
--//不過從數量上看讀512K(64塊)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2147923/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20171129]rman input memory buffer 4.txt
- [20171128]rman input memory buffer 3.txt
- 1128rman Input or output Memory Buffers
- [20171128]rman Input or output Memory Buffers.txt
- [轉]ABAP Memory/SAP Memory/Shared Buffer/DatabaseDatabase
- rman 中的 delete all input 和 delete input 的區別delete
- Rman 中的delete input的用法delete
- mapred.job.shuffle.input.buffer.percent(R1)
- vertex buffer 資料結構 如何讀vb的memory pool資料結構
- 理解RMAN backup database plus archivelog delete all input命令DatabaseHivedelete
- [20161102]rman備份與資料檔案變化5.txt
- oracle實驗記錄 (恢復-rman操作delete(all) input )Oracledelete
- ASM+RMAN使用delete input備份日誌的問題ASMdelete
- Out of sort memory, consider increasing server sort buffer size的兩種情況IDEServer
- $(":input")和$("input")區別
- memory
- IO之核心buffer----"buffer cache"
- delete input 與 delete all inputdelete
- input
- Python -- raw_input() and input() -- ACMPythonACM
- protocol bufferProtocol
- [20160213]閉包傳遞5.txt
- jquery 中$("form :input") $("form input") 區別jQueryORM
- raw_input() 與 input()的區別
- jQuery :inputjQuery
- <input> disabled
- 【BUFFER】Oracle buffer cache之 latch 學習記錄Oracle
- input和:input選擇器的區別
- OOM(Out Of Memory)OOM
- Memory Management in RustRust
- java out of memoryJava
- Java NIO - BufferJava
- JAVA NIO BufferJava
- gc buffer busyGC
- Oracle Data BufferOracle
- Buffer Cache 原理
- MySQL Join BufferMySql
- cache buffer chainAI