Load Testing

Load testing IBM MQ answers a direct question: when we send this many messages of this size with this persistence mix through these queues and channels, does the system meet our throughput and latency targets without errors or runaway depth? Guessing from datasheet figures fails because your applications, TLS, disk, and consumer speed define reality. Load testing applies repeatable synthetic or replayed traffic in a controlled environment, captures metrics, and produces evidence for capacity planning and go-live sign-off. Beginners sometimes run a short burst of non-persistent pings and declare victory while production will use persistent two-kilobyte JSON with slow COBOL consumers. This tutorial defines load test scope, environment parity, workload design, execution steps, metrics to capture, analysis, and common pitfalls—without replacing your site's formal performance methodology or licensed IBM tools documentation.

Goals of Load Testing

  • Validate peak message and byte rates with acceptable latency percentiles.
  • Confirm MAXDEPTH and disk sizing for planned backlog scenarios.
  • Verify channels, listeners, and TLS configuration under sustained load.
  • Establish baselines for regression after upgrades or tuning changes.
  • Provide data for capacity planning and hardware requests.

Environment Parity

The test queue manager should mirror production in ways that affect performance: MQ version, persistence percentage, average and maximum message size, channel count and BATCHSZ, TLS on or off, disk type for logs, network path length (LAN versus WAN simulator), and approximate consumer processing time. Parity does not require identical hardware scale—you may use smaller boxes but document the scaling model. Testing on laptops with SSD then deploying to undersized SAN invalidates results.

Workload parameters to document
ParameterExampleWhy it matters
Put rate5,000 msg/sCPU and log load
Get rate4,500 msg/sDepth growth if mismatched
Persistence100% persistentDisk and log bound
Payload size2 KB averageByte rate and MAXMSGL
Duration60 minutes sustainedThermal and cache effects
SyncpointEvery put commitTransactional overhead

Workload Design

Model producers and consumers separately. Producers loop MQPUT with realistic options (MQPMO_SYNCPOINT when production uses it). Consumers loop MQGET with same sync rules. Include think time in consumers if applications pause for database work—zero-delay gets overstate throughput. Warm up the system five to ten minutes before recording metrics to populate caches. Run steady-state plateau, then optional ramp to find knee in the curve.

Tools and Approaches

  1. Custom C, Java, or .NET programs using MQ client API—maximum control.
  2. JMS harness with connection pooling matching production client style.
  3. Replay captured messages from production samples (sanitized) for realistic payloads.
  4. Multiple driver machines to avoid client CPU becoming the bottleneck before MQ.

Metrics to Capture

On MQ: queue CURDEPTH over time, channel MSGS and BYTSC deltas, queue manager CPU, log disk write rate, AMQ errors. On applications: put/get latency percentiles, MQ reason codes, thread CPU. End-to-end timestamp in payload for business latency. Capture at consistent intervals—one second for short tests, fifteen to sixty seconds for hour-long runs.

Pass and Fail Criteria

Define before the test: maximum p99 latency, maximum error rate, maximum sustained depth, zero MQRC_Q_FULL during plateau. Subjective it feels fine fails audits. Write criteria in the test plan and attach graphs to the results document.

After Upgrades and Tuning

Re-run the same workload script after MQ fix packs, BATCHSZ changes, or log disk moves. Name result files with build ID and date. Regression when throughput drops twenty percent without explanation blocks release until root-caused.

Tutorial: Minimal Test Plan Outline

text
1
2
3
4
5
6
7
8
9
10
11
12
LOAD TEST PLAN — QM_PERF / PAYMENT.IN Objective: Sustain 4,000 persistent puts/s, 4,000 gets/s, 2 KB, 60 min Environment: MQ 9.3 Linux, NVMe logs, TLS channel TO.HUB Pass: p99 E2E latency < 200 ms, CURDEPTH < 10,000, zero Q_FULL Fail action: stop drivers, collect AMQ logs, DISPLAY CHSTATUS archive Steps: 1. Reset queues, START CHANNELS 2. Warm-up 10 min (not recorded) 3. Start consumers, then producers 4. Sample metrics every 30 s 5. Cool-down and export results

Explainer: Dress Rehearsal

Load testing is the dress rehearsal before opening night—you perform the whole play at show pace to see if anyone forgets a line, not just read the script at your desk.

Explain Like I'm Five

Load testing is inviting lots of friends to use the slide at once to see if the line moves fast enough before the real party day.

Practice Exercises

Exercise 1

Write pass/fail criteria for a hub with 2,000 persistent msg/s target.

Exercise 2

List five environment differences that would invalidate a load test.

Exercise 3

Design a 60-minute plateau test with warm-up and cool-down.

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. Load testing should run in:

  • Dedicated test environment
  • Production without notice
  • DLQ only
  • Topic only

2. Load test workloads must match:

  • Production persistence and message size
  • Random defaults
  • Only non-persistent
  • Smaller MAXMSGL only

3. End-to-end latency measures:

  • Producer to consumer completion
  • Only TLS handshake
  • Only DISPLAY QMSTATUS
  • JCL elapsed time

4. Load testing differs from stress testing because load test:

  • Validates planned levels
  • Only tests LDAP
  • Never uses channels
  • Skips metrics
Published
Read time20 min
AuthorMainframeMaster
Verified: IBM MQ 9.3 documentation