设为首页 收藏本站
查看: 532|回复: 0

[经验分享] DB2 SMS tablespace 容器大小不等测试

[复制链接]

尚未签到

发表于 2016-11-15 09:18:15 | 显示全部楼层 |阅读模式
看到官方文档有这句:
引用

When all space in a single container in an SMS table space is allocated to tables, the table space is considered full, even if space remains in other containers。
The SMS table space is full as soon as any one of its containers is full. Thus, it is important to have the same amount of space available to each container.


就是说,无论SMS有多少个容器,只有其中一个满了,就这个表空间都满了
测试:

--建立两个大小不一的文件系统
[iyunv@localhost mnt]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/tmp/test1_s.img      4.9M   22K  4.6M   1% /mnt/test1_s
/tmp/test1_big.img    9.7M  1.1M  8.1M  12% /mnt/test1_big
--建立SMS表空间
db2 => create tablespace SMSFULLTEST managed by system USING ('/mnt/test1_s/','/mnt/test1_big/')
DB20000I  The SQL command completed successfully.
--表空间信息
[db2inst2@localhost db2dump]$ db2pd -alldbs -tablespace 4
Database Partition 0 -- Database SAMPLE -- Active -- Up 0 days 00:46:48 -- Date 04/28/2011 04:20:45
Tablespace 4 Configuration:
Address    Type Content PageSz ExtentSz Auto Prefetch BufID BufIDDisk FSC NumCntrs MaxStripe  LastConsecPg Name
0x9D140B50 SMS  Regular 4096   32       Yes  64       1     1         Off 2        0          31           SMSFULLTEST
Tablespace 4 Statistics:
Address    TotalPgs   UsablePgs  UsedPgs    PndFreePgs FreePgs    HWM        Max HWM    State      MinRecTime NQuiescers PathsDropped
0x9D140B50 2308       2308       2308       0          0          0          0          0x00000000 1303934864 0          No         
Tablespace 4 Autoresize Statistics:
Address    AS  AR  InitSize    IncSize     IIP MaxSize     LastResize                 LRF
0x9D140B50 No  No  0           0           No  0                    None                       No  
Containers:
Address    ContainNum Type    TotalPgs   UseablePgs PathID     StripeSet  Container
0x9D0EE960 0          Path    1155       1155       -          0          /mnt/test1_s
0x9D0EEB60 1          Path    1153       1153       -          0          /mnt/test1_big

--向里面塞入数据
db2 => create table SMSFULL1 as (select * from syscat.tables) definition only in SMSFULLTEST
DB20000I  The SQL command completed successfully.
db2 => insert into SMSFULL1 select * from syscat.tables
DB20000I  The SQL command completed successfully.
db2 => insert into SMSFULL1 select * from SMSFULL1
DB20000I  The SQL command completed successfully.
db2 => insert into SMSFULL1 select * from SMSFULL1
DB20000I  The SQL command completed successfully.
--省略
db2 => insert into SMSFULL1 select * from SMSFULL1
DB21034E  The command was processed as an SQL statement because it was not a
valid Command Line Processor command.  During SQL processing it returned:
SQL0968C  The file system is full.  SQLSTATE=57011
--表空间很快满了
--文件系统情况,看到其中一个100%
[iyunv@localhost test1_big]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/tmp/test1_s.img      4.9M  4.7M     0 100% /mnt/test1_s
/tmp/test1_big.img    9.7M  5.7M  3.6M  62% /mnt/test1_big

--再看看两个目录下的文件情况
[iyunv@localhost test1_big]# du -sh *
4.6M    SQL00002.DAT
1.0K    SQLTAG.NAM
[iyunv@localhost test1_big]# cd -
/mnt/test1_s
[iyunv@localhost test1_s]# du -sh *
4.6M    SQL00002.DAT
8.0K    SQL00002.LB
8.0K    SQL00002.LBA
1.0K    SQLTAG.NAM
--可以看到SMS是平均的吧数据分配到每个容器当中


