Strength. Strategy. Stability. The Application Profiler.

23
Strength. Strategy. Stability. The Application Profiler

Transcript of Strength. Strategy. Stability. The Application Profiler.

Page 1: Strength. Strategy. Stability. The Application Profiler.

Strength. Strategy. Stability.

The Application Profiler

Page 2: Strength. Strategy. Stability. The Application Profiler.

DEV-12 Transaction Scope & Record Locking

Introduction- Dan ForemanIntroduction- Dan Foreman

Progress User since 1984 (V2.1)Progress User since 1984 (V2.1)

Guest speaker at lots of conferences dating Guest speaker at lots of conferences dating back to 1990back to 1990

Page 3: Strength. Strategy. Stability. The Application Profiler.

PUG Challenge 2012

3

Introduction- Dan ForemanIntroduction- Dan ForemanAuthor of: Author of:

Progress Performance Tuning Guide

Progress Database Admin Guide

Progress System Tables Guide

ProMonitor - Database Monitoring Tool

Pro Dump&Load - Dump/Load with very short downtime no matter how large the DB is

Balanced Benchmark – Progress load testing & simulation tool

Page 4: Strength. Strategy. Stability. The Application Profiler.

DisclaimersDisclaimers

I use the term 4GL not ABLI use the term 4GL not ABL

The code examples in this presentation The code examples in this presentation are character style (i.e. non-OO) because are character style (i.e. non-OO) because it makes it easier to use a larger font and it makes it easier to use a larger font and fit the example on a slidefit the example on a slide

The Application Profiler (AP) is not The Application Profiler (AP) is not supported by PSCsupported by PSC

However I have never heard of anyone However I have never heard of anyone having issues with ithaving issues with it

PUG Challenge 2012

4

Page 5: Strength. Strategy. Stability. The Application Profiler.

HistoryHistory

Added by Tim Sargent in 1999Added by Tim Sargent in 1999

Initial Version - Progress V8.2AInitial Version - Progress V8.2A

Still works as of V11.0Still works as of V11.0

However the AP has not, to my However the AP has not, to my knowledge, been enhanced in any knowledge, been enhanced in any meaningful way since V9meaningful way since V9

Initially used a ‘zecret’ startup option Initially used a ‘zecret’ startup option (-zprofile) (-zprofile)

PUG Challenge 2012

5

Page 6: Strength. Strategy. Stability. The Application Profiler.

AP BasicsAP Basics

Old Location: Old Location: $DLC/src/samples/profiler$DLC/src/samples/profiler

Current Location: “Documentation CD”Current Location: “Documentation CD”

Excellent documentation (readme.doc) Excellent documentation (readme.doc) by the authorby the author

Requires a GUI (prowin32.exe) license Requires a GUI (prowin32.exe) license to use the supplied codeto use the supplied code

But the code being profiled doesn’t But the code being profiled doesn’t need to be GUI codeneed to be GUI code

PUG Challenge 2012

6

Page 7: Strength. Strategy. Stability. The Application Profiler.

AP ReplacementAP Replacement

An updated version of the AP called An updated version of the AP called “Profiler Control Tool” is available on “Profiler Control Tool” is available on Progress Communities:Progress Communities:http://communities.progress.com/pcom/docs/DOC-2808

PUG Challenge 2012

7

Page 8: Strength. Strategy. Stability. The Application Profiler.

What Is Application Profiling?What Is Application Profiling?

““A performance profiler is a common A performance profiler is a common and useful tool for a software developer. and useful tool for a software developer. In brief, a profiler provides a “profile” of In brief, a profiler provides a “profile” of a particular execution. A profiler a particular execution. A profiler generally provides timing information generally provides timing information and call-tree information; with that, an and call-tree information; with that, an engineer can analyze where their engineer can analyze where their program is spending most of its time program is spending most of its time and what part of the application is and what part of the application is calling what other part of the calling what other part of the application.”application.”

PUG Challenge 2012

8

Page 9: Strength. Strategy. Stability. The Application Profiler.

AP BasicsAP Basics

Two Main PartsTwo Main PartsGenerating the Profiling Statistics

Analyzing the Profiling Statistics

PUG Challenge 2012

9

Page 10: Strength. Strategy. Stability. The Application Profiler.

AP Getting StartedAP Getting Started

Client Startup Option: Client Startup Option: -profile <profiler-config-file-name>

