Choosing circular or linear logging on Multiplatforms
In IBM® MQ, you can choose circular or linear logging for your recovery logs. The following information gives you an overview of both types.
See Logging: Making sure that messages are
not lost for more information about recovery logging. IBM MQ uses checkpointing to limit the volume of log replay
required following a crash recovery. The key event that controls whether a log file is termed active
or not is a checkpoint. For more information about transactions and checkpointing,
see Using checkpointing to ensure complete
recovery.
Advantages of circular logging
- Easier to administer.
Once you have configured circular logging correctly for your workload, no further administration is needed. Whereas, for linear logging, media images need to be recorded and log extents that are not required any more need to be archived or deleted.
- Better performing
Circular logging performs better than linear logging, because circular logging is able to reuse log extents that have already been formatted. Whereas linear logging has to allocate new log extents and format them.
See Managing logs for further information.
Advantages of linear logging
The principal advantage of linear logging is that linear logging provides protection against more failures.
Neither circular nor linear logging protect against a corrupted or deleted log, or messages or queues that have been deleted by applications or the administrator.
Linear logging (but not circular) enables damaged objects to be recovered. So, linear logging provides protection against queue files being corrupted or deleted, as these damaged queues can be recovered from a linear log. You can configure automatic media imaging and automatic log management for linear logs to reduce the management overheads. See Automatic media imaging and Automatic log management.
Both circular and linear protect against power loss and communications failure as described in Recovering from power loss or communication failures.
Other considerations
Whether you choose linear or circular depends on how much redundancy you require.
There is a cost to choosing more redundancy, that is linear logging, caused by the performance cost and the administration cost.
See Types of logging for more information.