Linux RAC修改配置LOCK_SGA
当lock_sga参数设置为TRUE时(默认值是FALSE),可以保证整个SGA被锁定在物理内存中,这样可以防止SGA被换出到虚拟内存。只要设置lock_sga为“TRUE”便可保证SGA被锁定在物理内存中,这里之所以顺便将pre_page_sga参数也设置为“TRUE”,是因为这样可以保证在启动数据库时把整个SGA读入到物理内存中,以便提高系统的效率(虽然会增加系统的启动时间)。
env:linux Oracle 10.2.0.4
Node2
Linux操作系统对每一个任务在物理内存中能够锁住的最大值做了限制!需要手工进行调整。
[root@ldbrac2 mysql]# su - oracle
[oracle@ldbrac2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on WedFeb 29 10:27:24 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters,OLAP and Data Mining options
SQL> show parameter sga
NAME TYPE VALUE
------------------------------------ -----------------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 880M
sga_target big integer 880M
SQL> show parameter lock_a^Hsg^H^[[D^[[D
SQL> show parameter lock_sga
NAME TYPE VALUE
------------------------------------ -----------------------------------------
lock_sga boolean FALSE
SQL> alter system set lock_sga=truescope=spfile;
System altered.
SQL> alter system set pre_page_sga=truescope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL>
SQL> startup;
ORACLE instance started.
Total System Global Area 922746880 bytes
Fixed Size 1222624 bytes
Variable Size 260048928 bytes
Database Buffers 654311424 bytes
Redo Buffers 7163904 bytes
Database mounted.
Database opened.
SQL> show parameter lock_sga
NAME TYPE VALUE
------------------------------------ -----------------------------------------
lock_sga boolean TRUE
SQL>
SQL> show parameter lock_sga
NAME TYPE VALUE
------------------------------------ -----------------------------------------
lock_sga boolean TRUE
SQL> showparameter lock_sga
NAME TYPE VALUE
------------------------------------ -----------------------------------------
lock_sga boolean TRUE