P. 1


|Views: 7|Likes:
Published by Ashish Ranjan

More info:

Published by: Ashish Ranjan on May 08, 2012
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less






The total RAM demands for Oracle on MS-Windows are as follows:
OS RAM — 20 percent of total RAM for MS-Windows, 10% of RAM for UNIX Oracle SGA RAM — determined with the show sga command Oracle database connections RAM — Each Oracle connection (when not using the Oracle multi-threaded server) will use two megabytes of RAM plus sort_area_size plus hash_area_size. NB: Once we know the total available RAM memory, we have to subtract 20 percent from this value for MS-Windows overhead. Even in an idle state, Windows services use RAM resources, and we must subtract 20% to get the real free RAM on an idle server.

High Water Mark • Once we know the amount of available RAM for Oracle. If you use Oracle STATSPACK you can get this information from the stats$sysstat table . For systems that are not using Oracle's multithreaded server architecture. or PGA. • There is no easy way to determine the high-water mark of connected Oracle sessions. we must know the high-water mark (HWM) for the number of Oracle connections. each connected session to the Windows server is going require an area of memory for the program global area.

This RAM is used for data row sorting inside the PGA • Hash_area_size parameter value .We reserve 2 meg for Windows and 1 meg for UNIX • Sort_area_size parameter value . .Determining the PGA Size • The size for each PGA RAM region is computed as follows: • OS Overhead . and is used for performing hash joins of Oracle tables.This RAM defaults to 1.5 time sort_area_size.

999 select 1048576+a. • Now. .value+b.• SQL> show parameters area_size NAME TYPE VALUE -----------------------------------.name = 'hash_area_size' .name = 'sort_area_size' and b.----------.--------bitmap_merge_area_size integer 1048576 create_bitmap_area_size integer 8388608 hash_area_size integer 1048576 sort_area_size integer 524288 workarea_size_policy string MANUAL • set pages 999. column pga_size format 999. if we were to multiply the number of connected users by the total PGA demands for each connected user.value pga_size from v$parameter a. v$parameter b where a. we will know exactly how much RAM memory in order to reserve for connected sessions.999.

Any SGA size greater than 388 MB. we would want to adjust the RAM to the data buffers in order to make the SGA size less than 388 MB. the size of an Oracle SGA is based upon the following parameter settings: • • • • shared_pool_size — This sizes the administrative RAM for Oracle and the library cache.• • • • let's assume that we have a high-water mark of 100 connects sessions to our Oracle database server. the most variable of these parameters is db_cache_size. db_cache_size — This parameter determines the size of the RAM for the data buffers large_pool_size — The size of the Java pool log_buffer — The size of the RAM buffer for redo logs • In general. most DBAs add additional RAM to the db_cache_size. The final task is to size the Oracle SGA such that the total memory involved does not exceed 388 MB As a review. and we can now determine the maximum size of our SGA: Total RAM on Windows Server 1250 MB Less: Total PGA regions for 10 users: 362 MB RAM reserved for Windows (20 percent) 500 MB ---------862 MB Hence. . and the server will start RAM paging. adversely affecting the performance of the entire server. We multiply 100 by the total area for each PGA memory region. Because Oracle has an almost insatiable appetite for RAM data buffers.

A Script for Computing Total PGA RAM • set heading off set echo on accept myparm number prompt 'Choose a number between 1 and 10: ' • select 'You chose the number '||&myparm from dual. column pga_size format 999. set pages 999.value+b.value) pga_size from v$parameter a. v$parameter b where a.999 accept hwm number prompt 'Enter the high-water mark of connected users: ' select &hwm*(2048576+a. .name = 'sort_area_size' and b.name = 'hash_area_size' .999.

and we see the disk I/O activity peg at the point where we mount the database. figure 2 is a time-based snapshot of an Oracle databases resource consumption at startup time. These lines form signatures (known usage patterns) that reveals some interesting patterns inside Oracle: • RAM Usage — The yellow line is RAM usage. . This is because Oracle must touch every data file header to read the system change number (SCN). • CPU Usage — The green line is CPU and it is interesting to note that the CPU never goes above 50 percent during Oracle database startup.This is the disk I/O queue length percentage • Let's take a closer look at the MS-Windows performance monitor. • DISK Usage — The blue line is the disk I/O.Monitoring Server Resources in MS-Windows • start > settings > control panel > administrative tools > performance.This is the percentage of CPU resources consumed • Yellow (RAM) . and we see the first spike in the RAM when the SGA is allocated and a short spike in RAM as the database is mounted.This is the number of RAM pages per seconds used • Blue (DISK) . • The MS-Windows performance monitor plots three metrics: • Green (CPU) .

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->