Monday, July 1, 2013

Determine Granule Size in Oracle

What is a memory granule

When a database instance starts up, the amount of memory allocated is determined by the allocations requested in the parameter file (init file or spfile).  This memory is allocated in units called granules. All memory pool sizes will be allocated in multiples of the granule size.

How is the granule size determined

The granule size is determined based on the amount of memory requested at the instance startup. It is based on the SGA_MAX_SIZE.  If MEMORY_MAX_TARGET is specified, then SGA_MAX_SIZE defaults to MEMORY_MAX_TARGET for the purpose of sizing the granule.  Once set, the granule size does not change for the life of the instance.

The granule sizes at the time of writing, are:



RDBMSSGA_MAX_SIZE (or memory_max_target)GRANULE SIZE
9.2<= 128MB4MB
 > 128MB16MB
10.2<= 1GB4MB
 > 1GB16MB
11gR1<= 1GB4MB
 >1Gb   <= 4GB16MB
 >4Gb   <= 16GB64MB
 >16Gb <= 64GB256MB
 > 64GB512MB
11gR2 <= 1Gb4Mb
 >1Gb   <= 8Gb16Mb
 >8Gb   <= 16Gb32Mb
 >16Gb <= 32Gb64Mb
 >32Gb <= 64Gb128Mb
 >64Gb <= 128Gb256Mb
 > 128Gb512Mb




How to find the Granule size

You can check the granule size that is currently set for your database instance by running the following SQL statement as SYSDBA

select bytes from v$sgainfo where name like 'Granule Size';

No comments:

Post a Comment