1 Performance Data: What is Important and How Do I Make Sense of It Adam Backman A Nice Guy, DBAppraise
2 Shameless Plug DBAppraise is an OpenEdge specific database monitoring service DBAppraise provides our clients with the ability to offload as much of the DBA function as they need Customized to your environment Backed by some of the top OpenEdge DBAs in the world
3 A little note All the information in the world is worth nothing if you cannot interpret it.
4 Agenda Why do you need a monitor? Monitoring Alternatives What Are VSTs? ProTop Basic Capabilities Advanced Features
5 Why monitor? Performance matters Your workload changes – Number of users – Number of Records Application changes Change in the weather
6 Monitoring You need to document where you are now Change one thing at a time so you know the affect of changes Document what constitutes “good” performance Keeping historical records allows for targeted future planning
7 Monitoring Tools/Services Free – Glance – top – promon – ProTop Not Free – OpenEdge Management (product) – DBAppraise (service)
8 What Are VSTs? V irtual S ystem T ables A 4GL View of Progress Data Structures (the same as those shown in PROMON.) No Performance Impact (mostly) Primarily Read-Only Knowing what to use can be a challenge
9 Some VST Quirks Updateable: – _startup._spin – Private buffers Table & Index Ranges: -tablebase, -tablerangesize -indexbase, -indexrangesize – Table & Index Window can be reset! Quirky Keys: – _myconnection… – _tablestat & _indexstat
10
11 ProTop Basic Capabilities Summary Data Blocked Clients & Open Transactions Table & Index Activity User Activity Storage Area Capacity Estimating Big B Latches & Resources Clients & Servers
12 Summary Data 11:32:52 ProTop xvi -- Progress Database Monitor 07/05/05 Sample sports [/db/sports] Rate Hit Ratio: 182:1 195:1 Commits: Sessions: 2057 Miss% : 0.549% 0.512% Latch Waits: Local: 953 Hit% : 99.45% 99.48% Tot/Mod Bufs: Remote: 956 Log Reads: Evict Bufs: 2 1 Batch: 1045 OS Reads: Lock Table: Server: 97 Rec Reads: LkHWM|OldTrx: :00 Other: 51 Log/Rec: Old/Curr BI: TRX: 26 Area Full: % After Image: Disabled Blocked: 0
13 Blocked Sessions Usr Name Note tom REC XQH 102 [Order] julia
14 Record Locks Nice to know Generally, expensive _Lock is not indexed
15 Locked Records for each _Lock no-lock while _Lock-usr <> ?: if _Lock-recid = _Connect-wait1 then do: find _file where _file._file-num = _Lock-table no-error. bxtbl = _file._file-name. end. if _Lock-usr = _Connect-usr then bxwait = bxwait + “ “ + _Lock-flags. else bxque = bxque + " " + _Lock-name. end. bxnote = bxtbl + bxwait + bxque.
16 Open Transactions Usr Name TRX Num BI Clstr Start Trx Stat Duration Wait root :39:05 ACTIVE 00:00: root ALLOCATE 00:00: root :39:06 ACTIVE 00:00: root :39:06 ACTIVE 00:00: julia ALLOCATE 00:00: tom ALLOCATE 00:00:
17 Table Activity Table Statistics Tbl# Table Name Create Read Update Delete OrderLine Order POLine PurchaseOrder Bin Customer Invoice Employee Family
18 Table Stats /** This does NOT work if –tablebase <> 1!!! find _File no-lock where _File._File-num = p_tbl no-error. find _TableStat no-lock where _TableStat-id = p_tbl no-error. display p_tbl _file-num _TableStat-id. **/ /*** use the following: ***/ find _TableStat no-lock where _TableStat-id = p_tbl no-error. find _File no-lock where _File._File-num = _TableStat-id no-error. display p_tbl _file-num _TableStat-id.
19 Index Activity Index Statistics Idx# Index Name Create Read Split Delete BlkDel orderline PU CustNum PU _File/Field PU _Field-Name U _File/Index PU
20 User IO Activity UIO Usr Name Flags PID DB Access OS Rd OS Wr Hit% tom SB % 10 jami SB % 16 julia SB % 17 peter SB % 15 emily SB % 11 tiger SB* % 14 tucker SB % 19 granite SB % 7 astro SB %
21 Estimating Big B Big B GuessTimator Pct Big B % db Size Hit:1 Miss% Hit% OS Rd % % % % % % % % % % % % % % % % 425 <= 150% % % % % % % % % % % % 213
22 Big B MissPct = 100 * ( 1 – ( LogRd – OSRd ) / LogRd )). HitPct = 100 – MissPct. OSRd = LogRd * ( MissPct / 100 ). m2 = m1 * exp(( b1 / b2 ), 0.5 ).
23 Latch Waits Id Latch Requests Waits Lock% MTL_BF % 17 MTL_BHT % 21 MTL_LRU % 10 MTL_LHT % 15 MTL_LKF % 26 MTL_BF % 27 MTL_BF % 25 MTL_BF % 4 MTL_OM %
24 Resource Waits Id Resource Locks Waits Lock% DB Buf S Lock % 6 Record Get % 7 DB Buf Read % 2 Record Lock % 11 DB Buf X Lock % 19 TXE Share Lock % 8 DB Buf Write % 21 TXE Commit Lock % 1 Shared Memory % 3 Schema Lock %
25 Servers and Clients Servers Srv Type Port Con Max MRecv MSent RRecv RSent QSent TimeSlice Login Auto Auto Server IO Srv Type Port Con Max DB Access OS Rd OS Wr Hit% Auto % 20 Auto % 18 Auto % 16 Auto %
26 Storage Area Capacity Area Statistics Area Area Name Blocks Hi Water Free %Used RPB Note Control Area % 64 3 Primary Recovery % 1 6 Schema Area % 64 i(25) ** 7 Cust_Dat % 64 t(48) 8 Cust_Idx % 64 i(157) 9 Sales_Dat % 64 t(41) 10 Sales_Idx % 64 i(125)
27 Storage Area Capacity for each _AreaStatus no-lock, _Area no-lock where _Area._Area-num = _AreaStatus._AreaStatus-Areanum: bfree = _AreaStatus-Totblocks - _AreaStatus-Hiwater. if ( _AreaStatus-Freenum <> ? ) then bfree = bfree + _AreaStatus-Freenum. if bfree = ? then bfree = _AreaStatus-totblocks. used = (( _AreaStatus-totblocks - bfree) / _AreaStatus-totblocks ) * 100. end.
28 Storage Area Contents for each _storageobject no-lock where _storageobject._area-number = xid and _storageobject._object-num > 0 and _storageobject._object-associate > 0: if _storageobject._object-type = 1 then so_tbl = so_tbl + 1. else if _storageobject._object-type = 2 then so_idx = so_idx + 1. end.
29 Balancing IO Database File IO Id Extent Name Mode Blksz Reads Writes Extends sports2000_11.d1 BUFIO sports2000_8.d1 BUFIO sports2000_11.d2 BOTHIO sports2000.db BOTHIO sports2000.d1 BOTHIO sports2000_7.d1 BUFIO sports2000_9.d1 BUFIO sports2000_10.d1 BUFIO sports2000.b1 UNBUFIO sports2000_9.d2 BOTHIO
30 ProTop Architecture VST Based Multi-Platform – UNIX Character – HTML – Windows GUI Using Publish & Subscribe
31 DBAppraise It is a service not a product Have us cover as much of the DBA function as you want 24x7 access to OpenEdge expertise Please visit DBAppraise.com for more information and a demo
32 Q uestions