在《深入浅出Oracle》一书的P110页,关于Oracle的Granule我有这样一段描述:
有朋友在Windows2003上测试得出了不同的结论:
其实这个granule_size在不同平台、不同版本中,Oracle的设置的缺省值都可能不同,书中提到的是一种通常设置,具体的我们知道了Oracle的内存管理方式就好。
Oracle9i的官方文档如下描述:
Oracle10gR2文档如下描述:
列举如上,供参考。
-The End-
自9i开始,Oracle引入新的初始化参数db_cache_size;该参数定义主Block Size(db_block_size定义的块大小)的default缓冲池的大小;
Db_cache_size最小值为一个粒度(granule)。
粒度(granule):粒度是连续虚拟内存分配的单位,粒度是9i新引入的参数,其大小取决于SGA_MAX_SIZE参数所定义的SGA总的大小
当SGA<128M时,粒度值为4M;
否则粒度值为16M
粒度大小受内部隐含参数_ksmg_granule_size的控制
有朋友在Windows2003上测试得出了不同的结论:
SQL> show sga
Total System Global Area 319888364 bytes
Fixed Size 453612 bytes
Variable Size 310378496 bytes
Database Buffers 8388608 bytes
Redo Buffers 667648 bytes
SQL> set linesize 120
SQL> col name for a30
SQL> col value for a20
SQL> col describ for a60
SQL> SELECT x.ksppinm NAME, y.ksppstvl VALUE, x.ksppdesc describ
2 FROM SYS.x$ksppi x, SYS.x$ksppcv y
3 WHERE x.inst_id = USERENV ('Instance')
4 AND y.inst_id = USERENV ('Instance')
5 AND x.indx = y.indx
6 AND x.ksppinm LIKE '%&par%'
7 /
Enter value for par: _ksmg_granule_size
old 6: AND x.ksppinm LIKE '%&par%'
new 6: AND x.ksppinm LIKE '%_ksmg_granule_size%'
NAME VALUE DESCRIB
------------------------------ -------------------- ---------------------------
_ksmg_granule_size 8388608 granule size in bytes
SQL> alter system set sga_max_size=100M scope=spfile;
System altered.
SQL> startup force
ORACLE instance started.
Total System Global Area 114367248 bytes
Fixed Size 453392 bytes
Variable Size 109051904 bytes
Database Buffers 4194304 bytes
Redo Buffers 667648 bytes
数据库装载完毕。
数据库已经打开。
SQL> SELECT x.ksppinm NAME, y.ksppstvl VALUE, x.ksppdesc describ
2 FROM SYS.x$ksppi x, SYS.x$ksppcv y
3 WHERE x.inst_id = USERENV ('Instance')
4 AND y.inst_id = USERENV ('Instance')
5 AND x.indx = y.indx
6 AND x.ksppinm LIKE '%&par%'
7 /
输入 par 的值: _ksmg_granule_size
原值 6: AND x.ksppinm LIKE '%&par%'
新值 6: AND x.ksppinm LIKE '%_ksmg_granule_size%'
NAME VALUE DESCRIB
------------------------------ -------------------- ----------------------------
_ksmg_granule_size 4194304 granule size in bytes
其实这个granule_size在不同平台、不同版本中,Oracle的设置的缺省值都可能不同,书中提到的是一种通常设置,具体的我们知道了Oracle的内存管理方式就好。
Oracle9i的官方文档如下描述:
Granule size is determined by total SGA size. On most platforms, the size of a granule is 4 MB if the total SGA size is less than 128 MB, and it is 16 MB for larger SGAs. There may be some platform dependency, for example, on 32-bit Windows NT, the granule size is 8 MB for SGAs larger than 128 MB.
Oracle10gR2文档如下描述:
Granule size is determined by total SGA size. On most platforms, the size of a granule is 4 MB if the total SGA size is less than 1 GB, and granule size is 16MB for larger
SGAs. Some platform dependencies arise. For example, on 32-bit Windows, the
granule size is 8 M for SGAs larger than 1 GB.
列举如上,供参考。
-The End-
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
【纯干货】Oracle 19C RU 19.27 发布,如何快速升级和安装?
Lucifer三思而后行
638次阅读
2025-04-18 14:18:38
Oracle RAC 一键安装翻车?手把手教你如何排错!
Lucifer三思而后行
618次阅读
2025-04-15 17:24:06
XTTS跨版本迁移升级方案(11g to 19c RAC for Linux)
zwtian
514次阅读
2025-04-08 09:12:48
Oracle数据库一键巡检并生成HTML结果,免费脚本速来下载!
陈举超
510次阅读
2025-04-20 10:07:02
【ORACLE】记录一些ORACLE的merge into语句的BUG
DarkAthena
475次阅读
2025-04-22 00:20:37
Oracle 19c RAC更换IP实战,运维必看!
szrsu
452次阅读
2025-04-08 23:57:08
【活动】分享你的压箱底干货文档,三篇解锁进阶奖励!
墨天轮编辑部
451次阅读
2025-04-17 17:02:24
【ORACLE】你以为的真的是你以为的么?--ORA-38104: Columns referenced in the ON Clause cannot be updated
DarkAthena
448次阅读
2025-04-22 00:13:51
一页概览:Oracle GoldenGate
甲骨文云技术
447次阅读
2025-04-30 12:17:56
火焰图--分析复杂SQL执行计划的利器
听见风的声音
394次阅读
2025-04-17 09:30:30