[20171205]rman output Memory Buffers 2

简介: [20171205]关于rman output Memory Buffers 2.txt --//昨天在QQ上与人聊天,再次提到这个问题.感觉在链接http://blog.

[20171205]关于rman output Memory Buffers 2.txt

--//昨天在QQ上与人聊天,再次提到这个问题.感觉在链接http://blog.itpub.net/267265/viewspace-2147866/上的说服力不强.
--//我当时仅仅想说明oracle的备份是顺序读取数据文件的.

--//另外在链接http://blog.itpub.net/267265/viewspace-2147878/提到:
■ 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.

--//按照对方的理解,这个规则不存在,如果一个备份集参数filesperset>8 ,实际上按照filesperset=8来操作,先解决8个数据文件,
--//然后在解决8个,如此循环,我的理解对方的说法是对的.此时的输入缓存是512K.

--//最后做一次测试说明 output Memory Buffers是1M.对方的疑惑是如果多个文件(>4)输入缓存是512K,如何说明output Memory
--//Buffers是1M呢?


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

SCOTT@book> show parameter filesystemio_options
NAME                 TYPE   VALUE
-------------------- ------ -----
filesystemio_options string NONE

--//注:使用异步IO,strace跟踪的结果有一点不会看,不知道写出的IO量.我的测试没有使用异步IO.

$ cat d2.txt
drop tablespace t01 including contents and datafiles;
drop tablespace t02 including contents and datafiles;
drop tablespace t03 including contents and datafiles;
drop tablespace t04 including contents and datafiles;
drop tablespace t05 including contents and datafiles;

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 table t01 tablespace t01 as select rownum id ,to_char(rownum,'FM000000')||lpad('A',26,'A') name from dual connect by level<=1e5;
create table t02 tablespace t02 as select rownum id ,to_char(rownum,'FM000000')||lpad('B',26,'B') name from dual connect by level<=1e5;
create table t03 tablespace t03 as select rownum id ,to_char(rownum,'FM000000')||lpad('C',26,'C') name from dual connect by level<=1e5;
create table t04 tablespace t04 as select rownum id ,to_char(rownum,'FM000000')||lpad('D',26,'D') name from dual connect by level<=1e5;
create table t05 tablespace t05 as select rownum id ,to_char(rownum,'FM000000')||lpad('E',26,'E') name from dual connect by level<=1e5;

alter system checkpoint;
alter system checkpoint;
alter system checkpoint;

RMAN> report schema ;
using target database control file instead of recovery catalog
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    256      USERS                ***     /mnt/ramdisk/book/users01.dbf
5    346      EXAMPLE              ***     /mnt/ramdisk/book/example01.dbf
6    40       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

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    414      TEMP                 32767       /mnt/ramdisk/book/temp01.dbf

RMAN> CONFIGURE CHANNEL 1 DEVICE TYPE DISK clear ;

using target database control file instead of recovery catalog
old RMAN configuration parameters:
CONFIGURE CHANNEL 1 DEVICE TYPE DISK RATE 128 K;
old RMAN configuration parameters are successfully deleted

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP OFF;
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
new RMAN configuration parameters are successfully stored
--//注:设置CONTROLFILE AUTOBACKUP OFF;,主要目的避免对测试干扰.

2.测试:

$ strace -f -o /tmp/t12345.txt rlrman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Tue Dec 5 15:14:05 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: BOOK (DBID=1337401710)

RMAN> backup datafile 7,8,9,10,11 format '/home/oracle/backup/T12345_%U' ;
Starting backup at 2017-12-05 15:14:11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=132 device type=DISK
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
channel ORA_DISK_1: starting piece 1 at 2017-12-05 15:14:12
channel ORA_DISK_1: finished piece 1 at 2017-12-05 15:14:13
piece handle=/home/oracle/backup/T12345_h1slc8e4_1_1 tag=TAG20171205T151412 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2017-12-05 15:14:13
Starting Control File and SPFILE Autobackup at 2017-12-05 15:14:14
piece handle=/u01/app/oracle/fast_recovery_area/BOOK/autobackup/2017_12_05/o1_mf_s_961946054_f2dkt67x_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2017-12-05 15:14:15
RMAN> quit
Recovery Manager complete.

