天天看點

DB_WRITER_PROCESSES與LOG_ARCHIVE_MAX_PROCESSES

DB_WRITER_PROCESSES

Property  Description

Parameter type  Integer

Default value  1 or CPU_COUNT / 8, whichever is greater 預設值為1或CPU個數的1/8

Modifiable  No      

Range of values  1 to 20      取值範圍為1-20

Basic   No

DB_WRITER_PROCESSES is useful for systems that modify data heavily. It specifies the initial number of database writer processes for an instance.

注:DB_WRITER_PROCESSES參數設定DBWn的程序數;由于該參數是靜态參數,需要重新開機資料庫。修改該參數值并非越大越好,應根據CPU高峰時的空閑程度進行相應設定,比如:

--對CPU的目前資訊采樣

[oracle@bldc01 bolan]$ vmstat 5

procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------

 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st

12  2 862788 111796  92004 29095088    1    1   134   130    0    0 15  1 83  1  0

14  1 862772 116024  91992 29092368    6    0   749  6552 14584 21236 57  3 36  4  0

13  0 862772 136640  92060 29097092    0    0   814  6392 16218 24140 56  4 36  4  0

 9  1 862772 129644  92076 29101512    0    0   692  7062 14918 22074 54  3 38  4  0

15  1 862772 118000  91984 29080072    0    4   577  6216 15478 22928 53  4 39  4  0

10  0 862772 117148  92000 29085192    0    0   692  7029 16265 24344 55  4 37  4  0

13  0 862772 113464  92012 29081772    0    0   676  6954 13775 20328 58  3 35  4  0

--檢視目前oracle伺服器的CPU個數

SQL> show parameter cpu_count;

NAME         TYPE         VALUE

------------------------------------ -------------------------------- ------------------------------

cpu_count        integer         16

--檢視db_writer_processes的參數值

SQL> show parameter db_writer_processes;

db_writer_processes       integer         2

從上述資訊我們發現,CPU的程序數一直維持在12個左右,且頻繁出現等待的程序,是以該資料庫不适宜調整DB_WRITER_PROCESSES參數。

LOG_ARCHIVE_MAX_PROCESSES

Default value  2      預設值為2

Modifiable  ALTER SYSTEM     

Range of values  1 to 30      取值範圍為1-30

LOG_ARCHIVE_MAX_PROCESSES specifies the number of archiver background processes (ARC0 through ARC9) Oracle initially invokes.

The actual number of archiver processes in use may vary subsequently based on archive workload.

注:LOG_ARCHIVE_MAX_PROCESSES參數設定ARCn的程序數,該參數會自動根據資料庫的實際情況進行調整。比如:

--檢視log_archive_max_processes的參數值

SQL> show parameter log_archive_max_processes;

log_archive_max_processes      integer         4

[oracle@bldc01 bolan]$ ps -aux |grep ora_arc

Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ

oracle   20174  0.0  0.0  61184   772 pts/1    S+   15:01   0:00 grep ora_arc

oracle   31910  0.0  0.6 17280616 216552 ?     Ss   Mar01 121:59 ora_arc0_bolan

oracle   31914  0.0  0.3 17176748 107336 ?     Ss   Mar01 102:02 ora_arc1_bolan

oracle   31918  0.0  0.6 17279920 220532 ?     Ss   Mar01  24:13 ora_arc2_bolan

oracle   31922  0.0  0.7 17307772 243192 ?     Ss   Mar01 122:44 ora_arc3_bolan