设置sga时,当物理内存很大时,是不是给os留一个固定大小的内存值就可以了?

[复制链接]
查看11 | 回复9 | 2009-11-30 15:55:11 | 显示全部楼层 |阅读模式
设置sga时,当物理内存很大时,是不是给os留一个固定大小的内存值就可以了?
比如不管内存好几十g或上百g,都给os一个固定的内存,2g,是不是就可以呢?
回复

使用道具 举报

千问 | 2009-11-30 15:55:11 | 显示全部楼层
如果oracle的sga设置过大会不会对系统性能造成影响?
“如果读到内存中的数据块太多,需要管理数据块的hash列表就会很长,这样会话扫描列表的时间就会增加,
持有cache buffer chainlatch的时间就会变长,其他会话获得这个latch的机会就会降低,等待就会增加。”
上面摘自《让oracle跑的更快》中讲latch争用部分内容。
系统有100G的物理内存,现在分给oracle50G,awr部分内存和latch都在99%以上,本来想再给oracle
多分些,看了上面的不敢调了。
高手能不能给点指导建议:内存充足的情况下,怎么去分配?
回复

使用道具 举报

千问 | 2009-11-30 15:55:11 | 显示全部楼层
你是 MTS(共享服务器)模式的么?
如果是 专有服务器,那你得为你的 PGA 留下足够的空间的哦 !
回复

使用道具 举报

千问 | 2009-11-30 15:55:11 | 显示全部楼层
the more the memory, the long the hash list. yes, but who can say it will increase the time to scan hash list ? and increase latch time ?
that's strange for me . that's depended on how many physical data fetch into memory.maybe this is abstract concept.
if you just want to fect 10 rows in to memory,maybe one block is enough . do you think it will increase latch time ? it will increase scan time ?
but if you fetch 100000 rows , of couse , when memory is not large, even there are no enough memory in hash list, then written dirth block and release memory . from this point of view, when you locate a large memory, maybe it will increase scan time and latch time.
because when memory is not large, and no enough memory in hash list, oracle just flush dirth memory. it needn't scan so long hash list. but if you locate a large memory, than even there are free memory, oracle should scan so long list.
so the conclusion is : i don't think increate sga will cause the latch time and scan time increase .this is depened on how many data do you want to fetch .
appendix:
this is complex question. we also should consider how many data should fetch into memory and how many dirth data written back to disk .
回复

使用道具 举报

千问 | 2009-11-30 15:55:11 | 显示全部楼层
dont believe anyone. just analyze by yourself.even tom sometime it's wrong . at least i found a little bit case.
回复

使用道具 举报

千问 | 2009-11-30 15:55:11 | 显示全部楼层
自从9i 就已经引入了 sub buffer 的概念,一个sub buffer 都有一个自己的cache buffer chain.这就很大程度上解决了 data buffer多大导致了 cache buffer cache 过长的问题。
回复

使用道具 举报

千问 | 2009-11-30 15:55:11 | 显示全部楼层
原帖由 Meets 于 2010-8-28 16:22 发表
自从9i 就已经引入了 sub buffer 的概念,一个sub buffer 都有一个自己的cache buffer chain.这就很大程度上解决了 data buffer多大导致了 cache buffer cache 过长的问题。







顶!


回复

使用道具 举报

千问 | 2009-11-30 15:55:11 | 显示全部楼层
sub hash list.
so who can clarify the defination of long hash list or short hash list ?
when we set 10G , than you think because we have sub list. so NP.
when we set 20G, we also think so .
but when we set 100G, how do you think ?
回复

使用道具 举报

千问 | 2009-11-30 15:55:11 | 显示全部楼层
有点复杂。恐怕既要想,也要试验。
回复

使用道具 举报

千问 | 2009-11-30 15:55:11 | 显示全部楼层
cpu负载重不重?不重的话可以多分点.
给系统留2g好像小了点
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行