13. You have executed this command to change the size of the database buffer cache:
SQL> ALTER SYSTEM SET DB_CACHE_SIZE=2516582;
System altered.
To verify the change in size, you executed this command:
SQL> SHOW PARAMETER DB_CACHE_SIZE
NAME TYPE VALUE
------------------- ----------- ------------------
db_cache_size big integer 4194304 4M
Why is the value set to 4194304 and not to 2516582?
A.because 4194304 is the granule size
B.because 4194304 is the standard block size
C.because 4194304 is the largest nonstandard block size defined in the database
D.because 4194304 is the total size of data already available in the database buffer cache
The memory for dynamic components in the SGA is allocated in the unit of granules. The granule size is determined by the amount of SGA memory requested when the instance starts. Specifically, the granule size is based on the value
of the SGA_MAX_SIZE
initialization parameter. Table 6-1shows the granule size for different amounts of SGA memory.
SGA Memory Amount | Granule Size |
---|---|
Less than or equal to 1 GB |
4 MB |
Greater than 1 GB and less than or equal to 8 GB |
16 MB |
Greater than 8 GB and less than or equal to 16 GB |
32 MB |
Greater than 16 GB and less than or equal to 32 GB |
64 MB |
Greater than 32 GB and less than or equal to 64 GB |
128 MB |
Greater than 64 GB and less than or equal to 128 GB |
256 MB |
Greater than 128 GB |
512 MB |
You can query the V$SGAINFO
view to see the granule size that is being used by an instance. The same granule size is used for all components in the SGA.
If you specify a size for a component that is not a multiple of granule size, Oracle Database rounds the specified size up to the nearest multiple. For example, if the granule size is 4 MB and you specify
DB_CACHE_SIZE
as 10 MB, the database actually allocates 12 MB.
如果指定的size不是granule size的整数倍,则rounds到整数倍,例如,如果granule size为4M,指定DB_CACHE_SIZE as 10 MB,不是4的整数倍,则实际上DB_CACHE_SIZE as 为12M。
一下是我的环境,因为我的sga大于1G,故granule size为16M。