Академический Документы
Профессиональный Документы
Культура Документы
IBM Informix
Informix Enablement Team
201426
Informix
(task)
Informix
Informix
CPU
CPU
IDS
IDS
I/O
I/O
I/O
IDS
online.log
CPU
Atop
Tasks: 209 total, 1 running, 207 sleeping, 0 stopped, 1 zombie
Cpu(s): 0.3%us, 0.3%sy, 0.0%ni, 50.0%id, 49.2%wa, 0.0%hi, 0.2%si, 0.0%st
Bsar 5 100
10:37:06 AM CPU
10:37:11 AM
all
10:37:16 AM
all
10:37:21 AM
all
10:37:26 AM
all
%user
0.70
0.50
0.50
0.50
%nice
0.00
0.00
0.00
0.00
%system %iowait
0.40
49.20
0.30
49.45
0.50
49.30
0.40
49.35
%steal
0.00
0.00
0.00
0.00
%idle
49.70
49.75
49.70
49.75
1CPU20
2CPU2%
12CPU
Atop
Cpu(s): 0.5%us, 0.2%sy, 0.0%ni, 49.9%id, 49.4%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 4044192k total, 4016092k used, 28100k free, 32344k buffers
Swap: 8193140k total, 138236k used, 8054904k free, 3544312k cached
Bonstat -g seg
id
key
addr
size
ovhd
class blkused blkfree
12943367 52564801 44000000 895340544 10925608 R 218587 2
12976136 52564802 795dd000 334397440 3920416 V 17035 64605
V
.
Total: -
1229737984 -
235622 64607
IDS
IDS4
IDS
BUFFERPOOL
SHMVIRTSIZE
SHMADD
5
I/O1
Aiostat 5 100
avg-cpu: %user %nice %system %iowait %steal %idle
14.29 0.00 0.29
6.38 0.00
79.04
Device:
tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda
25.24
386.78
293.22
131991652 100065298
sda1
0.00
0.01
0.00
1866
14
sda2
24.76
380.97
287.73
130010482 98190344
dbspace
dbs11
demodbs
llogdbs
rootdbs
chunk_name
/opt/dbschk/dbs11
/opt/dbschk/demodbchk
/opt/dbschk/llogch
/opt/dbschk/online_root
diskreads
475
2493
66
37513
diskwrites
23232301
9843421
11156850
10001
disk_rwes
23234759
91323498
11156916
47514
I/O2
Constat -D
address chunk/dbs
b2d481c0 1 1
b417dce8 2 2
b4179028 3 3
b4179218 4 4
Donstat -g iof
AIO global files:
gfd pathname
bytes read
3 dbs11
972800
4 demodbchk
5105 664
5 llogch
135168
6 online_root
76826624
(Read)Chunk
(Write)Chunk
I/O 3
I/OInformix?
I/O?
?
I/OI/O
dbspaceI/O
Attached Index Detached Index
Bonstat -g ntu
#netscb connects read write
6/ 12
6/ 10 135/ 10
0/ 0 10/ 10
C. onstat -g ntd
Client Type Calls Accepted Rejected
Read
Write
sqlexec
yes
5212
123
59347
66366
DBAIDSRejectedIDS
RejectedNETTYPEIDS
NETTYPE soctcp10, 350CPU
NETTYPE connection_typepoll_threadsc_per_tvp_class
poll_threadsNUMCPUVPSc_per_t350vp_classNET
online.log
Agrep Error online.log
10:05:43 SCHAPI: Error -23197 Database locale information mismatch.
Bgrep Thread online.log
13:41:16 Who: Session(654, prpsvr@hljpicc, 213218, 70000035702aff8)
Thread(805, sqlexec, 700000357393c98, 4)
File: rsdebug.c Line: 1067
13:41:16 Results: Possible inconsistencies in 'prpalldb:"piccprp".prprepay'
13:41:16 Action: Run 'oncheck -cD 6292799'
10
Informix
(task)
Informix
11
(task)
dbspace
root dbspace
dbspace
dbspace
temp dbspace
temp dbspace
temp dbspace
Update Statistics
12
dbspaces rootdbs
A Sysmaster SQL
select distinct t.dbsname database, d.name dbspace, t.tabname
from sysmaster:sysdbstab d, sysmaster:syschunks c, sysmaster:sysextents t
where t.chunk = c.chknum and c.dbsnum=d.dbsnum
and t.dbsname not like 'sys%' and t.dbsname != 'onpload'
and t.tabname not like 'sys%' and d.name ='rootdbs' ;
database
bank18030
htyuan
htyuan
dbspace
rootdbs
rootdbs
rootdbs
tabname
customer
t100_1
t101_20
rootdbs
dbspacerootdbs
13
dbspaces
ASysmaster SQL (dbaccess sysmaster)
select name dbspace, sum(chksize) allocated, sum(nfree) free,
round(((sum(chksize) - sum(nfree))/sum(chksize))*100,2) pcused
from sysmaster:sysdbspaces d, sysmaster:syschunks c
where d.dbsnum = c.dbsnum
group by name order by 4 desc,name;
dbspace allocated
demodbs 2000000
dbs11
2000000
dbs12
2000000
free
28800
860150
860150
pcused%
98.56
56.99
56.99
dbspace
dbspacedbspace
14
temp dbspace1
A. onstat -c |grep DBSPACETEMP
or env |grep DBSPACETEMP
DBSPACETEMP tmpdbs01,tmpdbs02,tmpdbs03,tmpdbs04
Bdbaccess sysmaster
select d.name,d.pagesize, t.fname,t.chksize,t.nfree
from syschunks t,sysdbspaces d
where t.dbsnum=d.dbsnum and d.is_temp=1 order by 1;
d.name, d.pagesize, t.fname,
t.chksize,t.nfree
tmpdbs01 2048 /opt/dbschk/tmpchk01 1000000 147
tmpdbs02 2048 /opt/dbschk/tmpchk02 1000000 39947
tmpdbs03 2048 /opt/dbschk/tmpchk03 1000000 439
tmpdbs04 2048 /opt/dbschk/tmpchk04 1000000 4947
onconfig DBSPACETEMP
temp dbspace
15
temp dbspace2
C. onstat -d |grep TB
address number flags fchunk nchunks pgsize flags owner name
7b430600 5
0x42001 5
1
2048 N TB informix tmpdbs01
7b430798 6
0x42001 6
1
2048 N TB informix tmpdbs02
7b430930 7
0x42001 7
1
2048 N TB informix tmpdbs03
7b430ac8 8
0x42001 8
1
2048 N TB informix tmpdbs04
D. onstat -d |grep tmp
address chunk/dbs
7b432ac0 5
5 0
7b432cb0 6
6 0
7b433028 7
7 0
7b433218 8
8 0
16
1
A. onstat -l
Physical Logging
Buffer bufused bufsize numpages numwrits pages/io
P-1 12
64
331813
6434
51.57
phybegin
physize phypos phyused %used
2:53
999500 30664
12
0.00
Logical Logging
Buffer bufused bufsize numrecs numpages numwrits recs/pages pages/io
L-2 0
64
1851858 209365
159898
8.8
55.3
17
OLTP
100MB20-50
rootdbs
LOGBUFFLOGBUFF128pages/io
LOGBUFFpages/ioLOGBUFF75%
logical log buffer75%logical log buffer
75% logical log buffer
2GB
checkpoint
rootdbs
PHYSBUFFPHYSBUFF128pages/io
PHYSBUFFpages/ioPHYSBUFF75%
physical log buffer75%physical log buffer
75% physical log buffer
18
Update Statistics
A. Get the actual row number per table
dbaccess -e dbname sqlfile.sql
Select count(*) from manufact; --1,000,000
Select count(*) from stock;
--100123
Select count(*) from customer; --10,000,028
nrows
9.0
100123.0
10000028.0
C. Contrast A, B results, determine which table does not promptly update statistics
HIGH
MEDIUMLOW
(task)
19
Informix
(task)
Informix
20
instance
(lock)
(Checkpoint)
Checkpoint duration
(Long Transaction)
21
Instance 1
onstat -p
dskreads pagreads bufreads %cached dskwrits pagwrits bufwrits %cached
6924024 6960444 57054963 87.87 276611 368870
2581449 89.32
isamtot
open
start
read
write
rewrite delete commit rollbk
28117252 826169 1545943 19339955 720261 240523 170898 336161 34
gp_read gp_write gp_rewrt gp_del gp_alloc gp_free gp_curs
0
0
0
0
0
0
0
ovlock ovuserthread ovbuff usercpu syscpu numckpts flushes
1
0
0
1481.63 89.86 54
29
bufwaits lokwaits lockreqs deadlks dltouts ckpwaits compress seqscans
207092
179
89705878 0
0
5
66122
60111
ixda-RA idx-RA da-RA
RA-pgsused lchwaits
500
97
5730949 5727768
186142
22
Instance 2
23
%cached : (page)OLTP
95%%cachedBUFFERPOOL
IDSBUFFER
bufwaits(buffer)
pagepagebuffer
pagebufferbufwaitspage
LRU_MIN0pagebufferflush
bufwaits
ovbuffIDS(buffer)IDS
ovbuffer100000
BUFFERPOOLIDSBUFFERovbuff
IDS
Instance 3
lokwaits / lockreqs
lokwaits
lockreqs
lokwaits / lockreqs
ovlockIDS15ovlock0IDS
15ovlockIDS15ovlock0
onconfigLOCKS
deadlks1deadlks1
24
(lock)
Partition Profiles
onstat -g ppf
partnum lkrqs lkwts dlks
0x100123 8698 0
0
0x100124 4660 322 31
0x100125 1366 0
0
0x100126 1015 0
0
0x100127 771 0
0
0x100128 506 0
0
touts isrd
0
3163
53
6553
0
652
0
65
251 110
0
72
iswrt
243
3797
210
306
0
357
isrwt isdel
242 62
148 964
148 62
0
111
0
139
0
0
(lock)?
lkrqs
lkwts
dlks
partnum
25
Checkpoint
A grep Checkpoint online.log
16:28:31
used 440
16:33:32
16:33:32
used 12
16:38:32
Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 69, Llog
Checkpoint Completed: duration was 60 seconds.
Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 1152, Llog
Checkpoint Completed: duration was 0 seconds.
Bonstat -g ckp
IDS11.x Non-Blocking Checkpoit
checkpoint duration
(IDS11.5)
AUTO_CKPTS
AUTO_LRU_TUNNING
LRU_MIN_DIRTY, LRU_MAX_DIRTY
1
Agrep Long Transaction online.log|wc -l
13
27
(long transaction)
LTXHWM : (transaction)
LTXHWMIDS
LTXEHWM : (transaction)
LTXEHWMIDS
DYNAMIC_LOGSIDS
DYNAMIC_LOGS2IDS
DYNAMIC_LOGS1IDS
DBADYNAMIC_LOGS0
IDS
28
Informix
(task)
Informix
29
I/O
extent
30
I/O
Adbaccess sysmaster
select dbsname, tabname,
(isreads + pagreads) diskreads, (iswrites + pagwrites) diskwrites,
(isreads + pagreads)+ (iswrites + pagwrites) disk_rsws
from sysmaster:sysptprof
where tabname not like 'sys% and dbsname not like 'sys%'
order by 5 desconstat -D
dbsname tabname
demodb customer
demodb orders
demodb stock
demodb test_cn
diskreads
53793
4397
42152
589
diskwrites
0
31112
201
11000
disk_rsws
53793
35509
42353
11589
I/O
dbspaceI/O
31
Adbaccess dbname
Select tabname,nrows,
(npused*pagesize)/1024/1024 used_space_m
from systables
where nrows> 1000000 order by 2 desc
tabname
orders
customer
cust_calls
test_cn
t_fragment_test
nrows
50000000
10000041
4318028.0
4194304.0
1788486.0
used_space_m
4069.015625
1395.099609375
2811.21875
32.638671875
1164.380859375
1500MB
32
extent
Adbaccess dbname
select dbsname, tabname, count(*) num_of_extents, sum( pe_size ) total_size
from sysmaster:systabnames, sysmaster:sysptnext
where partnum = pe_partnum and dbsname="demodb" and tabname not like 'sys%'
group by 1, 2 having count(*)>50 order by 3 desc
dbsname tabname num_of_extents total_size
demodb cust_calls2
156
220408
demodb cust_calls
140
1515552
demodb orders_sum
132
70008
extent50
extent size next size
extent
33
Adbaccess dbname
select t.tabname,i.idxname, i.levels from sysindexes i, systables t
where i.tabid = t.tabid and i.levels>=4 order by 3 desc;
tabname
orders_sum
orders
cust_calls
customer
cust_calls
cust_calls
idxname
117_29
112_16
111_19
110_13
111_20
111_15
levels
5
4
4
4
4
4
34
Adbaccess dbname
select p.dbsname , t.tabname , sum(p.seqscans) seqscans , max(t.nrows) nrows
from sysmaster:sysptprof p , systables t where p.tabname = t.tabname and t.nrows >
100 and p.seqscans>0 and p.dbsname not like "sys%" and p.tabname not like "sys%"
group by 1,2 order by 3 desc;
dbname
demodb
demodb
demodb
demodb
tabname
stock
test_cn
state
items
seqscans nrows
3102
10
132
9882121288
121
45276
11
1324552
(sequential scan)
stock
test_cn
35
IDS
36
Slide 36
Instance
(lock)
Checkpoint
Checkpoint duration
Long Transaction
I/O
extent
37
38
39