Easytrieve Performance Overview

Performance tuning for Easytrieve batch begins with a honest question: is the job waiting on disk, burning CPU in arithmetic loops, or spending hours in sort work datasets? A million-record payroll extract with tight BUFNO on twelve input files is I/O-bound until buffers increase—yet raising BUFNO on thirty files simultaneously can exhaust below-the-line storage on AMODE31 programs per Broadcom knowledge articles. A control-break report with complex BEFORE-LINE logic on every detail may be CPU-bound even when I/O is healthy. A presort SELECT on half the master file before SORT is sort-bound when work datasets spill to slower volumes. Easytrieve adds product-specific knobs—VFM for VIRTUAL files, WORKFSPA for report work files, PARM WORK for sort work dataset policy—on top of generic mainframe discipline of measuring before changing. This overview maps the performance chapter topics—file buffering, sort optimization, memory, large datasets, report tuning, CPU and I/O—into a beginner workflow: baseline measurement, bottleneck classification, targeted changes, regression compare, and production hardening without debug overhead.

Progress0 of 0 lessons

Measure Before Tuning

Capture elapsed time, EXCP counts, and CPU seconds from SMF type 30 or job accounting on representative production input volume—not ten-record test files. Re-run after each change on same input to compare. Document LPAR load; Tuesday night contention differs from Sunday test. Single change per experiment isolates cause—simultaneous BUFNO bump plus SORT WORK change plus logic rewrite confounds analysis.

Performance Topic Map

Chapter topics and primary levers
TopicPrimary leversTypical bottleneck
File bufferingBUFNO FILE/JCL/options, BLKSIZESequential read/write I/O
Sort optimizationSORT keys, WORK PARM, SORTWK JCLSort work space and passes
MemoryREGION, AMODE31, BUFNO total, VFMAbends or paging
Large datasetsStreaming design, presort, split jobsElapsed window exceed
Report tuningWORKFSPA, control breaks, LINE workReport work file I/O
CPUPer-record logic, lookups, DISPLAYCPU seconds high vs I/O
I/OBuffering, dataset placement, VSAM CIEXCP and wait high

I/O-Bound Patterns

Multiple sequential passes over same large file—JOB read, SORT, second JOB read—multiply EXCP. Mitigations: combine passes in one activity where logic allows, increase BUFNO on input after testing, match BLKSIZE to LRECL multiples, place datasets on appropriate storage class. VSAM sequential browse uses AMP and CI size—not BUFNO. See file buffering and I/O optimization pages.

Sort-Bound Patterns

Internal SORT on wide records with many keys consumes work space. Presort SELECT reducing record count before SORT helps. PARM WORK controls dynamic sort work datasets versus JCL SORTWK. Insufficient work space forces multi-pass sort—dramatic elapsed increase. SORTMSG diagnostics explain allocation failures.

VFM and VIRTUAL Files

Programs building many VIRTUAL intermediate files stress Virtual File Manager. VFMSPAC options table and PARM VFM FILE parameter influence allocation and contention when EZTVFM pack busy. Consolidate passes or use explicit work files in JCL when VFM thrashes.

text
1
2
3
4
5
FILE STAGE1 VIRTUAL SEQUENTIAL KEY-FIELD 1 10 A AMOUNT 11 5 P 2 * Many VIRTUAL files in one job—monitor VFM and elapsed

Report Work Files

Control reports with breaks and multiple LINE types write work files. WORKFSPA options and PARM WORKFILE override cylinder allocation per report work file—undersized causes extend or abend on large breaks. Report tuning page covers LINE and CONTROL interaction with work file growth.

CPU-Bound Patterns

Per-record DISPLAY, uncached table searches, redundant date calls, complex IF on every detail when subset would suffice—CPU adds up without extra I/O. Move invariant work to INIT procedure. Use indexed table lookup patterns for repeated reference data. Remove DEBUG FLOW from production load module.

Production Versus Test Performance

Test with production-scale row counts periodically—ten-row test hides quadratic algorithms. Production JCL should omit debug PARM and limit DISPLAY. Compare compile summary to ensure DEBUG options not accidentally embedded in load from dev compile proc.

Tuning Workflow

  1. Baseline SMF metrics on representative run.
  2. Classify I/O, sort, CPU, or memory primary constraint.
  3. Apply one lever from relevant chapter page.
  4. Re-measure; document delta and side effects.
  5. Regression test functional output—not just elapsed.
  6. Update runbook with approved parameter values.

Common Performance Mistakes

  • BUFNO 255 on all files without storage impact analysis.
  • Tuning before measuring—random changes.
  • Test file too small to reveal sort spill.
  • Ignoring VFM when many VIRTUAL files present.
  • Leaving DEBUG and SNAP in production proc.
  • Optimizing CPU while EXCP shows I/O bound.

Explain It Like I'm Five

Performance is making the homework finish faster. Sometimes you are slow because you walk to the file cabinet too often—that is I/O; bigger armfuls (buffers) help. Sometimes you sort too many papers—that is sort; sort less first. Sometimes you redo math on every line when once at start enough—that is CPU. Measure which part is slow before guessing the fix.

Exercises

  1. From a job log list three metrics you would capture before tuning.
  2. Classify sample scenario as I/O, sort, or CPU bound.
  3. Map your current program to performance chapter page most relevant.
  4. Identify debug options in compile PARM that hurt runtime.
  5. Describe one VFM risk when using multiple VIRTUAL files.

Quiz

Test Your Knowledge

1. Easytrieve batch jobs often bottleneck first on:

  • Physical I/O to sequential and VSAM datasets
  • Compiler listing page count
  • TITLE column alignment
  • Comment line count

2. BUFNO on FILE affects:

  • Sequential QSAM buffer count—not VSAM or VFM
  • All file types equally including VSAM
  • Compile time only
  • SCREEN map colors

3. VIRTUAL files use:

  • Virtual File Manager temporary space—VFMSPAC and PARM VFM matter
  • Only permanent catalog datasets
  • CICS TD queues
  • JCL only—never Easytrieve

4. Before tuning BUFNO on twenty files you should:

  • Measure baseline and watch below-the-line storage with AMODE31
  • Always set BUFNO 255 on every file
  • Disable SORT
  • Remove all REPORT statements

5. Performance tuning starts with:

  • Identifying whether job is I/O-bound, CPU-bound, or sort-bound
  • Renaming all fields
  • Adding DISPLAY on every record
  • Enabling DEBUG FLOW in production
Published
Read time16 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Broadcom Knowledge Article 28459 performance tips; Environmental Options BUFNO VFMSources: Broadcom Performance/tuning tips, Environmental Options, Why storage below 16MBApplies to: Easytrieve batch performance tuning overview