Minimum entry in the Config file is:Minimum entry in the Config file is:-filename <name-of-output-file-for-stats>

There is also a PROFILER System There is also a PROFILER System Handle that can be used to specify the Handle that can be used to specify the equivalents of the command line equivalents of the command line optionsoptions

PUG Challenge 2012

10

Page 11: Strength. Strategy. Stability. The Application Profiler.

Other AP OptionsOther AP Options

-listings <directory>-listings <directory> will attempt to will attempt to create COMPILE DEBUG-LISTINGs for create COMPILE DEBUG-LISTINGs for the code being Profiled IF the source the code being Profiled IF the source code is available in PROPATHcode is available in PROPATH

This is a highly recommended optionThis is a highly recommended option

But if the PROPATH for the Client But if the PROPATH for the Client (probably using R-code) being (probably using R-code) being profiled is different than the PROPATH profiled is different than the PROPATH for the source…watch outfor the source…watch out

PUG Challenge 2012

11

Page 12: Strength. Strategy. Stability. The Application Profiler.

AP Raw DataAP Raw Data1 05/06/2012 "Generic" 13:47:22 "Dan"1 05/06/2012 "Generic" 13:47:22 "Dan"

..

10 "promon-b.p" "c:\pm\profiler\src\dbg_promon-b_09a01752" 1329210 "promon-b.p" "c:\pm\profiler\src\dbg_promon-b_09a01752" 13292

8 "promon-a.p" "c:\pm\profiler\src\dbg_promon-a_07a01752" 354348 "promon-a.p" "c:\pm\profiler\src\dbg_promon-a_07a01752" 35434

3 "promon2.p" "c:\pm\profiler\src\dbg_promon2_02a01752" 1783 "promon2.p" "c:\pm\profiler\src\dbg_promon2_02a01752" 178

5 "promon-k.p" "c:\pm\profiler\src\dbg_promon-k_04a01752" 352505 "promon-k.p" "c:\pm\profiler\src\dbg_promon-k_04a01752" 35250

12 "promon-n.p" "c:\pm\profiler\src\dbg_promon-n_0ba01752" 38412 "promon-n.p" "c:\pm\profiler\src\dbg_promon-n_0ba01752" 384

2 "val-key.p" "c:\pm\profiler\src\dbg_val-key_01a01752" 355372 "val-key.p" "c:\pm\profiler\src\dbg_val-key_01a01752" 35537

1 "promon1.p" "c:\pm\profiler\src\dbg_promon1_00a01752" 517241 "promon1.p" "c:\pm\profiler\src\dbg_promon1_00a01752" 51724

4 "promon-g.p" "c:\pm\profiler\src\dbg_promon-g_03a01752" 156804 "promon-g.p" "c:\pm\profiler\src\dbg_promon-g_03a01752" 15680

6 "promon-c1.p" "c:\pm\profiler\src\dbg_promon-c1_05a01752" 632196 "promon-c1.p" "c:\pm\profiler\src\dbg_promon-c1_05a01752" 63219

..

3 544 5 23 544 5 2

0 0 1 10 0 1 1

3 2491 11 13 2491 11 1

1 750 3 11 750 3 1……

PUG Challenge 2012

12

Page 13: Strength. Strategy. Stability. The Application Profiler.

SamplesSamples

Load the Profiling DataLoad the Profiling Data

PUG Challenge 2012

13

Page 14: Strength. Strategy. Stability. The Application Profiler.

SamplesSamplesSession DataSession Data

PUG Challenge 2012

14

Page 15: Strength. Strategy. Stability. The Application Profiler.

PUG Challenge 2012

15

Page 16: Strength. Strategy. Stability. The Application Profiler.

Other StuffOther Stuff

Statistics don’t include “User Think Statistics don’t include “User Think Time”Time”

PUG Challenge 2012

16

Page 17: Strength. Strategy. Stability. The Application Profiler.

Other Related Diagnostic ToolsOther Related Diagnostic Tools

_UserTableStat – Table I/O by Client_UserTableStat – Table I/O by Client

Find out what Database I/O is being Find out what Database I/O is being performed by the profiled codeperformed by the profiled code

Won’t identify TEMP-TABLE I/OWon’t identify TEMP-TABLE I/O

PUG Challenge 2012

17

Page 18: Strength. Strategy. Stability. The Application Profiler.

