After 9i, the internal component size of the SGA can be dynamically adjusted or automatically managed by the database, and when the memory size is set, the basic unit of allocation is granularity (granule)
- granule is a contiguous virtual memory, the size of the area sga_max_size size
- SGA _max_size less than 128m g ranule 4m granule 16m
- the allocation size for each memory component must be granule the integer times
- Whole SGA minimum not less than 3 a G Ranule size
- view granule size: v$sgainfo
- sga_max_size Size greater than 128M so granule size 16m
Sql> Select name,bytes/1024/1024 mb,resizeable from V$sgainfo;
NAME MB RES
-------------------------------- ---------- ---
Fixed SGA Size 2.14937592 No
Redo buffers 6.765625 No
Buffer Cache Size 608 Yes
Shared Pool Size 272 Yes
Large Pool Size + Yes
Java Pool Size + Yes
Streams Pool Size 0 Yes
Shared IO Pool Size 0 Yes
Granule Size + No
Maximum SGA Size 1576.91797 No
Startup overhead in Shared Pool 189.55072 No
Free SGA Memory Available 640
Rows selected.
Sql> Show Parameter Sga_max_size
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
Sga_max_size Big Integer 1584M
Let's look at the following example:
Although the set shared_pool_size size is 10M, the view is really 16M, because the basic unit of allocating memory is the Granularity granule. Each memory component allocation size must be an integer multiple of granule.
sql> show parameter shared_p;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
Shared_pool_reserved_size Big Integer 10066329
Shared_pool_size Big Integer 0
sql> alter system set shared_pool_size= 10M;
System altered.
Sql> Show parameter shared_p;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
Shared_pool_reserved_size Big Integer 10066329
shared_pool_size Big Integer 16M
The basic unit of Oracle Allocated Memory: granule (granularity)