Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1791774
  • 博文数量: 335
  • 博客积分: 4690
  • 博客等级: 上校
  • 技术积分: 4341
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-08 21:38
个人简介

无聊之人--除了技术,还是技术,你懂得

文章分类

全部博文(335)

文章存档

2016年(29)

2015年(18)

2014年(7)

2013年(86)

2012年(90)

2011年(105)

分类: DB2/Informix

2013-06-19 12:37:28

讲解的一般,但是毕竟是志同道合之人,留着备忘吧

不过发现作者09以后,就没有更新过,不知道是另谋高就还是其它原因。。。。

Directory Reclaim是什么?

GBP包含DirectoryData两个部分。

Data很好理解,即Data Pages,与Local BP内容一样;

Directory指定了Data Page的位置和状态信息,位置信息告诉需要Data PageMember,所需要的Data Page是在GBP还是在LBP,而状态信息告诉各个Member,本Directory所指定的Data对此Member是否有效。

 

由于Data可能在GBP,也可能在LBP,所以DataDirectory就有如下关系:

1 Directory  n Data (n>=1) (但对于一个给定的Data,有且只有一个Directory与之对应)

 

 

GBP STRUCTURE DSNDP10_GBP1使用下面的POLICY定义:

STRUCTURE NAME(DSNDP10_GBP1) SIZE(745884)  

   INITSIZE(621568)                        

   FULLTHRESHOLD(90)                       

   ALLOWAUTOALT(YES)                       

   DUPLEX(ENABLED)                         

   REBUILDPERCENT(1)                       

   PREFLIST(C061, C031)                     

 

      

ALLOWAUTOALT定义为YES的情形下,

   If both entries and elements exceed their FULLTHRESHOLDs, XES may

increase the structure size in order to gain enough capacity

   If either one or the other (but not both) exceed FULLTHRESHOLD, XES

does not increase the size and will “juggle” entries and elements

 

如果Tablespace都使用GBPCACHE CHANGE,当绝大多数是SELECT语句时候,需要的Directory就多;当Update多的时候就需要更多的Data Pages,当达到FULLTHRESHOLD的时候,系统就会进行Directory Reclaim

 

Directory Reclaim Message

IXC588I Explanation:  The system has initiated an alter request to correct a resource shortage for one or more of the structure objects that the structure contains. When XCF has detected that a structure is at or above its structure full threshold value in terms of one or more of the structure objects that the structure contains, XCF will start an alter request to correct the situation, when allowed. The current in-use and total counts for the objects will be displayed by message IXC585E.

 

Example

IXC588I AUTOMATIC ALTER PROCESSING INITIATED 801     

FOR STRUCTURE DSNDP10_GBP1.                          

CURRENT SIZE:     745984 K                           

TARGET SIZE:      745984 K                           

TARGET ENTRY TO ELEMENT RATIO:      32887 :      20418

 

 

IXC590I Explanation:  The system initiated stucture alter processing has finished.

 

Example

IXC590I AUTOMATIC ALTER PROCESSING FOR STRUCTURE DSNDP10_GBP1 836  

COMPLETED.  TARGET NOT ATTAINED.                                   

CURRENT SIZE:              745984 K  TARGET:     745984 K          

CURRENT ENTRY COUNT:       260105    TARGET:     260349            

CURRENT ELEMENT COUNT:     161651    TARGET:     161631            

CURRENT EMC COUNT:              0    TARGET:          0            

ALTER OF REBUILD-NEW STRUCTURE INSTANCE WAS COMPLETED.  

 

 

 

Directory Reclaim会有什么后果?

 

通常大量的Directory Reclaim会伴随大量的cross-invalidation,当cross-invalidation很多时候,DB2性能就会有很大的影响。

 

什么是cross-invalidation         

Group buffer pools use a cross-invalidation mechanism to maintain data consistency across the buffer pools of group members. Shared data pages are registered in a group buffer pool directory in each cache structure, thus           enabling the coupling facility control program to cross-invalidate the copies of data pages that are held in individual member buffer pools. Cross-invalidation takes place when a member's own buffer pool does not contain the latest version of the data. In this case, the member must reread the pages from either the group buffer pool or disk, if that member needs to reference the pages again.

 

 

但如果Directory所占的比率太大,所ReclaimDirectory都是无效的,没有对应的Data Page,此时也就无所谓发生cross-invalidation


 

这种情况Directory Reclaim不会对DB2 Performance产生太多的影响。

 

蓝线为Directory,主坐标,红线为cross-invalidation,次坐标。

 

 

Directory Reclaim如何避免?

调整DirectoryData的比率?

阅读(1712) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~