1 tuning your application rob marshall principal solutions consultant, progress software session 131

30
1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

Upload: amy-leet

Post on 30-Mar-2015

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

1

Tuning Your Application

Rob Marshall

Principal Solutions Consultant, Progress Software

Session 131

Page 2: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Agenda

Overview of a OERA application AppServer Code Testing Using the VSTs Using Profiler Interpreting the Results

2

Page 3: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Application Overview

3

Page 4: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Application Overview

The OERA Basics Separate the UI from the Business Logic Separate the Data Access from the Business Logic

4

Page 5: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

AppServer

Application Overview

5

Data

Page 6: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

AppServer Code Testing

6

Why Test the code????

Page 7: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

AppServer Code Testing

Verify it is as efficient as it can be Run it locally to get profiler information Capture VST information Verify the output

7

Page 8: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

AppServer Code Testing

IF vAppServer THENDO: /* Connect to AppServer */ CREATE SERVER hAppSrv. vRet = hAppSrv:CONNECT ("-sessionModel Session-free - AppService " + cASName + " -H " + cASIP + " -S 5162","adm-gym",""). /* If error, run the routine locally and inform the developer */ IF NOT vRet THEN DO: MESSAGE "Failed to Connect to AppServer - Running Locally“ VIEW-AS ALERT-BOX. RUN common/commonprocs.p PERSISTENT SET CommonProcs. SESSION:ADD-SUPER-PROCEDURE(hCommonProcs). END.END.ELSE

8

Page 9: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

AppServer Code Testing

9

IF vAppServer AND VALID-HANDLE(hAppSrv) THENDO: /* We are running on the AppServer, and we are connected to it */ RUN "salesorder/SI/Get.p" ON SERVER hAppSrv (INPUT ?, /* Session ID */ INPUT ?, /* RowID */ INPUT 0, /* ProdID */ INPUT 0, /* Rev */ OUTPUT TABLE-HANDLE phttError, OUTPUT DATASET DSProposal).END. ELSEDO: /* We are running locally */

Page 10: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Using VSTs

10

Ask not what you can do for your VSTs, but what your VSTs can do for you…..

So What is a VST…..

Page 11: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Using VSTs

Background Check Index Range Size (-indexrangesize) Table Range Size (-tablerangesize)

11

Page 12: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Using VSTs

Major VST’s to review IndexStat – Shows index usage, look for unused

indexes or inefficient index usage in your tests TableStat – Shows table usage, look for excessive

reads or updates

Gotcha’s…. These VSTs are from the start of the DB server, not your

specific session

12

Page 13: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Using VSTs

13

Page 14: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Using VSTs

Your VSTs: _UserIndexStat – Shows index usage for this session _UserTableStat – Shows table usage for this session _UserIO – shows overall DB access for the session _MyConnection – Is the current connection you are using

14

Page 15: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Tools

15

VSTs are nice, BUT……..

What other tools are available?

Page 16: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Tools

The Profiler Utility OpenEdge Management Compile Listing Compile XREF Many third party tools (PEG, OEHive, PSDN, etc)

16

Page 17: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Using Profiler

• Profiler is a tool, not a automatic fix utility• It can help identify areas of performance concern• Profiler is officially unsupported but many folks in the

Global Progress community extend it and it is a very useful tool

17

Page 18: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Using Profiler

To get the best results, you need source code in your path

Profiler does not count time used to enter data, only execution time

18

Page 19: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Using Profiler

Look for sections of code with Long execution times Many iterations Called often

19

Page 20: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Using Profiler

20

To Use In-Line Arguments to turn on Profiler:

IF vProfiler THENDO: /* * Start Profiler using in-line directives */ PROFILER:ENABLED = TRUE. PROFILER:LISTINGS = TRUE. PROFILER:COVERAGE = TRUE. PROFILER:DESCRIPTION = cProfDesc. PROFILER:FILE-NAME = cProfName. PROFILER:DIRECTORY = cProfDir. PROFILER:PROFILING = TRUE.END.

Page 21: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Using Profiler

21

To Use In-Line Arguments to turn off Profiler:

IF vProfiler THENDO: /* * Turn off profiling using in-line directives */ PROFILER:PROFILING = FALSE. PROFILER:WRITE-DATA(). PROFILER:ENABLED = FALSE.END.

Page 22: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Using Profiler

22

Profiler as a client start-up:

In your normal client session startup add:-zprofile ProfileConfigFile

The Profile Config File contains:-OUTFILE Filename-LISTINGS [Directory] -DESCRIBE Description

Page 23: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Interpreting the Results

23

Now that we have captured some data, what next?

Page 24: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Interpreting the Results

24

You may need to edit your .out file…..

6 "DaypartLookup vehicle/bevehicle.p" "" 02 "Vehicle/SI/VehicleLookup.p “/tmp/list/dbg_VehicleLookup_6ca05444" 347824 "ClearMessages common/commonprocs.p" "" 03 "ServiceAdapter common/commonprocs.p" "" 05 "vehicle/bevehicle.p" “/tmp/list/dbg_bevehicle_6da05444" 28781

Page 25: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Interpreting the Results

25

Page 26: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Interpreting the Results

26

Page 27: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Interpreting the Results

27

Page 28: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

Interpreting the Results

28

Page 29: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

© 2009 Progress Software Corporation. All rights reserved.

In Summary

29

You can use simple tools (including OpenEdge Management)

The performance review process can be easily incorporated into any

development process

Ensuring performance during the development process saves effort later

Page 30: 1 Tuning Your Application Rob Marshall Principal Solutions Consultant, Progress Software Session 131

Tuning Your Application

30

Rob Marshall

Principal Solutions Consultant, Progress Software

Session 131