时间:2021-07-01 10:21:17 帮助过:77人阅读
该客户的数据库是Oracle 11.1.0.7,运行在p550主机上,16个逻辑CPU,16G内存,AIX 6.1 64位系统,共分配了8G内存给SGA,2G内存给
昨天去一客户那里做巡检,遇到了经典的ora-04030错误,alert日志如下:
Tue Oct 28 09:57:46 2014
Errors in file /Oracle/app/oracle/diag/rdbms/wmsdb/wmsdb/trace/wmsdb_ora_33358038.trc (incident=177302):
ORA-04030: out of process memory when trying to allocate 118808 bytes (QERHJ hash-joi,kllcqas:kllsltba)
Incident details in: /oracle/app/oracle/diag/rdbms/wmsdb/wmsdb/incident/incdir_177302/wmsdb_ora_33358038_i177302.trc
Errors in file /oracle/app/oracle/diag/rdbms/wmsdb/wmsdb/trace/wmsdb_ora_33358038.trc (incident=177303):
ORA-04030: out of process memory when trying to allocate 169040 bytes (pga heap,kgh stack)
ORA-04030: out of process memory when trying to allocate 118808 bytes (QERHJ hash-joi,kllcqas:kllsltba)
Incident details in: /oracle/app/oracle/diag/rdbms/wmsdb/wmsdb/incident/incdir_177303/wmsdb_ora_33358038_i177303.trc
Errors in file /oracle/app/oracle/diag/rdbms/wmsdb/wmsdb/incident/incdir_177302/wmsdb_ora_33358038_i177302.trc:
ORA-04030: out of process memory when trying to allocate 169040 bytes (pga heap,kgh stack)
ORA-04030: out of process memory when trying to allocate 118808 bytes (QERHJ hash-joi,kllcqas:kllsltba)
Errors in file /oracle/app/oracle/diag/rdbms/wmsdb/wmsdb/trace/wmsdb_ora_33358038.trc (incident=177304):
ORA-04030: out of process memory when trying to allocate 160 bytes (pga heap,control file cache)
ORA-04030: out of process memory when trying to allocate 118808 bytes (QERHJ hash-joi,kllcqas:kllsltba)
Incident details in: /oracle/app/oracle/diag/rdbms/wmsdb/wmsdb/incident/incdir_177304/wmsdb_ora_33358038_i177304.trc
Tue Oct 28 09:57:53 2014
Trace dumping is performing id=[cdmp_20141028095753]
Tue Oct 28 09:57:54 2014
Sweep Incident[177303]: completed
Tue Oct 28 09:57:57 2014
Errors in file /oracle/app/oracle/diag/rdbms/wmsdb/wmsdb/incident/incdir_177302/wmsdb_ora_33358038_i177302.trc:
ORA-04030: out of process memory when trying to allocate 160 bytes (pga heap,control file cache)
ORA-04030: out of process memory when trying to allocate 118808 bytes (QERHJ hash-joi,kllcqas:kllsltba)
Errors in file /oracle/app/oracle/diag/rdbms/wmsdb/wmsdb/trace/wmsdb_ora_33358038.trc (incident=177305):
ORA-04030: out of process memory when trying to allocate 16776728 bytes (QERHJ hash-joi,QERHJ Hash Table Entries)
Incident details in: /oracle/app/oracle/diag/rdbms/wmsdb/wmsdb/incident/incdir_177305/wmsdb_ora_33358038_i177305.trc
Trace dumping is performing id=[cdmp_20141028095802]
......
该客户的数据库是Oracle 11.1.0.7,运行在p550主机上,16个逻辑CPU,16G内存,AIX 6.1 64位系统,共分配了8G内存给SGA,2G内存给PGA,由memory_target=10G参数动态调整,同时,memory_max_target也设置成10G,表示Oracle最多可以占用OS的内存为10G(物理内存的62.5%)。这2个参数是11g新增的,可以动态分配SGA和PGA,而在10g中仅只能通过设置sga_target来动态管理sga中的各内存组件,pga是要另外手动设置的。
SQL> show parameters target
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
archive_lag_target integer 0
db_flashback_retention_target integer 1440
fast_start_io_target integer 0
fast_start_mttr_target integer 0
memory_max_target big integer 10G
memory_target big integer 10G
pga_aggregate_target big integer 2G
sga_target big integer 8G
网上google了一下,很多关于ora-04030的错误的描述都大同小异,主要由以下几种:
A. 对于32 BIT系统,有SGA 1.7G限制
B. 某些OS系统本身也有一些内存参数限制
C. OS系统本身物理内存+Swap的限制
对于A,由于系统是64 bit的,没有1.7G的限制;
对于B,用ulimit查看的结果为ulimited;
对于C,,OS本身的内存为16G,不过用topas查看,内存使用率已经为90%