The Progress Application Profiler

advertisement
Strength.
Strategy.
Stability.
The Application
Profiler
Introduction- Dan Foreman
Progress User since 1984 (V2.1)
Guest speaker at lots of conferences dating
back to 1990
DEV-12 Transaction Scope & Record Locking
Introduction- Dan Foreman
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
3
PUG Challenge 2012
Disclaimers
I use the term 4GL not ABL
The code examples in this presentation
are character style (i.e. non-OO) because
it makes it easier to use a larger font and
fit the example on a slide
The Application Profiler (AP) is not
supported by PSC
However I have never heard of anyone
having issues with it
4
PUG Challenge 2012
History
Added by Tim Sargent in 1999
Initial Version - Progress V8.2A
Still works as of V11.0
However the AP has not, to my
knowledge, been enhanced in any
meaningful way since V9
Initially used a ‘zecret’ startup option
(-zprofile)
5
PUG Challenge 2012
AP Basics
Old Location:
$DLC/src/samples/profiler
Current Location: “Documentation CD”
Excellent documentation (readme.doc)
by the author
Requires a GUI (prowin32.exe) license
to use the supplied code
But the code being profiled doesn’t
need to be GUI code
6
PUG Challenge 2012
AP Replacement
An updated version of the AP called
“Profiler Control Tool” is available on
Progress Communities:
http://communities.progress.com/pcom/docs/DOC-2808
7
PUG Challenge 2012
What Is Application Profiling?
“A performance profiler is a common
and useful tool for a software developer.
In brief, a profiler provides a “profile” of
a particular execution. A profiler
generally provides timing information
and call-tree information; with that, an
engineer can analyze where their
program is spending most of its time
and what part of the application is
calling what other part of the
application.”
PUG Challenge 2012
8
AP Basics
Two Main Parts
Generating the Profiling Statistics
Analyzing the Profiling Statistics
9
PUG Challenge 2012
AP Getting Started
Client Startup Option:
-profile <profiler-config-file-name>
Minimum entry in the Config file is:
-filename <name-of-output-file-for-stats>
There is also a PROFILER System
Handle that can be used to specify the
equivalents of the command line
options
10
PUG Challenge 2012
Other AP Options
-listings <directory> will attempt to
create COMPILE DEBUG-LISTINGs for
the code being Profiled IF the source
code is available in PROPATH
This is a highly recommended option
But if the PROPATH for the Client
(probably using R-code) being
profiled is different than the
PROPATH for the source…watch out
11
PUG Challenge 2012
AP Raw Data
1 05/06/2012 "Generic" 13:47:22 "Dan"
.
10 "promon-b.p" "c:\pm\profiler\src\dbg_promon-b_09a01752" 13292
8 "promon-a.p" "c:\pm\profiler\src\dbg_promon-a_07a01752" 35434
3 "promon2.p" "c:\pm\profiler\src\dbg_promon2_02a01752" 178
5 "promon-k.p" "c:\pm\profiler\src\dbg_promon-k_04a01752" 35250
12 "promon-n.p" "c:\pm\profiler\src\dbg_promon-n_0ba01752" 384
2 "val-key.p" "c:\pm\profiler\src\dbg_val-key_01a01752" 35537
1 "promon1.p" "c:\pm\profiler\src\dbg_promon1_00a01752" 51724
4 "promon-g.p" "c:\pm\profiler\src\dbg_promon-g_03a01752" 15680
6 "promon-c1.p" "c:\pm\profiler\src\dbg_promon-c1_05a01752" 63219
.
3 544 5 2
0 0 1 1
3 2491 11 1
1 750 3 1
…
12
PUG Challenge 2012
Samples
Load the Profiling Data
13
PUG Challenge 2012
Samples
Session Data
14
PUG Challenge 2012
15
PUG Challenge 2012
Other Stuff
Statistics don’t include “User Think
Time”
16
PUG Challenge 2012
Other Related Diagnostic Tools
_UserTableStat – Table I/O by Client
Find out what Database I/O is being
performed by the profiled code
Won’t identify TEMP-TABLE I/O
17
PUG Challenge 2012
Other Related Diagnostic Tools
Client Log Manager
Basic Client Startup Options:
-clientlog query.txt
-logentrytypes QryInfo
-logginglevel 3
Or use the LOG-MANAGER System
Handle
18
PUG Challenge 2012
Client Log Sample
QRYINFO
QRYINFO
QRYINFO
QRYINFO
QRYINFO
QRYINFO
QRYINFO
QRYINFO
QRYINFO
QRYINFO
QRYINFO
QRYINFO
QRYINFO
QRYINFO
QRYINFO
QRYINFO
QRYINFO
QRYINFO
QRYINFO
QRYINFO
Query Plan: C:\protmp\tmp\p91026_Untitled1.ped line 1
QueryId: 0x2cdb8e0
Type: FOR Statement
Client Sort: N
Scrolling: N
Table: ../s2k.Customer
Indexes: CustNum
Query Statistics: C:\protmp\tmp\p91026_Untitled1.ped line 1
QueryId: 0x2cdb8e0
DB Blocks accessed:
../s2k : 2310
DB Reads:
Table: ../s2k.Customer : 1117
Index: Customer.CustNum : 1118
../s2k.Customer Table:
4GL Records: 676
Records from server: 676
Useful: 676
Failed: 0
Select By Client: N
19
PUG Challenge 2012
Other Related Diagnostic Tools
-zqil
Zecret Query Info Log
Client Startup Option
Output written to Database .lg file
20
PUG Challenge 2012
Example #1
One Index w/3 fields (f1+f2+f3)
for each table
where f1 = v1
and
f2 = v2
and
f3 = v3
-zqil Output
==Compiled Query Resolution Method:
Query No. 1== (6135)
21:21:24 INDEX 28 3 3 EQUALITY (6157)
21
PUG Challenge 2012
Example #2
One Index w/3 fields (f1+f2+f3)
for each table
where f1 = v1
and
f2 <> v2
and
f3 = v3
-zqil Output
==Compiled Query Resolution Method:
Query No. 1== (6135)
21:21:24 INDEX 28 1 1 EQUALITY (6157)
22
PUG Challenge 2012
Conclusion
Questions?
Thank you for coming!
Dan Foreman
danf@prodb.com
Mobile: +1 541 908 3437
www.bravepoint.com
23
PUG Challenge 2012
Download