--附上diag log信息
2011-04-28-04.10.14.243363+480 E1389098G1271      LEVEL: Error (OS)
PID     : 7398                 TID  : 1983900560  PROC : db2sysc 0
INSTANCE: db2inst2             NODE : 000         DB   : SAMPLE
APPHDL  : 0-7620               APPID: *LOCAL.db2inst2.110427193357
AUTHID  : DB2INST2
EDUID   : 1453                 EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, oper system services, sqloseekwrite64, probe:40
MESSAGE : ZRC=0x850F000C=-2062614516=SQLO_DISK "Disk full."
DIA8312C Disk was full.
CALLED  : OS, -, pwrite                           OSERR: ENOSPC (28)
DATA #1 : File handle, PD_TYPE_SQO_FILE_HDL, 8 bytes
File Handle              = 26
File System Block Size   = 1024 bytes
File System Type         = ext3
File Handle Flags :
Require Sector Align   = No
DIO/CIO Mode           = Yes
Raw Block Device       = No
Reserved Handle        = No
Flush On Close         = No
Thread-Level Lock      = No
Write-through Mode     = Yes
File Not Tracked       = Yes
DATA #2 : unsigned integer, 4 bytes
131072
DATA #3 : signed integer, 8 bytes
4718592
DATA #4 : signed integer, 4 bytes
-1
DATA #5 : String, 105 bytes
Search for ossError*Analysis probe point after this log entry for further
self-diagnosis of this problem.
2011-04-28-04.10.14.371039+480 I1390370G2589      LEVEL: Error (OS)
PID     : 7398                 TID  : 1983900560  PROC : db2sysc 0
INSTANCE: db2inst2             NODE : 000         DB   : SAMPLE
APPHDL  : 0-7620               APPID: *LOCAL.db2inst2.110427193357
AUTHID  : DB2INST2
EDUID   : 1453                 EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 Common, OSSe, ossErrorIOAnalysis, probe:100
CALLED  : OS, -, pwrite                           OSERR: ENOSPC (28)
DATA #1 : String, 146 bytes
A total of 5 analysis will be performed :
- User info
- ulimit info
- Target file info
- I/O attempt
- File system
Target file handle = 26
DATA #2 : String, 184 bytes
Real user ID of current process       = 503
Effective user ID of current process  = 503
Real group ID of current process      = 500
Effective group ID of current process = 500
DATA #3 : String, 370 bytes
Current process limits (unit in bytes except for nofiles) :
mem     (S/H) = unlimited / unlimited
core    (S/H) = unlimited / unlimited
cpu     (S/H) = unlimited / unlimited
data    (S/H) = unlimited / unlimited
fsize   (S/H) = unlimited / unlimited
nofiles (S/H) = 65534 / 65534
stack   (S/H) = 10485760 / unlimited
rss     (S/H) = unlimited / unlimited
DATA #4 : String, 260 bytes
Target File Information :
Size               = 4718592
Link               = No
Reference path     = N/A
Type               = 0x8000
Permissions        = rw-------
UID                = 503
GID                = 500
Last modified time = 1303935014
DATA #5 : String, 33 bytes
I/O attempt not implemented yet.
DATA #6 : String, 372 bytes
File System Information of the target file :
Block size        = 1024 bytes
Total size        = 5073920 bytes
Free size         = 0 bytes
Total # of inodes = 1280
FS name           = /dev/loop0
Mount point       = /mnt/test1_s
FSID              = 1792
FS type name      = ext2
DIO/CIO mount opt = None
Device type       = N/A
FS type           = 0xe
CALLSTCK:
[0] 0xB322C481 /home/db2inst2/sqllib/lib32/libdb2osse.so.1 + 0xB8481
[1] 0xB322C3B5 ossLogSysRC + 0x97
[2] 0xB321E6D9 /home/db2inst2/sqllib/lib32/libdb2osse.so.1 + 0xAA6D9
[3] 0xB321D1D8 ossErrorAnalysis + 0x28
[4] 0xB5D48928 sqloSystemErrorHandler + 0x61C
[5] 0xB4AB5E29 sqloseekwrite64 + 0x46B
[6] 0xB4AB578C sqloWriteBlocks + 0xBC
[7] 0xB466AB72 _Z15sqlbWriteBlocksP16SqlbOpenFileInfoPvxjjPjP12SQLB_GLOBALS + 0x40
[8] 0xB51149C0 _Z18sqlbSMSDirectWriteP20SQLB_DIRECT_WRITE_CB + 0x284
[9] 0xB515DB15 _Z15sqlbDirectWriteP20SQLB_DIRECT_WRITE_CB + 0x109
2011-04-28-04.10.14.376525+480 E1392960G804       LEVEL: Error
PID     : 7398                 TID  : 1983900560  PROC : db2sysc 0
INSTANCE: db2inst2             NODE : 000         DB   : SAMPLE
APPHDL  : 0-7620               APPID: *LOCAL.db2inst2.110427193357
AUTHID  : DB2INST2
EDUID   : 1453                 EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, buffer pool services, sqlbSMSDirectWrite, probe:99
MESSAGE : ADM6017E  The table space "SMSFULLTEST" (ID "4") is full. Detected on
container "/mnt/test1_s" (ID "0").  The underlying file system is
full or the maximum allowed space usage for the file system has been
reached. It is also possible that there are user limits in place with
respect to maximum file size and these limits have been reached.
2011-04-28-04.10.14.377416+480 I1393765G505       LEVEL: Error
PID     : 7398                 TID  : 1983900560  PROC : db2sysc 0
INSTANCE: db2inst2             NODE : 000         DB   : SAMPLE
APPHDL  : 0-7620               APPID: *LOCAL.db2inst2.110427193357
AUTHID  : DB2INST2
EDUID   : 1453                 EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, buffer pool services, sqlbSMSDirectWrite, probe:825
MESSAGE : ZRC=0x850F000C=-2062614516=SQLO_DISK "Disk full."
DIA8312C Disk was full.

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-300576-1-1.html 上篇帖子: DB2 Load数据装入学习笔记 下篇帖子: db2日期和时间常用汇总
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表