Approximating size calculation of the SGA
In 8.0.X :Use the following formula. ((db_block_buffers * block size) + (shared_pool_size + large_pool_size + log_buffers) + 1MB
In 8.1.X : Use the following formula. ((db_block_buffers * block size) + (shared_pool_size + large_pool_size + java_pool_size + log_buffers) + 1MB
In 9.X : To approximate size of the SGA (Shared Global Area), use following formula: db_cache_size + db_keep_cache_size + db_recycle_cache_size + db_nk_cache_size + shared_pool_size + large_pool_size + java_pool_size + log_buffers + 1mb
SGA Usage:
select round(sum(bytes)/1024/1024,2) total_sga,
round(sum(decode(name,'free memory',bytes,0))/1024/1024,2) free,
round((sum(decode(name,'free memory',bytes,0))/1024/1024)/(sum(bytes)/1024/1024)*100,2) free_per
from
v$sgastat
/
I have a doubt regarding SHARED POOL Memory in SGA.
The information stored in ORACLE SGA Memory is
(i) Database Buffer
(ii) Redo Log Buffer
(iii) Shared Pool memory
SELECT NVL(NAME,'TOTAL_SIZE') AS NAME,sum(ROUND(((VALUE/1024)/1024),2)) AS SIZE_MB
FROM V$SGA
GROUP BY ROLLUP(NAME)
/
NAME SIZE_MB
------------------------------ ----------
Database Buffers 420
Fixed Size 1.19
Redo Buffers 6.8
Variable Size 156
TOTAL_SIZE 583.99
From the abouve Query
a) Total SGA size is 583.99 MB
b) Database Buffer Size in SGA is 420 MB
c) Redo Buffer size in SGA is 6.8 MB
Questions
1) What does the VARIABLE SIZE & FIXED SIZE Values refers?
2) How to find the Size of SHARED POOL memory?
Fixed SGA
The fixed SGA is a component of the SGA that varies in size from platform to platform and release to release. It is "compiled" into the Oracle binary itself at installation time (hence the name "fixed"). The fixed SGA contains a set of variables that point to the other components of the SGA, and variables that contain the values of various parameters. The size of the fixed SGA is something over which we have no control, and it is generally very small. Think of this area as a `bootstrap¿ section of the SGA, something Oracle uses internally to find the other bits and pieces of the SGA.
the variable part is everything else that isn't the buffer cache, the fixed size, the redo buffers - it includes things like the shared pool, large pool, java pool, etc.
select pool, sum(bytes) from v$sgastat where pool is not null group by pool
order by pool;
POOL SUM(BYTES)
------------ ----------
java pool 16777216
large pool 16777216
shared pool 268440148
Tuesday, May 25, 2010
Formula for SGA
Posted by
Jabra
at
1:59 PM
Labels: Performance Tuning
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment