parallel_execution_message_size 對 恢復速度的影響

westzq1984發表於2013-07-14
本文章是記錄下增加parallel_execution_message_size後,對recovery速度的提供情況

今天測試DG遷移一個10T的庫,歸檔量在每天2T左右

先開始測試,發現reco速度只有1GB/分鐘,這個恢復速度,遠遠跟不上日誌產生速度

進行了一些引數調整後,發現速度可以提高到3GB/分鐘以上,這個速度已經足夠滿足恢復需要

版本9208

主要調整了如下引數:
*.db_cache_size=174080M
*.filesystemio_options=setall
*.parallel_execution_message_size=32768

測試發現最明顯的是增加了parallel_execution_message_size

如下是parallel_execution_message_size=2152時,並行程式的情況
    SID NAME       MACHINE    PROGRAM              EVENT                     STATE      SQL_HASH_VALUE OPCODE
------- ---------- ---------- -------------------- ------------------------- ---------- -------------- --------
     14            ods2       oracle@ods2 (ARC0)   rdbms ipc message         WAITING                 0 0
     15            ods2       oracle@ods2 (ARC1)   rdbms ipc message         WAITING                 0 0
     11            ods2       oracle@ods2 (CKPT)   rdbms ipc message         WAITING                 0 0
      2            ods2       oracle@ods2 (DBW0)   rdbms ipc message         WAITING                 0 0
      3            ods2       oracle@ods2 (DBW1)   rdbms ipc message         WAITING                 0 0
      4            ods2       oracle@ods2 (DBW2)   rdbms ipc message         WAITING                 0 0
      5            ods2       oracle@ods2 (DBW3)   rdbms ipc message         WAITING                 0 0
      6            ods2       oracle@ods2 (DBW4)   rdbms ipc message         WAITING                 0 0
      7            ods2       oracle@ods2 (DBW5)   rdbms ipc message         WAITING                 0 0
      8            ods2       oracle@ods2 (DBW6)   rdbms ipc message         WAITING                 0 0
      9            ods2       oracle@ods2 (DBW7)   rdbms ipc message         WAITING                 0 0
     10            ods2       oracle@ods2 (LGWR)   rdbms ipc message         WAITING                 0 0
     19            ods2       oracle@ods2 (MRP0)   PX Deq Credit: send blkd  WAITING                 0 0
     20            ods2       oracle@ods2 (P000)   PX Deq: Par Recov Change  WAITING                 0 0
     44            ods2       oracle@ods2 (P001)   PX Deq: Par Recov Change  WAITING                 0 0
     32            ods2       oracle@ods2 (P002)   PX Deq: Par Recov Change  WAITING                 0 0
     29            ods2       oracle@ods2 (P003)   PX Deq: Par Recov Change  WAITING                 0 0
     21            ods2       oracle@ods2 (P004)   PX Deq: Par Recov Execute WAITING                 0 0
     45            ods2       oracle@ods2 (P005)   PX Deq: Par Recov Change  WAITING                 0 0
     34            ods2       oracle@ods2 (P006)   PX Deq: Par Recov Change  WAITING                 0 0
     28            ods2       oracle@ods2 (P007)   PX Deq: Par Recov Change  WAITING                 0 0
     22            ods2       oracle@ods2 (P008)   PX Deq: Par Recov Change  WAITING                 0 0
     46            ods2       oracle@ods2 (P009)   PX Deq: Par Recov Change  WAITING                 0 0
     33            ods2       oracle@ods2 (P010)   PX Deq: Par Recov Change  WAITING                 0 0
     30            ods2       oracle@ods2 (P011)   PX Deq: Par Recov Change  WAITING                 0 0
     23            ods2       oracle@ods2 (P012)   PX Deq: Par Recov Change  WAITING                 0 0
     47            ods2       oracle@ods2 (P013)   PX Deq: Par Recov Change  WAITING                 0 0
     37            ods2       oracle@ods2 (P014)   PX Deq: Par Recov Change  WAITING                 0 0
     40            ods2       oracle@ods2 (P015)   PX Deq: Par Recov Change  WAITING                 0 0
     24            ods2       oracle@ods2 (P016)   PX Deq: Par Recov Change  WAITING                 0 0
     49            ods2       oracle@ods2 (P017)   PX Deq: Par Recov Change  WAITING                 0 0
     36            ods2       oracle@ods2 (P018)   PX Deq: Par Recov Change  WAITING                 0 0
     31            ods2       oracle@ods2 (P019)   db file parallel read     WAITING                 0 0
     25            ods2       oracle@ods2 (P020)   PX Deq: Par Recov Change  WAITING                 0 0
     48            ods2       oracle@ods2 (P021)   PX Deq: Par Recov Change  WAITING                 0 0
     35            ods2       oracle@ods2 (P022)   db file parallel read     WAITING                 0 0
     39            ods2       oracle@ods2 (P023)   PX Deq: Par Recov Change  WAITING                 0 0
     26            ods2       oracle@ods2 (P024)   PX Deq: Par Recov Execute WAITING                 0 0
     50            ods2       oracle@ods2 (P025)   PX Deq: Par Recov Change  WAITING                 0 0
     38            ods2       oracle@ods2 (P026)   PX Deq: Par Recov Execute WAITING                 0 0
     41            ods2       oracle@ods2 (P027)   db file parallel read     WAITING                 0 0
     27            ods2       oracle@ods2 (P028)   PX Deq: Par Recov Change  WAITING                 0 0
     51            ods2       oracle@ods2 (P029)   PX Deq: Par Recov Change  WAITING                 0 0
     43            ods2       oracle@ods2 (P030)   PX Deq: Par Recov Change  WAITING                 0 0
     42            ods2       oracle@ods2 (P031)   PX Deq: Par Recov Change  WAITING                 0 0
      1            ods2       oracle@ods2 (PMON)   pmon timer                WAITING                 0 0
     13            ods2       oracle@ods2 (RECO)   rdbms ipc message         WAITING                 0 0
     12            ods2       oracle@ods2 (SMON)   smon timer                WAITING                 0 0
     52 SYS        ods2       sqlplus@ods2 (TNS V1 SQL*Net message to client WAITED KNO     1791611658 Query

如下是修改parallel_execution_message_size=32768後,並行程式的情況    

    SID NAME       MACHINE    PROGRAM              EVENT                     STATE      SQL_HASH_VALUE OPCODE
------- ---------- ---------- -------------------- ------------------------- ---------- -------------- --------
     14            ods2       oracle@ods2 (ARC0)   rdbms ipc message         WAITING                 0 0
     15            ods2       oracle@ods2 (ARC1)   rdbms ipc message         WAITING                 0 0
     11            ods2       oracle@ods2 (CKPT)   rdbms ipc message         WAITING                 0 0
      2            ods2       oracle@ods2 (DBW0)   rdbms ipc message         WAITING                 0 0
      3            ods2       oracle@ods2 (DBW1)   rdbms ipc message         WAITING                 0 0
      4            ods2       oracle@ods2 (DBW2)   rdbms ipc message         WAITING                 0 0
      5            ods2       oracle@ods2 (DBW3)   rdbms ipc message         WAITING                 0 0
      6            ods2       oracle@ods2 (DBW4)   rdbms ipc message         WAITING                 0 0
      7            ods2       oracle@ods2 (DBW5)   rdbms ipc message         WAITING                 0 0
      8            ods2       oracle@ods2 (DBW6)   rdbms ipc message         WAITING                 0 0
      9            ods2       oracle@ods2 (DBW7)   rdbms ipc message         WAITING                 0 0
     10            ods2       oracle@ods2 (LGWR)   rdbms ipc message         WAITING                 0 0
     19            ods2       oracle@ods2 (MRP0)   PX Deq Credit: send blkd  WAITING                 0 0
     22            ods2       oracle@ods2 (P000)   db file parallel read     WAITING                 0 0
     35            ods2       oracle@ods2 (P001)   db file parallel read     WAITING                 0 0
     28            ods2       oracle@ods2 (P002)   db file parallel read     WAITING                 0 0
     31            ods2       oracle@ods2 (P003)   PX Deq: Par Recov Execute WAITING                 0 0
     20            ods2       oracle@ods2 (P004)   db file parallel read     WAITING                 0 0
     36            ods2       oracle@ods2 (P005)   db file parallel read     WAITING                 0 0
     29            ods2       oracle@ods2 (P006)   db file parallel read     WAITING                 0 0
     33            ods2       oracle@ods2 (P007)   db file parallel read     WAITING                 0 0
     21            ods2       oracle@ods2 (P008)   db file parallel read     WAITING                 0 0
     37            ods2       oracle@ods2 (P009)   db file parallel read     WAITING                 0 0
     32            ods2       oracle@ods2 (P010)   db file parallel read     WAITING                 0 0
     45            ods2       oracle@ods2 (P011)   db file parallel read     WAITING                 0 0
     24            ods2       oracle@ods2 (P012)   db file parallel read     WAITING                 0 0
     39            ods2       oracle@ods2 (P013)   db file parallel read     WAITING                 0 0
     30            ods2       oracle@ods2 (P014)   db file parallel read     WAITING                 0 0
     41            ods2       oracle@ods2 (P015)   db file parallel read     WAITING                 0 0
     23            ods2       oracle@ods2 (P016)   db file parallel read     WAITING                 0 0
     38            ods2       oracle@ods2 (P017)   PX Deq: Par Recov Change  WAITING                 0 0
     42            ods2       oracle@ods2 (P018)   PX Deq: Par Recov Change  WAITING                 0 0
     34            ods2       oracle@ods2 (P019)   db file parallel read     WAITING                 0 0
     25            ods2       oracle@ods2 (P020)   db file parallel read     WAITING                 0 0
     40            ods2       oracle@ods2 (P021)   db file parallel read     WAITING                 0 0
     47            ods2       oracle@ods2 (P022)   db file parallel read     WAITING                 0 0
     46            ods2       oracle@ods2 (P023)   PX Deq: Par Recov Change  WAITING                 0 0
     26            ods2       oracle@ods2 (P024)   PX Deq: Par Recov Change  WAITING                 0 0
     43            ods2       oracle@ods2 (P025)   db file parallel read     WAITING                 0 0
     48            ods2       oracle@ods2 (P026)   db file parallel read     WAITING                 0 0
     49            ods2       oracle@ods2 (P027)   PX Deq: Par Recov Change  WAITING                 0 0
     27            ods2       oracle@ods2 (P028)   PX Deq: Par Recov Change  WAITING                 0 0
     44            ods2       oracle@ods2 (P029)   db file parallel read     WAITING                 0 0
     51            ods2       oracle@ods2 (P030)   db file parallel read     WAITING                 0 0
     50            ods2       oracle@ods2 (P031)   db file parallel read     WAITING                 0 0
      1            ods2       oracle@ods2 (PMON)   pmon timer                WAITING                 0 0
     13            ods2       oracle@ods2 (RECO)   rdbms ipc message         WAITING                 0 0
     12            ods2       oracle@ods2 (SMON)   smon timer                WAITING                 0 0
     52 SYS        ods2       sqlplus@ods2 (TNS V1 SQL*Net message to client WAITED KNO     1791611658 Query
 
可以看到更多的並行程式,能參與到恢復時資料塊的讀取過程中
更多的程式在db file parallel read上等待,而不是空閒的PX Deq: Par Recov Change
 
Topas也可以看到磁碟的速度也可以達到一個比較滿意的使用。
 
Topas Monitor for host:    ods2                 EVENTS/QUEUES    FILE/TTY
Sun Jul 14 00:00:17 2013   Interval:  2         Cswitch   44680  Readch   229.0M
                                                Syscall   71123  Writech   65.2M
CPU  User%  Kern%  Wait%  Idle%                 Reads     17472  Rawin         0
ALL    3.9   17.0    8.2   70.9                 Writes     5249  Ttyout      384
                                                Forks       148  Igets         0
Network  KBPS   I-Pack  O-Pack   KB-In  KB-Out  Execs       211  Namei      5946
Total   66.4K    45.2K  4962.5   66.1K   291.1  Runqueue    4.0  Dirblk        0
                                                Waitqueue   8.0
Disk    Busy%     KBPS     TPS KB-Read KB-Writ                   MEMORY
Total     1.6   227.1K    9.8K  160.8K   66.4K  PAGING           Real,MB  262144
                                                Faults    48980  % Comp     78
FileSystem        KBPS     TPS KB-Read KB-Writ  Steals    34286  % Noncomp  21
Total            229.1K   16.8K 164.0K  65.2K   PgspIn        0  % Client   21
                                                PgspOut       0
Name            PID  CPU%  PgSp Owner           PageIn    18042  PAGING SPACE
ftp        58589764   1.8   0.7 ora_ods         PageOut   16693  Size,MB   16384
lrud         262160   1.3   1.2 root            Sios      34680  % Used      3
oracle     44695802   0.6  24.4 ora_ods                          % Free     97
topas_nm    6226276   0.5   3.2 root            NFS (calls/sec)
dmpdaemo    3407906   0.2   0.4 root            SerV2         0  WPAR Activ     0
dmpdaemo    2490968   0.2   0.4 root            CliV2         0  WPAR Total     0
psmd         393236   0.1   1.2 root            SerV3         0  Press: "h"-help
aioserve    6619624   0.1   0.4 ora_ods         CliV3         0         "q"-quit
aioserve   11731010   0.1   0.4 ora_ods
aioserve   60096560   0.1   0.4 ora_ods
oracle     57541130   0.1   4.4 ora_ods
aioserve   57409736   0.1   0.4 ora_ods
aioserve    6226678   0.1   0.4 ora_ods
aioserve   35782724   0.1   0.4 ora_ods
topasrec    4850392   0.1  11.8 root
aioserve   11600304   0.1   0.4 ora_ods
vx_sched     852324   0.1 101.9 root
aioserve   44696298   0.1   0.4 ora_ods
aioserve   13042332   0.1   0.4 ora_ods
aioserve   10683126   0.1   0.4 ora_ods

如下是parallel_execution_message_size=32768的恢復速度,基本在30s以內完成一個
[21:11:09]Media Recovery Log /arch_temp/2_1170768.arc
[21:11:38]Media Recovery Log /arch_temp/2_1170769.arc
[21:12:07]Media Recovery Log /arch_temp/2_1170770.arc
[21:12:19]Media Recovery Log /arch_temp/1_537919.arc
[21:12:43]Media Recovery Log /arch_temp/2_1170771.arc
[21:13:13]Media Recovery Log /arch_temp/2_1170772.arc
[21:13:41]Media Recovery Log /arch_temp/2_1170773.arc
[21:14:06]Media Recovery Log /arch_temp/1_537920.arc
[21:14:15]Media Recovery Log /arch_temp/2_1170774.arc
[21:14:44]Media Recovery Log /arch_temp/2_1170775.arc
[21:15:14]Media Recovery Log /arch_temp/2_1170776.arc
[21:15:16]Media Recovery Log /arch_temp/1_537921.arc
[21:15:42]Media Recovery Log /arch_temp/2_1170777.arc
[21:16:06]Media Recovery Log /arch_temp/2_1170778.arc
[21:16:27]Media Recovery Log /arch_temp/2_1170779.arc
[21:16:39]Media Recovery Log /arch_temp/1_537922.arc
[21:16:59]Media Recovery Log /arch_temp/2_1170780.arc
|
如下是parallel_execution_message_size=2152時的恢復速度,基本在2分鐘以上完成一個  
[09:58:27]Media Recovery Log /arch_temp/2_1172357.arc
[10:00:14]Media Recovery Log /arch_temp/1_538436.arc
[10:01:18]Media Recovery Log /arch_temp/2_1172358.arc
[10:03:53]Media Recovery Log /arch_temp/2_1172359.arc
[10:06:15]Media Recovery Log /arch_temp/2_1172360.arc
[10:06:41]Media Recovery Log /arch_temp/1_538437.arc
[10:08:23]Media Recovery Log /arch_temp/2_1172361.arc
[10:10:57]Media Recovery Log /arch_temp/2_1172362.arc

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8242091/viewspace-766213/,如需轉載,請註明出處,否則將追究法律責任。

相關文章