Log Tuning

Log tuning is how you balance IBM MQ durability with the speed your business needs. Persistent messages commit to circular logs before applications receive success; that single design choice makes log disk quality, size, placement, and archive policy central to performance engineering. Beginners optimize queues and channels while logs saturate—a queue manager with perfect BATCHSZ still stumbles when NVMe is shared with a data warehouse extract. This tutorial covers distributed LOGFIL and LOGPATH, log file size, archive and media recovery interaction, synchronous versus relaxed logging policies where documented for your release, z/OS log data sets, monitoring, and mistakes that trade three percent faster puts for unacceptable DR gaps.

What the Log Does During a Put

When an application MQPUT a persistent message with default sync behavior, the queue manager formats a log record describing the put, writes it to the current log extent, and ensures the record reaches durable media before returning MQCC_OK. The message body also lands in the queue file or page set. Non-persistent traffic may skip full logging—faster but not recoverable the same way. Tuning starts by knowing your persistence percentage on hot queues; tuning logs for traffic that is already non-persistent wastes effort.

Distributed log attributes (common)
AttributeRoleTuning note
LOGPATHDirectory for primary and archive logs
LOGFILCount of primary log files
LOGFILESize of each primary log file
Archive pathWhere filled logs are archived
Log retention / recoveryHow long archives kept for restart

Disk Placement and Hardware

Place logs on dedicated LUNs or local NVMe with low write latency. Avoid sharing with database redo, backup streams, or queue data files on the same spinning disk. In cloud, choose provisioned IOPS volumes for log volumes separately from general-purpose queue storage. RAID levels and fiber channel paths matter on traditional estates. Measure write milliseconds during synthetic persistent put tests, not only sequential read benchmarks marketed for video editing.

LOGFIL and LOGFILE Tradeoffs

Larger total circular log space means less frequent switch to archive—fewer archive I/O spikes—but longer restart replay if the queue manager stops uncleanly. Smaller logs wrap faster, creating more archive files and operator noise. Increase LOGFIL when sustained persistent rate causes constant archiving that competes with active log writes. Decrease only with IBM guidance and maintenance window—never on a whim during production peaks. Document before and after message rates.

Archive Management

When primary logs fill, MQ archives them. If the archive directory is full, logging stops and the queue manager may fail. Automate monitoring on archive filesystem percent used. Prune archives only when recovery and DR policies allow—pruning too aggressively breaks point-in-time recovery and log shipping. Coordinate with backup queue manager teams on minimum retained sequence.

Sync Policy and Risk

Some installations explore relaxed logging options or application NO_SYNCPOINT patterns to reduce fsync frequency. Each choice shifts RPO and failure behavior. Performance gains belong only in flows where business and compliance accept possible loss. Document sign-off. Never enable aggressive options on payment queues because a blog post suggested it.

z/OS Log Tuning

z/OS uses log data sets and BSDS catalog entries. Systems programmers size logs with queue manager startup parameters and SMS storage classes. Buffer pools cache log pages as described in the buffer pools tutorial. Archive logs to tape or DASD per runbook. Coupling facility and QSG recovery have additional log coordination—follow IBM z/OS MQ operations manuals.

Monitoring Log Health

  • Archive directory free space alerts.
  • Log write latency from OS or storage tools.
  • Queue manager error log AMQ messages about log full or media errors.
  • Correlation of persistent put rate drops with storage incidents.

Tutorial: ALTER Log Path Planning

shell
1
2
3
4
5
6
7
8
9
10
* Review current log config (read-only investigation) DISPLAY QMSTATUS * Paths often in qm.ini: LogPath, LogPrimaryFiles, LogFileSize * Example planned change (requires QM stop — follow IBM procedure): * Move logs to /mqlogs/QM1 on dedicated NVMe * Increase LogPrimaryFiles from 3 to 5 after capacity review * Verify archive path /mqlogs/QM1/archive has 500GB free * After change: persistent put load test, compare msg/s and p99 latency

Explainer: Notebook Before Homework Hits the Folder

The log is the notebook where MQ writes what happened before filing homework in the queue drawer. If the notebook is slow to write, you wait longer at the desk even when the drawer is empty.

Explain Like I'm Five

Log tuning is picking a faster pencil and a bigger notebook so Mom can write down each marble she stores without getting tired. If the notebook fills, she stops until she copies old pages to the attic—so the attic needs space too.

Practice Exercises

Exercise 1

List three risks of putting logs and queue files on one overloaded SAN LUN.

Exercise 2

Explain tradeoff between larger LOGFILE and restart replay time.

Exercise 3

Design archive disk alerts at eighty and ninety-five percent full.

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. Persistent puts require:

  • Log writes
  • Only topic publish
  • No I/O
  • Browser cache

2. Logs on same slow disk as queues often cause:

  • I/O contention
  • Higher TLS
  • More topics
  • Fewer channels

3. LOGFIL controls:

  • Number of primary log files
  • Listener port
  • MAXDEPTH
  • SSL cipher

4. Full archive directory can:

  • Stop logging and QM
  • Speed up puts
  • Disable TLS
  • Grow MAXDEPTH
Published
Read time20 min
AuthorMainframeMaster
Verified: IBM MQ 9.3 documentation