Top Banner
DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology
42

DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

Dec 14, 2015

Download

Documents

Joe Upchurch
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

DB-7: OpenEdge® Database Performance Tuning

Gus BjörklundWizard, Vice President Technology

Page 2: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation2DB-7: OpenEdge Database Performance Tuning

Topics

Easy Stuff: The Basics Disk Layout Esoterica

Page 3: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation3DB-7: OpenEdge Database Performance Tuning

First Things First

>> probkup foo>

Page 4: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation4DB-7: OpenEdge Database Performance Tuning

“Out of the Box” Performance

>> proserve foo>

Page 5: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation5DB-7: OpenEdge Database Performance Tuning

“Out of the box” Performance

30 00

100200300400500600700800

no tuning simple tuning

thro

ugh

put

(tps)

Page 6: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation6DB-7: OpenEdge Database Performance Tuning

“Nine Easy Pieces” for Better Results

Page 7: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation7DB-7: OpenEdge Database Performance Tuning

1: Buffer Pool Size

>> proserve foo -B 32000>

Page 8: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation8DB-7: OpenEdge Database Performance Tuning

2: Spinlock retry count

>> proserve foo -B 32000 -spin 50000>

Page 9: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation9DB-7: OpenEdge Database Performance Tuning

3: Start BI Log Writer (BIW)

>> proserve foo -B 32000 -spin 50000> probiw foo>

Page 10: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation10DB-7: OpenEdge Database Performance Tuning

4: Start Async Page Writer (APW)

>> proserve foo -B 32000 -spin 50000> probiw foo> proapw foo> proapw foo>

Page 11: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation11DB-7: OpenEdge Database Performance Tuning

5: Increase BI Log Block Size

>> proutil foo -C truncate bi \> -biblocksize 8> proserve foo -B 32000 -spin 50000> probiw foo> proapw foo> proapw foo>

Page 12: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation12DB-7: OpenEdge Database Performance Tuning

6: Increase BI Log Cluster Size

>> proutil foo -C truncate bi \> -biblocksize 8 -bi 4096> proserve foo -B 32000 -spin 50000> probiw foo> proapw foo> proapw foo>

Page 13: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation13DB-7: OpenEdge Database Performance Tuning

7: Add BI Log buffers

>> proutil foo -C truncate bi \> -biblocksize 8 -bi 4096> proserve foo -B 32000 -spin 50000 \> -bibufs 25> probiw foo> proapw foo> proapw foo>

Page 14: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation14DB-7: OpenEdge Database Performance Tuning

8: Initial Database Layout

d "Schema Area" /users/gus/atm.d1d "atm":7,64;512 /users/gus/atm_7.d1 f 2000000d "atm":7,64;512 /users/gus/atm_7.d2 f 2000000d "atm":7,64;512 /users/gus/atm_7.d3 f 2000000d "atm":7,64;512 /users/gus/atm_7.d4 f 2000000d "atm":7,64;512 /users/gus/atm_7.d5 f 2000000d "atm":7,64;512 /users/gus/atm_7.d6 f 2000000d "atm":7,64;512 /users/gus/atm_7.d7b /users/gus/atm.b1

Page 15: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation15DB-7: OpenEdge Database Performance Tuning

8: Move Data Extents to Striped Array

d "Schema Area" /users/gus/atm.d1d "atm":7,64;512 /array/atm_7.d1 f 2000000d "atm":7,64;512 /array/atm_7.d2 f 2000000d "atm":7,64;512 /array/atm_7.d3 f 2000000d "atm":7,64;512 /array/atm_7.d4 f 2000000d "atm":7,64;512 /array/atm_7.d5 f 2000000d "atm":7,64;512 /array/atm_7.d6 f 2000000d "atm":7,64;512 /array/atm_7.d7b /users/gus/atm.b1

Page 16: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation16DB-7: OpenEdge Database Performance Tuning

9: BI Log On Separate Disk

d "Schema Area" /users/gus/atm.d1d "atm":7,64;512 /array/atm_7.d1 f 2000000d "atm":7,64;512 /array/atm_7.d2 f 2000000d "atm":7,64;512 /array/atm_7.d3 f 2000000d "atm":7,64;512 /array/atm_7.d4 f 2000000d "atm":7,64;512 /array/atm_7.d5 f 2000000d "atm":7,64;512 /array/atm_7.d6 f 2000000d "atm":7,64;512 /array/atm_7.d7b /bidisk/atm.b1

Page 17: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation17DB-7: OpenEdge Database Performance Tuning

Can you predict the results ?

Page 18: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation18DB-7: OpenEdge Database Performance Tuning

Now Our Results Are

30

581

0100200300400500600700800

no tuning simple tuning

thro

ugh

put

(tps)

Page 19: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation19DB-7: OpenEdge Database Performance Tuning

Effect of Tuning -spin

133 120

436

680 679

0100200300400500600700800

spin setting

thro

ugh

put

(tps)

Page 20: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation20DB-7: OpenEdge Database Performance Tuning

Effect of Tuning -B

260295

