首先推荐ITPUT上几篇文章,感觉很有收获:
Oracle是如何工作的:这篇文章通过一个生动的例子,解释了Oracle各部分是如何协调工作的,尤其是对于SGA在其中的作用。
关于SGA设置的一点总结 和关于2G内存的SGA的参数优化的问题
主要原因是当前的数据库SGA配置中的db_cache设置太小,这个在ITPUB上遭到了大家的猛烈批判 :),下面是修改前的情况:
SQL>SELECTNAME,VALUE
FROMv$parameter
WHERENAMEIN
('sga_max_size','db_cache_size',
'shared_pool_size','shared_pool_reserved_size','large_pool_size','java_pool_size',
'db_block_size','db_block_buffers','log_buffer','sort_area_size','sort_area_retained_size',
'hash_area_size','sessions','open_cursors'
)ORDERBYNAME;
NAMEVALUE
--------------------------------------
db_block_buffers0
db_block_size4096
db_cache_size33554432
hash_area_size1048576
java_pool_size67108864
large_pool_size117440512
log_buffer524288
open_cursors300
sessions225
sga_max_size437327188
shared_pool_reserved_size10066329
shared_pool_size201326592
sort_area_retained_size0
sort_area_size524288
14rowsselected.
SQL>showsga
TotalSystemGlobalArea437327188bytes
FixedSize451924bytes
VariableSize402653184bytes
DatabaseBuffers33554432bytes
RedoBuffers667648bytes
Variable Size表示MAX_SGA中除去db_cache后剩余的部分。
按照大家的建议,我做了如下修改
shared_pool_size=184800000(180M)
db_block_size=8192
db_cache_size=204800000(200M)
log_buffer=1024000(1M)
large_pool_size=51200000(50M)
java_pool_size=51457280(50M)
sort_area_size=524288(512K)
sort_area_retained_size=8192
调大了db_cache,减小了large_pool.
OS AS3U4
MEM 4GB
CPU 2×2.8GB
还有Configuring Linux kernel parameters
[etc][sysctl.conf]
kernel.msgmnb = 65535
kernel.msgmni = 2878
fs.file-max = 524288
kernel.sem = 256 64000 256 256
kernel.shmmax = 3098693632
[etc][security][limits.conf]
* soft nofile 4096
* hard nofile 65536
* soft nproc 16384
* hard nproc 16384
* soft nproc unlimited
* hard nproc unlimited
[etc][profile]
ulimit -u 16384 -n 65536
仅供参考
我在OCS的压力测试中,针对1000个并发用户在10g中的配置:
SQL> show sga
Total System Global Area 1677721600 bytes
Fixed Size 779628 bytes
Variable Size 384047764 bytes
Database Buffers 1291845632 bytes
Redo Buffers 1048576 bytes
---------------------
db_block_buffers = 0
db_block_size = 8192
db_cache_size = 419430400
hash_area_size = 131072
java_pool_size = 134217728
large_pool_size = 0
log_buffer = 1048576
open_cursors = 2000
sessions = 1200
sga_max_size = 1677721600
shared_pool_reserved_size = 10905190
shared_pool_size = 218103808
sort_area_retained_size = 0
sort_area_size = 65536
仅供参考
dongyichen 于 2011-08-05 09:02:04发表:
谢谢楼主~
jpl2000 于 2006-07-16 12:50:30发表:
顶