Erp100论坛's Archiver

xiangzhao 发表于 2008-7-9 14:29

Oracle 内存分配与调整

[font=宋体][size=12pt]一、[/size][/font][size=12pt][font=Times New Roman] [/font][/size][font=宋体][size=12pt]前言[/size][/font][size=12pt][/size]
[font=宋体][size=12pt]对于[/size][/font][size=12pt][font=Times New Roman]oracle [/font][/size][font=宋体][size=12pt]的内存的管理,截止到[/size][/font][size=12pt][font=Times New Roman]9iR2[/font][/size][font=宋体][size=12pt],[/size][/font][size=12pt][font=Times New Roman] [/font][/size][font=宋体][size=12pt]都是相当重要的环节,[/size][/font][size=12pt][font=Times New Roman] [/font][/size][font=宋体][size=12pt]管理不善,将可能给数据库带来严重的性能问题。下面我们将一步一步就内存管理的各个方面进行探讨。[/size][/font][size=12pt][/size]
[font=宋体][size=12pt]二、[/size][/font][size=12pt][font=Times New Roman] [/font][/size][font=宋体][size=12pt]概述[/size][/font][size=12pt][/size]
[size=12pt][font=Times New Roman]oracle [/font][/size][font=宋体][size=12pt]的内存可以按照共享和私有的角度分为系统全局区和进程全局区,也就是[/size][/font][size=12pt][font=Times New Roman]SGA [/font][/size][font=宋体][size=12pt]和[/size][/font][size=12pt][font=Times New Roman]PGA(process global area or private global area) [/font][/size][font=宋体][size=12pt]。对于[/size][/font][size=12pt][font=Times New Roman]SGA [/font][/size][font=宋体][size=12pt]区域内的内存来说,是共享的全局的,在[/size][/font][size=12pt][font=Times New Roman]UNIX [/font][/size][font=宋体][size=12pt]上,必须为[/size][/font][size=12pt][font=Times New Roman]oracle [/font][/size][font=宋体][size=12pt]设置共享内存段(可以是一个或者多个),因为[/size][/font][size=12pt][font=Times New Roman]oracle [/font][/size][font=宋体][size=12pt]在[/size][/font][size=12pt][font=Times New Roman]UNIX [/font][/size][font=宋体][size=12pt]上是多进程;而在[/size][/font][size=12pt][font=Times New Roman]WINDOWS [/font][/size][font=宋体][size=12pt]上[/size][/font][size=12pt][font=Times New Roman]oracle [/font][/size][font=宋体][size=12pt]是单进程(多个线程),所以不用设置共享内存段。[/size][/font][size=12pt][font=Times New Roman]PGA [/font][/size][font=宋体][size=12pt]是属于进程(线程)私有的区域。在[/size][/font][size=12pt][font=Times New Roman]oracle [/font][/size][font=宋体][size=12pt]使用共享服务器模式下([/size][/font][size=12pt][font=Times New Roman]MTS[/font][/size][font=宋体][size=12pt])[/size][/font][size=12pt][font=Times New Roman],PGA [/font][/size][font=宋体][size=12pt]中的一部分,也就是[/size][/font][size=12pt][font=Times New Roman]UGA [/font][/size][font=宋体][size=12pt]会被放入共享内存[/size][/font][size=12pt][font=Times New Roman]large_pool_size [/font][/size][font=宋体][size=12pt]中。对于[/size][/font][size=12pt][font=Times New Roman]SGA [/font][/size][font=宋体][size=12pt]部分,我们通过[/size][/font][size=12pt][font=Times New Roman]sqlplus [/font][/size][font=宋体][size=12pt]中查询可以看到:[/size][/font][size=12pt][font=Times New Roman] [/font][/size]
[size=12pt][font=Times New Roman]SQL> select * from v$sga; [/font][/size]
[size=12pt][font=Times New Roman]NAME VALUE [/font][/size]
[size=12pt][font=Times New Roman]Fixed Size 454032 [/font][/size]
[size=12pt][font=Times New Roman]Variable Size 109051904 [/font][/size]
[size=12pt][font=Times New Roman]Database Buffers 385875968 [/font][/size]
[size=12pt][font=Times New Roman]Redo Buffers 667648 [/font][/size]
[font=宋体][size=12pt]其中:[/size][/font][size=12pt][/size]

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2007 Comsenz Inc.