348 332

050

100150200250300350400450500

32,000 64,000 128,000 256,000

-B setting

thro

ughp

ut (t

ps)

Page 21: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation21DB-7: OpenEdge Database Performance Tuning

Disk Layout

Page 22: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation22DB-7: OpenEdge Database Performance Tuning

About disks

Inexpensive !! One drive can do only one thing at a time

• Many smaller drives better than one large

15,000 rpm drives SCSI still better than SATA II Desktop drives rated 8 hours on, 16 off Avoid cheesy controllers Spares

Page 23: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation23DB-7: OpenEdge Database Performance Tuning

Multiple Disk Drives

Page 24: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation24DB-7: OpenEdge Database Performance Tuning

Stripe and Mirror

Page 25: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation25DB-7: OpenEdge Database Performance Tuning

Put BI Log on own disk

Page 26: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation26DB-7: OpenEdge Database Performance Tuning

Use Type II Data Areas

Page 27: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation27DB-7: OpenEdge Database Performance Tuning

Type I vs Type II Areas

100

140

020406080

100120140160180200

Type I DataArea

Type II DataArea

Relative Performance

thro

ugh

put

(perc

ent)

Page 28: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation28DB-7: OpenEdge Database Performance Tuning

Esoterica

Page 29: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation29DB-7: OpenEdge Database Performance Tuning

Networking

Raise message size (-Mm) to 16k Use Gigabit Ethernet Configure Ethernet for FDX Multiple brokers

• One for 4GL, one for SQL

• Others

Raise max servers (-Mn) and (-Mpb) Lower clients per server (-Ma)

Page 30: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation30DB-7: OpenEdge Database Performance Tuning

Temporary files (-T)

Local drives, not on network Spread users over multiple disks

Page 31: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation31DB-7: OpenEdge Database Performance Tuning

Use Shared Procedure Libraries

One copy of r-code for many users Use saved memory for other things

• like higher -B

All sharers have to be on same machine• Don’t need on client machines

Page 32: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation32DB-7: OpenEdge Database Performance Tuning

Creating Records

Template holds default column values Creating a record makes a copy of template

• CREATE cust

Fill in all column values immediately• Use one ASSIGN

• Avoids an update later

• Avoids fragmentation if default record is very small

Page 33: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation33DB-7: OpenEdge Database Performance Tuning

Linux File Systems

292313

267

348

0

50

100

150

200

250

300

350

400

ext3 JFS XFS ReiserFS

thro

ug

hp

ut

(tp

s)

ReiserFS results wildly erratic - don’t use !

Page 34: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation34DB-7: OpenEdge Database Performance Tuning

Other filesystems

Operating system File system

Solaris VxFS or UFS

AIX JFS or JFS2

HP-UX NOT HFS

Windoze NTFS

Linux ext3, XFS, JFS

Page 35: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation35DB-7: OpenEdge Database Performance Tuning

Windows Tips (part 1)

Remove crapware• use Ad-Aware or Spybot S&D

• use Firefox, NOT IE

Turn off• services you don’t need

– http://majorgeeks.com/page.php?id=12

• startup items you don’t need

Black screensaver only Get rid of Office (at least indexer)

Page 36: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation36DB-7: OpenEdge Database Performance Tuning

Windows Tips (part 2)

NTFS filesystem• Never FAT-32 or FAT-16

Increase NTFS cluster size• format <drive>:/fs:ntfs /A:8k

Turn off• short filenames

• file sharing

• virus scanner !

• all GUI decorations

“Maximize Throughput for Network Applications”

Page 37: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation37DB-7: OpenEdge Database Performance Tuning

SQL Tips

Add more indexes Run UPDATE STATISTICS Use ODBC and JDBC API’s well

• See DataDirect.com/developerfor technical papers

Upgrade to 10.1

Page 38: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation38DB-7: OpenEdge Database Performance Tuning

More Esoterica

Buy more memory - cheapest way to improve Use 64-bit OpenEdge Mount filesystems with noatime Lock shared memory (-pinshm) Use “deadline” i/o scheduler on Linux We like 3ware controllers for mid-size boxen Set shmmax to 134,217,728

Page 39: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation39DB-7: OpenEdge Database Performance Tuning

Summary

Getting good database performance is easy

Page 40: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation40DB-7: OpenEdge Database Performance Tuning

More info

My tuning guide on Conference CD PEG (www.peg.com) Dan Foreman’s guides (info at expo) Related sessions:

• COMP–12: Load/Performance Testing Tools and Techniques

• DB–2: Tuning OpenEdge SQL: Boosting Your SQL Application Performance

• DB–5: OpenEdge Database Performance Made Easy• DB–8: Highly Parallel Dump and Load• DB–9: Pick an Index, Any Index...

Page 41: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation41DB-7: OpenEdge Database Performance Tuning

WantAnswers

Page 42: DB-7: OpenEdge® Database Performance Tuning Gus Björklund Wizard, Vice President Technology.

© 2006 Progress Software Corporation42DB-7: OpenEdge Database Performance Tuning