Tips for Determining Journal Rollover Frequency

From InterBase
Jump to: navigation, search

Go Up to Enabling Journaling and Creating Journal Files


Journal file rollover is a time-consuming operation. If rollover happens too frequently, performance will degrade. However, if you are using journal archiving, you want the journal file to rollover as often as possible so the completed journal file can be archived frequently, which minimizes the number of transactions that will be lost if disaster destroys the database server. Determining the most effective rollover frequency is a balancing act and the best answer will be different for each InterBase installation.

You can use the following equations to help you determine the most efficacious rollover frequency for your journal files. You can enter the resulting number in the LENGTH clause of the CREATE JOURNAL statement, which specifies when the end of a journal file is reached. When the end of the file is reached, journaling resumes on a new file. When a journal file is complete (i.e. its end has been reached), it can be saved to the archive directory.

To determine frequency in bytes, use the following equation:

(journal file length * journal page size) = # of bytes before rollover occurs

To determine a rollover interval, you can use either of the following equations:

(journal file length * journal page size) / (database page size * writes per minute) = # of minutes between rollovers

The equation above lets you see how often a rollover will occur for a given journal file length. The equation below calculates the journal length that will give the rollover interval you specify:

(rollover interval * database page size * writes per minute) / journal page size = journal file length