Other Related Diagnostic ToolsOther Related Diagnostic Tools

Client Log ManagerClient Log ManagerBasic Client Startup Options: Basic Client Startup Options:

-clientlog query.txt

-logentrytypes QryInfo

-logginglevel 3

Or use the LOG-MANAGER System Or use the LOG-MANAGER System HandleHandle

PUG Challenge 2012

18

Page 19: Strength. Strategy. Stability. The Application Profiler.

Client Log SampleClient Log SampleQRYINFO Query Plan: C:\protmp\tmp\p91026_Untitled1.ped line 1QRYINFO Query Plan: C:\protmp\tmp\p91026_Untitled1.ped line 1

QRYINFO QueryId: 0x2cdb8e0QRYINFO QueryId: 0x2cdb8e0

QRYINFO Type: FOR StatementQRYINFO Type: FOR Statement

QRYINFO Client Sort: NQRYINFO Client Sort: N

QRYINFO Scrolling: NQRYINFO Scrolling: N

QRYINFO Table: ../s2k.CustomerQRYINFO Table: ../s2k.Customer

QRYINFO QRYINFO Indexes: CustNumIndexes: CustNum

QRYINFO Query Statistics: C:\protmp\tmp\p91026_Untitled1.ped line 1QRYINFO Query Statistics: C:\protmp\tmp\p91026_Untitled1.ped line 1

QRYINFO QueryId: 0x2cdb8e0QRYINFO QueryId: 0x2cdb8e0

QRYINFO DB Blocks accessed:QRYINFO DB Blocks accessed:

QRYINFO ../s2k : 2310QRYINFO ../s2k : 2310

QRYINFO QRYINFO DB Reads:DB Reads:

QRYINFO QRYINFO Table: ../s2k.Customer : 1117Table: ../s2k.Customer : 1117

QRYINFO QRYINFO Index: Customer.CustNum : 1118Index: Customer.CustNum : 1118

QRYINFO ../s2k.Customer Table:QRYINFO ../s2k.Customer Table:

QRYINFO 4GL Records: 676QRYINFO 4GL Records: 676

QRYINFO QRYINFO Records from server: 676Records from server: 676

QRYINFO QRYINFO Useful: 676Useful: 676

QRYINFO Failed: 0QRYINFO Failed: 0

QRYINFO Select By Client: NQRYINFO Select By Client: N

PUG Challenge 2012

19

Page 20: Strength. Strategy. Stability. The Application Profiler.

Other Related Diagnostic ToolsOther Related Diagnostic Tools

-zqil-zqil

Zecret Query Info LogZecret Query Info Log

Client Startup OptionClient Startup Option

Output written to Database .lg fileOutput written to Database .lg file

PUG Challenge 2012

20

Page 21: Strength. Strategy. Stability. The Application Profiler.

Example #1Example #1

One Index w/3 fields (f1+f2+f3)One Index w/3 fields (f1+f2+f3)

for each tablefor each table

where where f1 = v1f1 = v1

andand f2 = v2f2 = v2

andand f3 = v3 f3 = v3 -zqil Output-zqil Output

==Compiled Query Resolution Method: ==Compiled Query Resolution Method: Query No. 1== (6135)Query No. 1== (6135)

21:21:24 INDEX 28 21:21:24 INDEX 28 33 3 EQUALITY (6157) 3 EQUALITY (6157)

PUG Challenge 2012

21

Page 22: Strength. Strategy. Stability. The Application Profiler.

Example #2Example #2

One Index w/3 fields (f1+f2+f3)One Index w/3 fields (f1+f2+f3)

for each tablefor each table

where where f1 = v1f1 = v1

andand f2 <> v2f2 <> v2

andand f3 = v3f3 = v3-zqil Output-zqil Output

==Compiled Query Resolution Method: ==Compiled Query Resolution Method: Query No. 1== (6135)Query No. 1== (6135)

21:21:24 INDEX 28 21:21:24 INDEX 28 11 1 EQUALITY (6157) 1 EQUALITY (6157)

PUG Challenge 2012

22

Page 23: Strength. Strategy. Stability. The Application Profiler.

PUG Challenge 2012

23

ConclusionConclusionQuestions?Questions?

Thank you for coming!Thank you for coming!

Dan ForemanDan [email protected]

Mobile: +1 541 908 3437

www.bravepoint.com