海角 发表于 2013-8-13 22:45:39

cache buffers lru chain与cache buffers chains的区别,望老师能帮解释

cache buffers lru chain
The cache buffers lru chain latches protect the lists of buffers in the cache. When adding, moving, or removing a buffer from a list, a latch must be obtained.

cache buffers chains
The cache buffers chains latches are used to protect a buffer list in the buffer cache. These latches are used when searching for, adding, or removing a buffer from the buffer cache. Contention on this latch usually means that there is a block that is greatly contended for (known as a hot block).


CACHE BUFFERS CHAINS,我的理解是每一个BUCKET对于一个链,当要扫描该链时就需要获取cache buffers chains LATCH,但是没有理解cache buffers lru chain?

从官方资料来看,两个定义感觉都差不到,还望老师能帮忙答疑。

情线 发表于 2013-8-19 07:53:41

LRU的意思是Least Recently Used(最近最少使用)就是干净块的一个链表,他是根据干净块的使用情况(select)来连接的,经常使用的在热端,不经常使用的在冷端。cbc链(cache buffers chains)是根据地址连接的,可以这麽说,前面的那个是逻辑上的,后面的那个是物理上的。我是这麽理解的:LRU链表是为了在需要找干净块时需要替换哪个块时用到,而CBC链是在一条SQL语句从shared pool解析完后需要用到那些物理块时用到,CBC链是根据hash算法链起来的,CBC链有多条,LRU,LRUW都只有一对(主,辅)。
页: [1]
查看完整版本: cache buffers lru chain与cache buffers chains的区别,望老师能帮解释