$ grep "pwrite(263" /tmp/t12345.txt
23434 pwrite(263, "\23\242\0\0\1\0\0\0\243\207t\27\3\0\1\4c\235\0\0\0\4 \v\0\4 \vn!\267O"..., 1040384, 8192) = 1040384
23434 pwrite(263, "\36\242\0\0\200\0@\2\331\205t\27\3\0\1\4>\245\3\0\t\0\0\0\200\0\0\0\0\0\0\0"..., 1048576, 1048576) = 1048576
23434 pwrite(263, "\36\242\0\0\200\0\300\2A\204t\27\3\0\1\4\276U\5\0\v\0\0\0\200\0\37\0\0\0\0\0"..., 1048576, 2097152) = 1048576
23434 pwrite(263, "\36\242\0\0\200\0\0\2\224\201t\27\3\0\1\4*W\2\0\10\0\0\0\200\0\17\2\0\0\0\0"..., 1048576, 3145728) = 1048576
23434 pwrite(263, "\36\242\0\0\200\0\200\2\262\203t\27\3\0\1\4\256W\4\0\n\0\0\0\200\0\17\2\0\0\0\0"..., 1048576, 4194304) = 1048576
23434 pwrite(263, "\6\242\0\0\200\0\300\1G\205t\27\3\0\2\4\266 \1\0\1\0\0\0\334b\1\0@\205t\27"..., 1048576, 5242880) = 1048576
23434 pwrite(263, "\6\242\0\0\200\0@\2\267\205t\27\3\0\2\4\266 \3\0\1\0\0\0\336b\1\0\260\205t\27"..., 1048576, 6291456) = 1048576
23434 pwrite(263, "\6\242\0\0\200\0\300\2!\206t\27\3\0\2\4\216 \5\0\1\0\0\0\340b\1\0\32\206t\27"..., 1048576, 7340032) = 1048576
23434 pwrite(263, "\6\242\0\0\200\0\0\2\222\205t\27\3\0\2\4\3606\2\0\1\0\0\0\335b\1\0{\205t\27"..., 1048576, 8388608) = 1048576
23434 pwrite(263, "\6\242\0\0\200\0\200\2\374\205t\27\3\0\2\4\3646\4\0\1\0\0\0\337b\1\0\345\205t\27"..., 1048576, 9437184) = 1048576
23434 pwrite(263, "\6\242\0\0\200\1\300\1c\205t\27\3\0\2\4\3468\1\0\1\0\0\0\334b\1\0@\205t\27"..., 1048576, 10485760) = 1048576
23434 pwrite(263, "\6\242\0\0\200\1@\2\323\205t\27\3\0\2\4\3468\3\0\1\0\0\0\336b\1\0\260\205t\27"..., 1048576, 11534336) = 1048576
23434 pwrite(263, "\6\242\0\0\200\1\300\2=\206t\27\3\0\2\4\3368\5\0\1\0\0\0\340b\1\0\32\206t\27"..., 1048576, 12582912) = 1048576
23434 pwrite(263, "\6\242\0\0\200\1\0\2\236\205t\27\3\0\2\4\0007\2\0\1\0\0\0\335b\1\0{\205t\27"..., 1048576, 13631488) = 1048576
23434 pwrite(263, "\6\242\0\0\200\1\200\2\10\206t\27\3\0\2\4\0047\4\0\1\0\0\0\337b\1\0\345\205t\27"..., 1048576, 14680064) = 1048576
23434 pwrite(263, "\6\242\0\0\200\1\300\1e\205t\27\3\0\2\4i:\1\0\1\0\0\0\334b\1\0@\205t\27"..., 1048576, 15728640) = 1048576
23434 pwrite(263, "\6\242\0\0\200\1@\2\325\205t\27\3\0\2\4i:\3\0\1\0\0\0\336b\1\0\260\205t\27"..., 1048576, 16777216) = 1048576
23434 pwrite(263, "\6\242\0\0\200\1\300\2?\206t\27\3\0\2\4Q:\5\0\1\0\0\0\340b\1\0\32\206t\27"..., 1048576, 17825792) = 1048576
23434 pwrite(263, "\6\242\0\0\200\1\0\2\240\205t\27\3\0\2\4\302\244\2\0\1\0\0\0\335b\1\0{\205t\27"..., 1048576, 18874368) = 1048576
23434 pwrite(263, "\6\242\0\0\200\1\200\2\n\206t\27\3\0\2\4\306\244\4\0\1\0\0\0\337b\1\0\345\205t\27"..., 1048576, 19922944) = 1048576
23434 pwrite(263, "\6\242\0\0\200\2\300\1h\205t\27\3\0\2\4h=\1\0\1\0\0\0\334b\1\0@\205t\27"..., 1048576, 20971520) = 1048576
23434 pwrite(263, "\6\242\0\0\200\2@\2\330\205t\27\3\0\2\4h=\3\0\1\0\0\0\336b\1\0\260\205t\27"..., 1048576, 22020096) = 1048576
23434 pwrite(263, "\6\242\0\0\200\2\300\2B\206t\27\3\0\2\4P=\5\0\1\0\0\0\340b\1\0\32\206t\27"..., 1048576, 23068672) = 1048576
23434 pwrite(263, "\6\242\0\0\200\2\0\2\243\205t\27\3\0\2\4\2672\2\0\1\0\0\0\335b\1\0{\205t\27"..., 1048576, 24117248) = 1048576
23434 pwrite(263, "\6\242\0\0\200\2\200\2\r\206t\27\3\0\2\4\2632\4\0\1\0\0\0\337b\1\0\345\205t\27"..., 1048576, 25165824) = 1048576
23434 pwrite(263, "\6\242\0\0\200\2\300\1k\205t\27\3\0\2\4\302\225\1\0\1\0\0\0\334b\1\0@\205t\27"..., 1048576, 26214400) = 1048576
23434 pwrite(263, "\6\242\0\0\200\2@\2\333\205t\27\3\0\2\4\302\225\3\0\1\0\0\0\336b\1\0\260\205t\27"..., 1048576, 27262976) = 1048576
23434 pwrite(263, "\6\242\0\0\200\2\300\2E\206t\27\3\0\2\4\372\225\5\0\1\0\0\0\340b\1\0\32\206t\27"..., 1048576, 28311552) = 1048576
23434 pwrite(263, "\6\242\0\0\200\2\0\2\247\205t\27\3\0\2\4\234|\2\0\1\0\0\0\335b\1\0{\205t\27"..., 983040, 29360128) = 983040
--//注:后面还有一点输出,不是这个对备份文件的,应该是控制文件的更新.
--//可以发现除了前面,中间都是写出1048576,也就是1M的.

