• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Tuning SGA
 

Tuning SGA

on

  • 389 views

 

Statistics

Views

Total Views
389
Views on SlideShare
377
Embed Views
12

Actions

Likes
0
Downloads
9
Comments
0

2 Embeds 12

http://anargodjaev.wordpress.com 10
http://www.linkedin.com 2

Accessibility

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Tuning SGA Tuning SGA Document Transcript

    • Anar Godjaev http://anargodjaev.wordpress.com/ Tuning SGA -- monitoring SGA system parameters --- max size of the sga select name, value, description from v$parameterwhere name='sga_max_size'; -- sum of all values of the following query cannot exceed sga_max_size select sum(value) from ( select name, value, description from v$parameter where name in ('java_pool_size', 'shared_pool_size', 'large_pool_size') UNION select name, value, description from v$parameterwhere name like 'db_%cache_size' UNION select name, value, description from v$parameterwhere name='log_buffer' ); ------- lets have a look at something the value of sga_max_size may not be equal to the sum of its components the difference between these tow values will give you the approximate free space selecttrunc(((t2.sga_max_size - t1.total_sga_params)/1024/1024)) FREE_MB from ( select sum(value) total_sga_paramsfrom ( select name, value, description from v$parameter where name in ('java_pool_size', 'shared_pool_size', 'large_pool_size') UNION select name, value, description from v$parameterwhere name like 'db_%cache_size' UNION select name, value, description from v$parameterwhere name='log_buffer' ) ) t1 ,( select sum(value) sga_max_sizefrom v$parameterwhere name='sga_max_size' ) t2; --- other ways of obtaining free sga size -select* from v$sgastatwhere name='free memory'; selectcurrent_size/1024/1024 MB from v$sga_dynamic_free_memory; --- changing sga and sgacomponenets values
    • Anar Godjaev http://anargodjaev.wordpress.com/ --- recommended: sga_max_size should be phsical_memory/2 alter system set sga_max_size=500M scope=spfile; -- changes of this parameter will take affect after instance restart alter system set java_pool_size=150M scope=spfile; -- changes of this parameter will take affect after instance restart alter system set shared_pool_size=150M; alter system set large_pool_size=50M; alter system set db_cache_size=150M; -- which system parameter can be changed without an instance restart -select* from v$parameterwhere issys_modifiable='IMMEDIATE' --- following parameter needs an instance restart -select* from v$parameterwhere issys_modifiable!='FALSE' -- to change these kind of system parameters following steps can be followed alter system set <name>=<value> scope=spfile; -- from now on you should login from sqlplus "/as sysdba" alter system checkpoint; shutdown immediate; startup; Advices for SGA --- advices for sga -select* from V$SHARED_POOL_ADVICE; select* from V$DB_CACHE_ADVICE; select* from V$PGA_TARGET_ADVICE; NOTES: 1- db_cache_advice system parameter should be ON for v$shared_pool_advice system view can be up-to-date. 2- for all advice views statistics_level system parameter should be at least in BASIC mode. -- setting db_cache_advice system parameter -select name, value, issys_modifiable, description from v$parameter where name='db_cache_advice'; alter system set db_cache_advice='ON';
    • Anar Godjaev http://anargodjaev.wordpress.com/ select name, value, issys_modifiable, description from v$parameter where name='db_cache_advice'; --- modifying statistics_level -select value from v$parameterwhere name='statistics_level'; alter system set statistics_level='TYPICAL'; -- allowed values are [ALL|TYPICAL|BASIC]