查了几个比较好的参考文档
1.http://www.puschitz.com/TuningLinuxForOracle.shtml(推荐)
2.http://www1.ap.dell.com/content/topics/topic.aspx/ap/topics/power/zhcn/ps3q03_mahmood?c=cn&l=zh&s=bsd
参考第一个文档,使用VLM方式,写了个简单的step by step.尚未test
Step by step – using vlm on RHEL4 for Oracle 9206
一、参考文档:
http://www.puschitz.com/TuningLinuxForOracle.shtml
http://www1.ap.dell.com/content/topics/topic.aspx/ap/topics/power/zhcn/ps3q03_mahmood?c=cn&l=zh&s=bsd
二、说明
扩大SAG的一种方法是扩展缓冲缓存或超大内存(VLM)。这一方法不支持Oracle9i Release2的一些特性,例如动态SGA在数据库中存在多个数据块大小。
三、步骤:
1.规划内存使用
8G 内存,配置4G给SGA,其中db cache : 3G, shared pool 400m,
db_block_size=8192
db_block_buffers=393216
shared_pool_size=419430400
2.配置OS
a)配置ramfs
假设oracle 的primary group 为oinstall
# umount /dev/shm
# mount -t ramfs ramfs /dev/shm
# chown oracle:oinstall /dev/shm
修改/etc/rc.local,加上
umount /dev/shm
mount –t ramfs ramfs /dev/shm
chown oracle:oinstall /dev/shm
b)配置memlock
修改 /etc/security/limits.conf,加上:
oracle soft memlock 3145728
oracle hard memlock 3145728
配置后,以oracle登录,检查
$ulimit –l
是否为3145728
3.配置Oracle
修改初始化文件
a)加上:
use_indirect_data_buffers=true
db_block_size=8192
db_block_buffers=393216
shared_pool_size=419430400
b)把db_cache_size 注释
4.启动oracle
Now try to start the database. Note the database startup can take a while. Also, the sqlplus banner or show sga may not accurately reflect the actual SGA size in older Oracle versions.
The 3GB file for the database buffer cache can be seen in the ramfs shared memory filesystem:
$ ls -al /dev/shm
total 120
drwxr-xr-x 1 oracle dba 0 Nov 20 16:29 .
drwxr-xr-x 22 root root 118784 Nov 20 16:25 ..
-rw-r—– 1 oracle dba 3221225472 Nov 20 16:30 ora_orcl_458754
$