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, we 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:
- 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.
- We cannot change the log file size; we must determine it before creating the queue manager.
- 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.
- 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.
- 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 we need to allocate. The primary log extents are used in sequence and that sequence does not change.
For example, if you 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 you have allocated are interspersed as required.
- 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.
The queue manager attempts to schedule checkpoints in a manner that keeps the log usage within the primary extents.
See LogDefaults stanza of the mqs.ini file for more information.
- How large should I make my active log?
Estimating the size of active log a queue manager needs.- What happens if I make my log too small?
Points we need to consider when estimating the minimum size of the log.- What happens if I make my log too large?
Points we need to consider when estimating the maximum size of the log.- How large should I make my log filesystem?
Estimating the size of log filesystem a queue manager needs.Parent topic: Logging: Making sure that messages are not lost