Skip to main content

Journaling Best Practices

Journaling Best Practices

The following are some important points to consider when planning and configuring journaling:

  • Journal files are stored in both a primary journal directory and an alternate journal directory (for use if the primary directory becomes unwriteable for any reason).

    In the interests of both performance and recoverability, InterSystems recommends placing the primary and alternate journal directories on storage devices that are separated from the devices used by databases and the write image journal (WIJ), as well as separated from each other. For practical reasons, these different devices may be different logical unit numbers (LUNs) on the same storage area network (SAN), but the general rule is the more separation the better, with separate sets of physical drives highly recommended. The major benefits of this separation between database/WIJ storage and primary and alternate journal storage include the following:

    • Isolating journal directories from failures that may compromise the databases or WIJ ensures that journal files will be available for use in restoring the database after such a failure.

    • Separating primary and alternate journal directories ensures that when an outage occurs on the device on which the primary directory is located, journaling can continue.

    • Separating journal I/O paths is a key factor in achieving the I/O concurrency that most applications require.

    For simplicity and convenience, InterSystems IRIS installation creates the directory install-dir\Mgr\journal, configures it as both the primary and alternate journal directory, and creates in it the first journal file for the default journaled databases. InterSystems recommends, however, that you identify and prepare separate storage devices for the primary and alternate journal directories and reconfigure these settings (as described in Configuring Journal Settings) as soon as possible after installation.


    Journal files should always be backed up along with database files, as described in Backup and Restore. Consider replicating journal files offsite for disaster recovery purposes, enabling recovery from a failure involving multiple storage devices at the primary data center. InterSystems IRIS mirroring, disk-level replication, or other mechanisms can be used for this purpose.

  • Verify that journaling is enabled for all databases (other than those that contain only transient data).


    Be sure to read Consequences of Not Journaling Databases for important information about limits to the recovery of non-journaled databases.

  • Consider setting the journal Freeze on error option to Yes. If a failure causes the system to be unable to write to both the primary and the alternate journal devices, this setting causes the system to freeze, making it unavailable to users and ensuring that no data is lost. Alternatively, you can set Freeze on error option to No, which lets the system continue and leads to journaling being disabled, keeping the system available but compromising data integrity and recoverability. See Journal I/O Errors for more information about Freeze on error.

  • Do not purge a journal file unless it was closed prior to the last known good backup, as determined by the backup validation procedure. Set the number of days and the number of successful backups after which to keep journal files appropriately.

  • To ensure optimal performance during a journal restore, consider increasing the size of the shared memory heap (gmheap); see Restore Journal Files for more information.

  • Ensure that journal file compression is enabled to minimize the amount of space taken up by journal files. This option is controlled by the CompressFiles CPF setting, and is enabled by default for new InterSystems IRIS installations.

  • Consider also archiving journal files. When you specify an archive target for journaling, the journal file is copied to that location when the file reaches the maximum size and a new journal file is started. You can also configure journaling so that the original journal file is purged after it has been copied to the archive.

FeedbackOpens in a new tab