Progress - RDBMS Tuning - Radius
Progress - RDBMS Tuning - Radius
Progress - RDBMS Tuning - Radius
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
OpenEdge 10 <strong>RDBMS</strong><br />
Performance <strong>Tuning</strong><br />
Simon Epps, <strong>Progress</strong> Software
<strong>Progress</strong> Software Corporation<br />
Application Infrastructure Software<br />
Used to develop, deploy, integrate and manage<br />
business applications<br />
Server-centric Client-server Web SOA<br />
5,000 Applications<br />
generating<br />
$5B Annual Revenue<br />
40%<br />
Direct<br />
60%<br />
Partner<br />
North America 46%<br />
Latin America 5%<br />
Asia/Pacific 6%<br />
EMEA 43%<br />
Software Business<br />
FY07 $494<br />
Offices 90 world wide<br />
Founded 1981<br />
<strong>Progress</strong> Community 140 Countries 24 Years of Experience<br />
Deployed at 120,000 sites in 70,000 organizations for over 5 million users<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 2
<strong>Progress</strong> OpenEdge – Unique Relationships<br />
Over 1,500 Application Partners Worldwide<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 3
Leading Application Infrastructure Products<br />
OpenEdge<br />
Apama<br />
Sonic<br />
Actional<br />
Shadow<br />
DataXtend<br />
EasyAsk<br />
DataDirect<br />
ObjectStore<br />
Business Application Platform<br />
Event Stream Processing Platform<br />
Enterprise Service Bus<br />
SOA & Web Services Management<br />
Mainframe Integration<br />
Data Integration<br />
Natural Language Search and Query<br />
Data Connectivity<br />
Object Data Management<br />
Application Platforms<br />
Services Infrastructure<br />
Data Infrastructure<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 4
Objective<br />
Review general<br />
Database tuning and<br />
emphasize OpenEdge<br />
10 performance features<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 5
<strong>Tuning</strong> Tips<br />
Establishing harmony<br />
– CPU<br />
– Memory<br />
– I/O bandwidth<br />
– Contention/Conflict resolution<br />
– Scientific method<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 6
Agenda<br />
Physical Setup<br />
Effect of Startup Parameters<br />
What To Do at Runtime<br />
Faster Maintenance<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 7
Physical Layout<br />
File Extent location<br />
– Separate disks for data, bi and ai files<br />
– Separate Index/tables<br />
– Group similar tables<br />
– Bi on disk with fastest I/O rate<br />
Use RAID striping or do it yourself<br />
Spread I/O amongst hardware spindles<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 8
i Blocksize<br />
proutil -C truncate bi –biblocksize <br />
Size of before image block (1, 2, 4, 8, 16 K)<br />
– Default size: 8 K<br />
Reduce overhead & improve I/O efficiency<br />
Dictates I/O and bi buffer page size<br />
Ai block size should match bi block size<br />
Decreases cluster closes<br />
Balance bi partial writes with bi full writes<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 9
i Cluster Size<br />
proutil -C truncate bi –bi <br />
# of Kbytes in cluster (for checkpointing)<br />
– Must be a multiple of 16<br />
– Default: 512 Max: 16383<br />
Fewer checkpoints improve performance<br />
Increase size when checkpoints < 2 minutes<br />
Drawbacks<br />
– Increased recovery time<br />
– Increased bi disk space<br />
– Longer checkpoint time<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 10
Database Blocksize<br />
prostrct create -blocksize <br />
Size of database block<br />
– Default size: Unix – 1K, Windows – 4K<br />
– Valid sizes: 1024, 2048, 4096, 8192<br />
– Should match file system page size<br />
Reduce overhead & improve I/O efficiency<br />
Dictates I/O and buffer pool page size<br />
Coordinate with RPB and -B<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 11
Type II Storage Areas<br />
Block clustering for data areas<br />
– Alleviates object fragmentation/scatter<br />
– Improves I/O efficiency<br />
Concurrent Hierarchical Space Allocation<br />
– Area space Allocation<br />
– Object space allocation<br />
Improved object manipulation<br />
– Table scan without index<br />
– Fast object deletion<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 12
Object Placement<br />
Same area<br />
– Space allocation awareness<br />
• Cluster size allocation<br />
• Records per block<br />
• Fragmentation and scatter<br />
– I/O considerations<br />
Separate areas<br />
– Static vs. dynamic data<br />
– I/O considerations<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 13
Agenda<br />
Physical Setup<br />
Effect of Startup Parameters<br />
What To Do at Runtime<br />
Faster Maintenance<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 14
Latching: -spin<br />
Number of busy latch retries before nap<br />
SMP machines: # of CPU * 5,000<br />
Lower if CPU usage increases > 90%<br />
Decrease latch timeouts<br />
More timeout means more napping<br />
– Nap default is 10ms & doubled up to ½ sec<br />
Can change –spin online via promon<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 15
Latching: -semsets<br />
Indicates arrays of semaphores<br />
Performance gain is OS dependant<br />
d<br />
Semaphores handed out round robin<br />
Specify when there are many connections (> 1000)<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 16
Buffers: –B<br />
Number of entries in database buffer pool<br />
Value in database block size units<br />
– Default size: single user – 102<br />
Reduces database I/O<br />
multi user - # clients * 8 + 2<br />
Increase when buffer hit ratio < 90%<br />
Too many buffers may cause O/S paging<br />
g<br />
Increase performance by decreasing database I/O<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 17
Buffers: -hash<br />
Size of buffer pool hash table<br />
Limits i # of lookups for buffer retrieval<br />
Typically prime > ¼ (-B) in geometric progression<br />
with ratio ~1.4<br />
Specify explicitly when –B > 400,000<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 18
Buffers: -bibufs<br />
Number of buffers in bi buffer pool<br />
Value in bi block size units<br />
– Defaults: single user – 3 multi user – 5 suggest 25<br />
Reduced bi buffer contention<br />
Increase if any empty buffer waits<br />
– No bi buffers available<br />
-aibufs should match –bibufs<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 19
Buffers: -Bp (Read Only Buffers)<br />
Specify private LRU chain<br />
Will not effect –B LRU chain on reads<br />
Set at runtime via _myConnection<br />
– _MyConn-NumSeqBuffers<br />
Use when performing table scans<br />
– Now works for Backup too!<br />
-Bpmax<br />
– broker over ride max of 64/user<br />
– will not override limit of 25% -B<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 20
Buffers: -omsize<br />
# of entries in object mapping cache<br />
Om cache maintains i LRU for replacement<br />
LRU avoided if –omsize appropriate<br />
Default: 1024<br />
select count(*) from _storageobject<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 21
Buffers: -omsize<br />
Omlru avoidance when –omsize proper (default: 1024)<br />
Find I1/T1<br />
Find I2/T2<br />
Find I3/T3<br />
Find I1/T1<br />
Find I2 …<br />
aging<br />
replacing<br />
Hash<br />
Table<br />
“newest”<br />
LRU Chain<br />
“oldest”<br />
T1 I1 T3 I3 T2 I2 T4 I4<br />
Area 6 Area 7 Area 8 Area 9<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 22
Buffers: -Bt<br />
Temp Tables use Type II Storage Areas<br />
– Fast empty/drop<br />
– Use “empty temp-table ”<br />
– Mitigate space overhead with –Bt<br />
– -tmpbsize 1 or -tmpbsize 8<br />
• Records per block<br />
• Create/toss limit<br />
• Possible wasted space<br />
• Additional block format overhead<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 23
Others:<br />
-Mm<br />
– increases network message buffer size<br />
– decreases # network message packets<br />
– MUST match between client and server<br />
– Default 1024<br />
-pinshm<br />
– Avoids paging g of shared memory<br />
– off by default<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 24
Agenda<br />
Physical Setup<br />
Effect of Startup Parameters<br />
What To Do at Runtime<br />
Faster Maintenance<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 25
Before Image Writer<br />
Writes filled bi buffers to disk<br />
Avoids writing i bi buffers by server<br />
One per database maximum<br />
Decreases empty buffer waits<br />
Every database should have one<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 26
Asynchronous Page Writers<br />
Writes dirty database pages to disk<br />
Avoids writes by servers<br />
Reduces checkpoint time<br />
May also flush bi and ai buffers<br />
Decreases LRU writes<br />
Increase until 0 blocks flushed at checkpoint and<br />
partial bi writes low<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 27
Watch Dog<br />
Monitors for dead processes<br />
Performs cleanup<br />
Lightens load of Database Broker<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 28
Look out for…<br />
Scatter factor<br />
– Describe what it is<br />
– 3.5 to 4 indicates dump and load time<br />
Fragmentation Factor > 2 indicates D&L<br />
Fixed Data Extents<br />
Use promon<br />
– I/O rates<br />
– Buffers flushed at checkpoint<br />
– Time between checkpoints<br />
– Buffer Hit ratio<br />
– Contention (buffers, locks, latches)<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 29
Agenda<br />
Physical Setup<br />
Effect of Startup Parameters<br />
What To Do at Runtime<br />
Faster Maintenance<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 30
Index Rebuild<br />
Index Rebuild by area, table or schema<br />
proutil -C idxbuild table <br />
• Typical Uses:<br />
• complete D&L process<br />
• Bring deactive indexes online<br />
• Fix corruption<br />
• Always sort when asked (if you have the temp<br />
space)<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 31
Idxbuild – Sort Groups<br />
# of sort groups<br />
-SG: 8 thru 64 – Default: 48<br />
A larger -SG performs less sort/merge(s)<br />
Databases with many indexes per area use larger<br />
SG values<br />
Other values<br />
– -TM 32 (merge buffers)<br />
– -TB 24 (temp block size)<br />
– -T specify a different disk<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 32
Index Compaction<br />
proutil -C idxcompact [ n ]<br />
When to run<br />
– Compact index when %utilization < 60%<br />
– suggest value of 80% to 90%<br />
– 100% may cause expensive index block splits<br />
Can be run online<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 33
Other Utilities<br />
proutil -C dump –index 0<br />
– Dump performance over data order<br />
– Or choose index based on read order<br />
– Load to truncated t area<br />
• (truncate rather than “emptied”)<br />
Run online backup with –Bp<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 34
Questions<br />
& Thank you for<br />
your time<br />
© Copyright <strong>Radius</strong> Solutions 2007 All Rights Reserved 35