$ sed 's/^.*=//g'  /tmp/tx.txt | xargs echo | sed 's/ /+/g' | bc -l
30334976

$ ls -l /home/oracle/backup/T12345_h1slc8e4_1_1
-rw-r----- 1 oracle oinstall 30343168 2017-12-05 15:14:13 /home/oracle/backup/T12345_h1slc8e4_1_1

--//30343168-30334976 = 8192,相差第1块(OS块),备份集文件第0块也是OS块,跟数据文件一样的.

$ strings T12345_h1slc8e4_1_1 | egrep  "AAAAA|BBBBB|CCCCC|DDDDD|EEEEE" | cut -c20-30| uniq -c
   9978 AAAAAAAAAAA
   9978 BBBBBBBBBBB
   9978 CCCCCCCCCCC
   9978 DDDDDDDDDDD
   9978 EEEEEEEEEEE
  10080 AAAAAAAAAAA
  10080 BBBBBBBBBBB
  10080 CCCCCCCCCCC
  10080 DDDDDDDDDDD
  10080 EEEEEEEEEEE
  10416 AAAAAAAAAAA
  10416 BBBBBBBBBBB
  10416 CCCCCCCCCCC
  10416 DDDDDDDDDDD
  10416 EEEEEEEEEEE
  10752 AAAAAAAAAAA
  10752 BBBBBBBBBBB
  10752 CCCCCCCCCCC
  10752 DDDDDDDDDDD
  10752 EEEEEEEEEEE
  10416 AAAAAAAAAAA
  10416 BBBBBBBBBBB
  10416 CCCCCCCCCCC
  10416 DDDDDDDDDDD
  10416 EEEEEEEEEEE
  10752 AAAAAAAAAAA
  10752 BBBBBBBBBBB
  10752 CCCCCCCCCCC
  10752 DDDDDDDDDDD
  10752 EEEEEEEEEEE
  10416 AAAAAAAAAAA
  10416 BBBBBBBBBBB
  10416 CCCCCCCCCCC
  10416 DDDDDDDDDDD
  10416 EEEEEEEEEEE
  10752 AAAAAAAAAAA
  10752 BBBBBBBBBBB
  10752 CCCCCCCCCCC
  10752 DDDDDDDDDDD
  10752 EEEEEEEEEEE
  10416 AAAAAAAAAAA
  10416 BBBBBBBBBBB
  10416 CCCCCCCCCCC
  10416 DDDDDDDDDDD
  10416 EEEEEEEEEEE
   6022 AAAAAAAAAAA
   6022 BBBBBBBBBBB
   6022 CCCCCCCCCCC
   6022 DDDDDDDDDDD
   6022 EEEEEEEEEEE

