如何察看Oracle进程消耗的内存


经常有人问到如何在Unix下确定进程消耗的内存资源,以及为何Top工具的显示非常高。
有人说Top的输出不精确,这种说法是不确切的。实际上是Top输出显示的Oracle进程内存使用,包含了SGA部分。这也是SGA的意义所在。
SGA可以被共享,可以被所有进程所访问,在进程的寻址空间里就包含了SGA的大小。

至于如何更为精确的确定进程的内存消耗,本文简要介绍如下(在QuickIO下,你可能无法看到本文描述情况):

1.系统平台及数据库版本

> > $ uname -a > SunOS billing 5.8 Generic_108528-23 sun4u sparc SUNW,Ultra-4 >
> Sun Microsystems Inc. SunOS 5.8 Generic Patch October 2001 > $ sqlplus "/ as sysdba" >
> SQL*Plus: Release 9.2.0.4.0 - Production on Sun Nov 28 10:48:00 2004 >
> Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. >
>
> Connected to: > Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production > With the Partitioning, OLAP and Oracle Data Mining options > JServer Release 9.2.0.4.0 - Production >
> SQL> select * from v$version; >
> BANNER > ---------------------------------------------------------------- > Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production > PL/SQL Release 9.2.0.4.0 - Production > CORE 9.2.0.3.0 Production > TNS for Solaris: Version 9.2.0.4.0 - Production > NLSRTL Version 9.2.0.4.0 - Production >
> SQL> show sga >
> Total System Global Area 253200688 bytes > Fixed Size 731440 bytes > Variable Size 167772160 bytes > Database Buffers 83886080 bytes > Redo Buffers 811008 bytes > SQL> exit > Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production > With the Partitioning, OLAP and Oracle Data Mining options > JServer Release 9.2.0.4.0 - Production
>
>
>


Published At
Categories with 数据库类
Tagged with
comments powered by Disqus