分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
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 specifyDB_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。
给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow
本文详细解析了Oracle数据库中调整数据库缓存大小(DB_CACHE_SIZE)的具体机制,包括内存粒度(granule size)的概念及其如何影响缓存大小的实际分配。通过实例展示了当设置的缓存大小不是粒度大小的整数倍时,数据库如何将其调整到最近的整数倍。
7982

被折叠的 条评论
为什么被折叠?