SCOTT@book> select * from dba_extents where segment_name='T01';
OWNER  SEGMENT_NAME SEGMENT_TYPE TABLESPACE_NAME  EXTENT_ID    FILE_ID   BLOCK_ID      BYTES     BLOCKS RELATIVE_FNO
------ ------------ ------------ --------------- ---------- ---------- ---------- ---------- ---------- ------------
SCOTT  T01          TABLE        T01                      0          7        128      65536          8            7
SCOTT  T01          TABLE        T01                      1          7        136      65536          8            7
SCOTT  T01          TABLE        T01                      2          7        144      65536          8            7
SCOTT  T01          TABLE        T01                      3          7        152      65536          8            7
SCOTT  T01          TABLE        T01                      4          7        160      65536          8            7
SCOTT  T01          TABLE        T01                      5          7        168      65536          8            7
SCOTT  T01          TABLE        T01                      6          7        176      65536          8            7
SCOTT  T01          TABLE        T01                      7          7        184      65536          8            7
SCOTT  T01          TABLE        T01                      8          7        192      65536          8            7
SCOTT  T01          TABLE        T01                      9          7        200      65536          8            7
SCOTT  T01          TABLE        T01                     10          7        208      65536          8            7
SCOTT  T01          TABLE        T01                     11          7        216      65536          8            7
SCOTT  T01          TABLE        T01                     12          7        224      65536          8            7
SCOTT  T01          TABLE        T01                     13          7        232      65536          8            7
SCOTT  T01          TABLE        T01                     14          7        240      65536          8            7
SCOTT  T01          TABLE        T01                     15          7        248      65536          8            7
SCOTT  T01          TABLE        T01                     16          7        256    1048576        128            7
SCOTT  T01          TABLE        T01                     17          7        384    1048576        128            7
SCOTT  T01          TABLE        T01                     18          7        512    1048576        128            7
SCOTT  T01          TABLE        T01                     19          7        640    1048576        128            7
20 rows selected.


SCOTT@book> select count(*) from t01 where DBMS_ROWID.ROWID_BLOCK_NUMBER (rowid) between 128 and 128+64-1 ;
  COUNT(*)
----------
      9978

--//占64K(512K).虽然每个文件的输入缓存512K,但是还是达到1M才写入备份文件的.

3.还有一个方法可以证明输出是1M.

RMAN> CONFIGURE CHANNEL 1 DEVICE TYPE DISK RATE 128 K;
using target database control file instead of recovery catalog
new RMAN configuration parameters:
CONFIGURE CHANNEL 1 DEVICE TYPE DISK RATE 128 K;
new RMAN configuration parameters are successfully stored

--//建立测试脚本:
$ cat tt.sh
#! /bin/bash
rman target / <<EOF &
backup datafile 7,8,9,10,11 format '/home/oracle/backup/XX12345_%U' ;
EOF

sleep 7
cachedel /home/oracle/backup/XX12345*
cachedel /home/oracle/backup/XX12345*
for i in {1 .. 240 }
do
  cachestats /home/oracle/backup/XX12345* >> /tmp/XX.txt
  sleep 1
