230 likes | 372 Views
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. Introduction- Dan Foreman. Author of: Progress Performance Tuning Guide
E N D
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
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
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
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)
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
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
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.”
AP Basics • Two Main Parts • Generating the Profiling Statistics • Analyzing the Profiling Statistics
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
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
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 …
Samples Load the Profiling Data
Samples Session Data
Other Stuff Statistics don’t include “User Think Time”
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
Other Related Diagnostic Tools • Client Log Manager • Basic Client Startup Options: • -clientlog query.txt • -logentrytypesQryInfo • -logginglevel 3 • Or use the LOG-MANAGER System Handle
Client Log Sample QRYINFO Query Plan: C:\protmp\tmp\p91026_Untitled1.ped line 1 QRYINFO QueryId: 0x2cdb8e0 QRYINFO Type: FOR Statement QRYINFO Client Sort: N QRYINFO Scrolling: N QRYINFO Table: ../s2k.Customer QRYINFO Indexes: CustNum QRYINFO Query Statistics: C:\protmp\tmp\p91026_Untitled1.ped line 1 QRYINFO QueryId: 0x2cdb8e0 QRYINFO DB Blocks accessed: QRYINFO ../s2k : 2310 QRYINFO DB Reads: QRYINFO Table: ../s2k.Customer : 1117 QRYINFO Index: Customer.CustNum : 1118 QRYINFO ../s2k.Customer Table: QRYINFO 4GL Records: 676 QRYINFO Records from server: 676 QRYINFO Useful: 676 QRYINFO Failed: 0 QRYINFO Select By Client: N
Other Related Diagnostic Tools -zqil Zecret Query Info Log Client Startup Option Output written to Database .lg file
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 33EQUALITY (6157)
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)
Conclusion • Questions? • Thank you for coming! • Dan Foreman • danf@prodb.com • Mobile: +1 541 908 3437 • www.bravepoint.com