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;
NAME TYPE VALUE
------------------------------------ -------------------------------- ------------------------------
db_writer_processes integer 2
从上述信息我们发现,CPU的进程数一直维持在12个左右,且频繁出现等待的进程,因此该数据库不适宜调整DB_WRITER_PROCESSES参数。
LOG_ARCHIVE_MAX_PROCESSES
Property Description
Parameter type Integer
Default value 2 默认值为2
Modifiable ALTER SYSTEM
Range of values 1 to 30 取值范围为1-30
Basic No
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;
NAME TYPE VALUE
------------------------------------ -------------------------------- ------------------------------
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