AIX上PIN住ORACLE SGA

一: 设置操作系统参数
# vmo -L v_pinshm
NAME CUR DEF BOOT MIN MAX UNIT TYPE
DEPENDENCIES
--------------------------------------------------------------------------------
v_pinshm 0 0 0 0 1 boolean D
--------------------------------------------------------------------------------
# vmo -p -o v_pinshm=1
Setting v_pinshm to 1 in nextboot file
Setting v_pinshm to 1
# vmo -L maxpin%
NAME CUR DEF BOOT MIN MAX UNIT TYPE
DEPENDENCIES
--------------------------------------------------------------------------------
maxpin% 80 80 80 1 99 % memory D
pinnable_frames
memory_frames
--------------------------------------------------------------------------------
# vmo -p -o maxpin%=90
Setting maxpin% to 90 in nextboot file
Setting maxpin% to 90


二: 重启系统
Shutdown –Fr


三:查看当前的PIN住的内存量以及总内存大小
# svmon -G
size inuse free pin virtual
memory 786432 300295 486137 132864 265614
pg space 131072 1553
work pers clnt other
pin 100112 0 0 32752
in use 265614 0 34681
PageSize PoolSize inuse pgsp pin virtual
s 4 KB - 228679 1553 73968 193998
m 64 KB - 4476 0 3681 4476
# vmstat
System configuration: lcpu=2 mem=3072MB
kthr memory page faults cpu
----- ----------- ------------------------ ------------ -----------
r b avm fre re pi po fr sr cy in sy cs us sy id wa
1 1 265622 486104 0 0 0 0 0 0 68 982 200 1 1 95 3


四: SQLPLUS登进去查看LOCK_SGA参数的设置
SQL> show parameter lock_sga;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
SQL> alter system set lock_sga=true scope=spfile;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 935329792 bytes
Fixed Size 2025272 bytes
Variable Size 247466184 bytes
Database Buffers 679477248 bytes
Redo Buffers 6361088 bytes
Database mounted.
Database opened.


五: 看看LOCK完后的PIN住的内存用量的变化
# svmon -G
size inuse free pin virtual
memory 786432 501166 285266 361735 460852
pg space 131072 1827
work pers clnt other
pin 328983 0 0 32752
in use 460852 0 40314
PageSize PoolSize inuse pgsp pin virtual
s 4 KB - 429534 1827 302839 389220
m 64 KB - 4477 0 3681 4477


六: 查看SGA用量
SQL> show parameter lock
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_block_buffers integer 0
db_block_checking string FALSE
db_block_checksum string TRUE
db_block_size integer 8192
db_file_multiblock_read_count integer 16
ddl_wait_for_locks boolean FALSE
distributed_lock_timeout integer 60
dml_locks integer 748
gc_files_to_locks string
lock_name_space string
lock_sga boolean TRUE
SQL> select sum(value)/1024/1024 from v$sga;
SUM(VALUE)/1024/1024
--------------------
892


七: SVMON算一下PIN住的内存差值是否正好是SGA的使用量
PIN完SGA后
# svmon -G
size inuse free pin virtual
memory 786432 501166 285266 361735 460852
pg space 131072 1827
work pers clnt other
pin 328983 0 0 32752
in use 460852 0 40314
PageSize PoolSize inuse pgsp pin virtual
s 4 KB - 429534 1827 302839 389220
m 64 KB - 4477 0 3681 4477
之前
# svmon -G
size inuse free pin virtual
memory 786432 300295 486137 132864 265614
pg space 131072 1553
work pers clnt other
pin 100112 0 0 32752
in use 265614 0 34681
PageSize PoolSize inuse pgsp pin virtual
s 4 KB - 228679 1553 73968 193998
m 64 KB - 4476 0 3681 4476
(302839-73968=228871)*4096=937455616/1024/1024=894M
与之前查出的
SQL> select sum(value)/1024/1024 from v$sga;
SUM(VALUE)/1024/1024
--------------------
892
几乎保持一致~

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值