Calculating the size of the log

Estimating the size of log a queue manager needs.

After deciding whether the queue manager uses circular or linear logging, you need to estimate the size of the Active log that the queue manager needs. The size of the active log is determined by the following log configuration parameters:

    LogFilePages
    The size of each primary and secondary log file in units of 4K pages

    LogPrimaryFiles
    The number of preallocated primary log files

    LogSecondaryFiles
    The number of secondary log files that can be created for use when the primary log files are becoming full

Notes:

  1. We can change the number of primary and secondary log files each time the queue manager starts, although you might not notice the effect of the change you make to the secondary logs immediately.
  2. We cannot change the log file size; you must determine it before creating the queue manager.
  3. The number of primary log files and the log file size determine the amount of log space that is preallocated when the queue manager is created.
  4. The total number of primary and secondary log files cannot exceed 511 on UNIX and Linux systems, or 255 on Windows, which in the presence of long-running transactions, limits the maximum amount of log space available to the queue manager for restart recovery. The amount of log space the queue manager might need for media recovery does not share this limit.
  5. When circular logging is being used, the queue manager reuses primary and secondary log space. The queue manager will, up to a limit, allocate a secondary log file when a log file becomes full, and the next primary log file in the sequence is not available.

    See How large should I make my active log? for information on the number of logs you need to allocate. The primary log extents are used in sequence and that sequence does not change.

    For example, if we have three primary logs 0, 1, and 2, the order of use is 0,1,2 followed by 1,2,0, 2,0,1, back to 0,1,2 and so on. Any secondary logs we have allocated are interspersed as required.

  6. Primary log files are made available for reuse during a checkpoint. The queue manager takes both the primary and secondary log space into consideration before taking a checkpoint because the amount of log space is running low.

    From IBM MQ Version 9.0.2 the queue manager attempts to schedule checkpoints in a manner that keeps the log usage within the primary extents.

See Log defaults for IBM MQ for more information.