done

--//注选择cachestats这样执行快,对测试影响小一些.

$ uniq -c /tmp/XX.txt
      3 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 0/7688 (0.0%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 254/7688 (3.3%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 510/7688 (6.6%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 766/7688 (10.0%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 1022/7688 (13.3%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 1278/7688 (16.6%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 1534/7688 (20.0%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 1790/7688 (23.3%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 2046/7688 (26.6%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 2302/7688 (29.9%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 2558/7688 (33.3%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 2814/7688 (36.6%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 3070/7688 (39.9%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 3326/7688 (43.3%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 3582/7688 (46.6%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 3838/7688 (49.9%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 4094/7688 (53.3%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 4350/7688 (56.6%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 4606/7688 (59.9%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 4862/7688 (63.2%)  [filesize=30752.0K, pagesize=4K]
      7 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 5118/7688 (66.6%)  [filesize=30752.0K, pagesize=4K]
      1 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 5190/7688 (67.5%)  [filesize=30752.0K, pagesize=4K]
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      7 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 5374/7688 (69.9%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 5630/7688 (73.2%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 5886/7688 (76.6%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 6142/7688 (79.9%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 6398/7688 (83.2%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 6654/7688 (86.6%)  [filesize=30752.0K, pagesize=4K]
      8 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 6910/7688 (89.9%)  [filesize=30752.0K, pagesize=4K]
     16 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 7166/7688 (93.2%)  [filesize=30752.0K, pagesize=4K]
      6 /home/oracle/backup/XX12345_h6slcas0_1_1 pages in cache: 7408/7408 (100.0%)  [filesize=29632.0K, pagesize=4K]

--//利用cachestats看备份文件缓存的特性(开始要清除缓存,不然一直是100%).写入时同时缓存,这样2行相差基本都是256.注意OS的块大
--//小4K.(除了开始与结束)
--//256*4 = 1024K.
--//另外你可以发现最后每次出现8行,每次出现8行,8*128(配置rman DISK RATE 128 K) 也正好是 1024K.
--//下划线的地方是一点点小意外,查看时正好写入.^_^.
--//最后2行你还可以发现实际上备份文件变小1点点.

--//这也是这个系列的最后一篇,不再这个问题上再纠结了.

目录
相关文章
|
3月前
|
JSON PHP 数据格式
PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes)
PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes)
67 2
|
6月前
PGA memory operation
PGA memory operation
71 1
|
Docker 容器
解决Native memory allocation (mmap) failed to map 2060255232 bytes for committing reserved memory.
解决Native memory allocation (mmap) failed to map 2060255232 bytes for committing reserved memory.
1225 0
|
SQL Oracle 关系型数据库
ORA-00821: Specified value of sga_target 3072M is too small, needs to be at least 12896M
在测试PlateSpine克隆的数据库服务器时,由于资源有限,克隆过来的数据库服务器只给了9G的内存,结果在测试时,老是会出现OOMkiller导致宕机,即out of memory killer,是linux下面当内存耗尽时的的一种处理机制。
2623 0
|
Oracle 关系型数据库 Shell
1128rman Input or output Memory Buffers
[20171128]rman Input or output Memory Buffers.txt --//做一个简单测试rman 的Input or output Memory Buffers.
934 0
|
缓存 Oracle 关系型数据库
[20171128]rman Input or output Memory Buffers.txt
[20171128]rman Input or output Memory Buffers.txt --//Input Memory Buffers如何测试,不清楚.不过找到一本电子书.
1076 0
|
缓存 Oracle 关系型数据库
[20171129]rman input memory buffer 5.txt
[20171129]rman input memory buffer 5.txt --//Input Memory Buffers如何测试,不清楚.不过找到一本电子书.
926 0
|
缓存 Oracle 关系型数据库
[20171129]rman input memory buffer 4.txt
[20171129]rman input memory buffer 4.txt --//Input Memory Buffers如何测试,不清楚.不过找到一本电子书.
920 0
|
缓存 Oracle 关系型数据库
[20171128]rman input memory buffer 3.txt
[20171128]rman input memory buffer 3.txt --//Input Memory Buffers如何测试,不清楚.不过找到一本电子书.
1112 0