码迷,mamicode.com
首页 > 其他好文 > 详细

rac内存管理

时间:2017-04-03 12:41:28      阅读:226      评论:0      收藏:0      [点我收藏+]

标签:param   created   root   roo   uuid   ted   shared   swap   fstab   

一、内存管理第一层:

1、memory_target和memory_max_target开启自动内存管理。

rac1

SQL> show parameter memory

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

hi_shared_memory_address integer 0

memory_max_target big integer 0

memory_target big integer 0

shared_memory_address integer 0

rac2

SQL> show parameter memory

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

hi_shared_memory_address integer 0

memory_max_target big integer 0

memory_target big integer 0

shared_memory_address integer 0

二、内存管理第二层

1、sga_target、sga_max_size实现自动sga管理。

rac1

SQL> show parameter sga

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

lock_sga boolean FALSE

pre_page_sga boolean FALSE

sga_max_size big integer 2928M

sga_target big integer 2928M

rac2

SQL> show parameter sga

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

lock_sga boolean FALSE

pre_page_sga boolean FALSE

sga_max_size big integer 2928M

sga_target big integer 2928M

2、pga_aggregate_target实现自动pga管理。

rac1

SQL> show parameter pga

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

pga_aggregate_target big integer 974M

rac2

SQL> show parameter pga

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

pga_aggregate_target big integer 974M

三、内存管理第三层

rac1

SQL> show parameter db_cache_size

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

db_cache_size big integer 0

SQL> show parameter log_buffer

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

log_buffer integer 16941056

SQL> show parameter shared_pool_size

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

shared_pool_size big integer 0

SQL> show parameter shared_pool_size

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

shared_pool_size big integer 0

SQL> show parameter large_pool

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

large_pool_size big integer 0

SQL> show parameter java_pool

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

java_pool_size big integer 0

SQL> show parameter stream

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

streams_pool_size big integer 0

rac2

SQL> show parameter db_cache_size

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

db_cache_size big integer 0

SQL> show parameter log_buffer

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

log_buffer integer 16941056

SQL> show parameter shared_pool

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

shared_pool_reserved_size big integer 28521267

shared_pool_size big integer 0

SQL> show parameter large_pool

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

large_pool_size big integer 0

SQL> show parameter java_pool

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

java_pool_size big integer 0

SQL> show parameter streams

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

streams_pool_size big integer 0

四、shm修改

如果想修改OS下oracle数据库内存大于OS内存一般以上,需要修改shm值(shm值默认为OS物理内存的50%),修改方法如下:

[root@server ~]# cat /etc/fstab

#

# /etc/fstab

# Created by anaconda on Fri Dec 4 19:49:21 2015

#

# Accessible filesystems, by reference, are maintained under ‘/dev/disk‘

# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

#

UUID=4225f161-f532-422f-82a4-1bc53ce8ea1a / ext4 defaults 1 1

UUID=07d3b54d-5537-4f84-bd9e-ceb3937312d0 swap swap defaults 0 0

tmpfs /dev/shm tmpfs defaults 0 0

devpts /dev/pts devpts gid=5,mode=620 0 0

sysfs /sys sysfs defaults 0 0

proc /proc proc defaults 0 0

[root@server ~]# vim /etc/fstab

#

# /etc/fstab

# Created by anaconda on Fri Dec 4 19:49:21 2015

#

# Accessible filesystems, by reference, are maintained under ‘/dev/disk‘

# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

#

UUID=4225f161-f532-422f-82a4-1bc53ce8ea1a / ext4 defaults 1 1

UUID=07d3b54d-5537-4f84-bd9e-ceb3937312d0 swap swap defaults 0 0

tmpfs /dev/shm,size=5g tmpfs defaults 0 0

devpts /dev/pts devpts gid=5,mode=620 0 0

sysfs /sys sysfs defaults 0 0

proc /proc proc defaults 0 0

重启服务器,或者杀掉占用shm内存的进程,重新挂在磁盘。

rac内存管理

标签:param   created   root   roo   uuid   ted   shared   swap   fstab   

原文地址:http://www.cnblogs.com/wcwen1990/p/6661659.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!