Optimizing Batch Job Performance Resources Consumed by Program I/O by Database File Name Delays...

Preview:

Citation preview

Optimizing Batch Job Performance

Optimizing Batch Job Performance• Resources Consumed by Program• I/O by Database File Name• Delays Caused by Object Locks• Heaviest Active Job Function Names• Record Lock Contention• Time Spent on Job Status• CPU by Line of Source Code• Duration of ILE Modules• Elapse Time by ILE Procedure Name

System Navigator

Identify Job LevelBottleneck First!!

Workload Navigator

Is the job CPU, Memory or I/O bound?

Resources Consumed by Program

Resources Consumed by Program

• “Job” versus “Job Stream”• Application or Operating System• CPU, I/O, Memory, Elapse Time• Date Routines, Tax Calculation Routine• Imbedded SQL, High Initiation/Termination• Stand-alone or Hundreds of Calls• ILE w/ Many Modules versus OPM Program

Operating System Level

Operating System Level

Application Level

Application Level

I/O by Database File Name

I/O by Database File Name

• Compare Percent Reads to Writes/Updates• Number of I/Os versus Records in File• Small I/O Counts, Files Opening/Closing• High Sequential Reads, Low Random Reads• Time to Purge or Move Some Data?• “Open Orders” File w/ 7 Years of Closed• Proper Logical Views for Quick Access

Delays Caused by Object Locks

Delays Caused by Object Locks

• Work Files that Should be in QTEMP• Separate Data Libraries per Location?• Hundreds of Jobs Daytime, One Job at Night• Rare Situations Require Exclusive Locks!• CPYF CRTFILE(*YES) vs. CRTDUPOBJ• Fix the Job, Don’t Live w/ Consequences• Older Code more Prone to Locking Issues

Lock Wait Job Status

Locks by Object Name

Heaviest Active Job Function Names

Heaviest Active Job Function Names

• Job Going In and Out of Short DLYJOBs• Operating System Rebuilding Access Paths• Job Copying Data with Selection Criteria

Job Function Example

Record Lock Contention

Record Lock Contention

• Don’t Single Thread, Fear of Record Locks• Not a Bigger Issue at Night versus Daytime • Automatic Notification and Retry• Monitor Time Spent in Lock Wait Status• Release Records in Code if Causing Delays

Record Lock Example

Time Spent on Job Status

Time Spent on Job Status

• Never Ending Job, Always in RUN Status?• Nightly Job, not Always in RUN Status?• DLYJOB used as Bad Timing Technique • Object Locks for Long Periods of Time• Short Object Locks, Thousands of Times• Data Queue Wait that Never Waits!• Job Waits on Message for Hours Nightly

Job Status Example

CPU by Line of Source Code

CPU by Line of Source Code

• Is There One Bad Line of Code?• SETON LR at end of Date Routine• CHAIN to CustMast for Every Line Item• Open/Close 50 Files for Each Line Item• OPNQRYFs are 73% of CPU and Elapse• CALL to Tax Routine, 85% of Elapse• Format Date Routine, 93% of Duration

Source Code Example

Duration of ILE Modules

Duration of ILE Modules

• Complex ILE Bound Program• Identify Specific Module Causing Delays• Date Routines, Tax Calculation Routine• Older Routines, Called for Every Line Item• Outside Loop, Now that Impact is Known

ILE Modules Example

Elapse Time by ILE Procedure Name

Elapse Time by ILE Procedure Name

• Identify High Use Subroutines• Optimize Those Routines• Minimize Calls to Intensive Routines• Pinpoint Section of Code Needing Rework

ILE Procedure Name Example

Q&A

To receive MB Software’s FREE performance evaluation:

1. Register at http://www.mb-software.com 2. Download and install software on AS/400 or iSeries 3. Call (800) 713-5034 to schedule your free performance review session

What To Expect:

After allowing performance data to accumulate for one full business day, you will log into a secure area of MB Software’s web site. We will then have a conference call to discuss our findings and how you can gain performance improvements with your existing applications. It’s that easy!

Questions & Answers

Recommended