Setting the Checkpoint Rate
By default, there is no limit to the rate at which checkpoint data is written to the
file system. You can use the CkptRate connection attribute or the
ttCkptConfig built-in procedure to set the maximum rate at which
background checkpoint data is written to the file system.
Checkpoints taken during recovery and final checkpoints do not honor this rate. In those situations, the rate is unlimited.
Note:
See CkptRate and ttCkptConfig in the Oracle TimesTen In-Memory Database Reference.
Setting a rate too low can cause checkpoints to take an excessive amount of time and cause the following problems:
-
Delay the purging of unneeded transaction log files.
-
Delay the start of backup operations.
Setting a rate too high can cause checkpoints to consume too much of the file system buffer cache bandwidth that could result in the following:
-
Reduce overall database transaction throughput, as transaction logs are prevented from writing to the file system as quickly as they usually would.
-
Cause contention with other file system I/O operations.
When choosing a rate, you should take into consideration the amount of data written
by a typical checkpoint and the amount of time checkpoints usually take. Both of these
pieces of information are available through the SYS.V$CKPT_HISTORY
system views or the ttCkptHistory built-in procedure.
If a running checkpoint appears to be progressing too slowly, you evaluate the
progress of this checkpoint with the Percent_Complete column of the
SYS.V$CKPT_HISTORY system views. The rate can be increased by
calling the ttCkptConfig built-in procedure. If a call to
ttCkptConfig changes the rate, the new rate takes effect
immediately, affecting even the running checkpoint.
Calculate the checkpoint rate (by viewing the SYS.V$CKPT_HISTORY
system views or calling the ttCkptHistory built-in procedure):
-
For any given checkpoint, subtract the starttime from the endtime.
-
Divide the number of bytes written by this elapsed time in seconds to get the number of bytes per second.
-
Divide this number by 1024*1024 to get the number of megabytes per second.
When setting the checkpoint rate, you should consider the following:
-
The specified checkpoint rate is only approximate. The actual rate of the checkpoint may be below the specified rate, depending on the hardware, system load and other factors.
-
The above method may underestimate the actual checkpoint rate, because the starttime and endtime interval includes other checkpoint activities in addition to the writing of dirty blocks to the checkpoint file.
-
The
Percent_Completefield may show 100 percent before the checkpoint is actually complete. ThePercent_Completefield shows only the progress of the writing of dirty blocks and does not include additional bookkeeping at the end of the checkpoint. -
When adjusting the checkpoint rate, you may also need to adjust the checkpoint frequency, as a slower rate makes checkpoints take longer, which effectively increases the minimum time between checkpoint beginnings.