奇怪,使用resize扩容表空间触发了rebalance!

在DB2 10.1FP3,AIX 7102环境,文件系统使用的是AIX LVM,有个表空间共32个容器,每个容器大小是20G,打算扩容这个表空间,于是使用了resize all 24G的命令,db2 "alter tablespace tbs resize (all 24G)",执行完成后发现 tbs 开始rebalance了,这个有点奇怪,我是在现有的container增加空间,不会影响表空间的HWM,为什么会触发rebalance呢?


====已解决===

该问题与表空间分布有关,可以查看这篇博文:http://blog.itpub.net/802647/viewspace-2141095/

参与17

5同行回答

macrozengmacrozeng数据库管理员IBM
10.1 的信息中心里面说了一个类似的例子 Increasing the size of device containers. The following exampleillustrates how to increase two device containers (each already existingwith 1 000 pages) in a table space on a  Linux or UNIX operating sy...显示全部

10.1 的信息中心里面说了一个类似的例子

Increasing the size of device containers. The following exampleillustrates how to increase two device containers (each already existingwith 1 000 pages) in a table space on a  Linux or UNIX operating system:

[code class=\"\"]    ALTER TABLESPACE HISTORY
      RESIZE (DEVICE \'/dev/rhd7\'  2000,
              DEVICE  \'/dev/rhd8\' 2000)[/code]

The twodevices increase from 1 000 pages in size to 2 000 pages.The contents of the table space might be rebalanced across the containers. Access to the table space is not restricted during the rebalancing.



https://www.ibm.com/support/knowledgecenter/SSEPGG_10.1.0/com.ibm.db2.luw.admin.dbobj.doc/doc/t0005185.html


里面说到了 resize 也是有可能触发 rebalancing , 可能是因为当前数据在各个 containers 之间分布不均匀,达到了一个内部的阈值,从而触发了 rebalancing 的操作,如果想知道进一步的细节,可能需要开 PMR 问下 lab 的 db2 support team

收起
政府机关 · 2017-06-20
浏览2334
icycastleicycastle课题专家组数据库管理员某证券公司
这个问题已查明,与表空间分布有关,因为以前一次表空间扩容使用了add file命令增加了较小的容器,接着使用resize all命令把容器大小都改为一样大小,但是这样操作后表空间extent分布在各个容器里是不对齐的,导致这次使用resize命令扩容的时候extent进行了重新分布。...显示全部

这个问题已查明,与表空间分布有关,因为以前一次表空间扩容使用了add file命令增加了较小的容器,接着使用resize all命令把容器大小都改为一样大小,但是这样操作后表空间extent分布在各个容器里是不对齐的,导致这次使用resize命令扩容的时候extent进行了重新分布。

收起
证券 · 2017-06-21
浏览2133
l954368978l954368978数据库管理员ytx
有可能是你之前添加容器的时候,指定了BEGIN NEW STRIPE SET显示全部

有可能是你之前添加容器的时候,指定了BEGIN NEW STRIPE SET

收起
金融其它 · 2017-06-21
浏览2159
  • 没有,上面输出的第二个字段Stripe都是0,说明只有1个stripe set
    2017-06-21
icycastleicycastle课题专家组数据库管理员某证券公司
通过snapshot for tablespaces可以看到表空间映射,可能和rebalance有关Range Stripe Stripe Max Max Start End Adj. ContainersNumber Set Offset Extent Page Stripe Stripe[ 0] [ 0] 0 163835 5242751 0 40958 0 4 (0,1,2,3)[ 1] [ 0] 0 237563 7602047 40959 49150 0 ...显示全部

通过snapshot for tablespaces可以看到表空间映射,可能和rebalance有关

Range Stripe Stripe Max Max Start End Adj. Containers

Number Set Offset Extent Page Stripe Stripe

[ 0] [ 0] 0 163835 5242751 0 40958 0 4 (0,1,2,3)

[ 1] [ 0] 0 237563 7602047 40959 49150 0 9 (0,1,2,3,4,5,6,7,8)

[ 2] [ 0] 0 401398 12844767 49151 81917 0 5 (4,5,6,7,8)

[ 3] [ 0] 0 499702 15990495 81918 90109 0 12 (4,5,6,7,8,9,10,11,12,13,14,15)

[ 4] [ 0] 0 600054 19201759 90110 104445 0 7 (9,10,11,12,13,14,15)

[ 5] [ 0] 0 1212383 38796287 104446 131068 0 23 (9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31)

[ 6] [ 0] 0 1572831 50330623 131069 153596 0 16 (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31)

表空间映射和我预计的不太一样,每个container都是一样大小的,为什么会出现这样的表空间映射?

正常应该是类似如下的表空间映射

Range Stripe Stripe Max Max Start End Adj. Containers

Number Set Offset Extent Page Stripe Stripe

[ 0] [ 0] 0 2228191 71302143 0 69630 0 32 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31)

收起
证券 · 2017-06-21
浏览2172
l954368978l954368978数据库管理员ytx
之前每个容器的大小设置一样吗?显示全部

之前每个容器的大小设置一样吗?

收起
金融其它 · 2017-06-20
浏览2172

提问者

icycastle
数据库管理员某证券公司

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2017-06-20
  • 关注会员:3 人
  • 问题浏览:4444
  • 最近回答:2017-06-21
  • X社区推广