Configure Log Buffer and Log File Size Parameters
Performance impact: Large
LogBufMB and
LogFileSize could have a substantial positive performance
impact.
LogBufMB is related to the LogFileSize connection
attribute, which should be set to the same value or integral multiples of
LogBufMB for best performance.
Transaction log buffer waits occur when application processes cannot insert transaction data to the transaction log buffer and must stall to wait for transaction log buffer space to be freed. The usual reason for this is that the log flusher thread has not cleared out data fast enough. This may indicate that transaction log buffer space is insufficient, file system transfer rate is insufficient, writing to the file system is taking too long, or the log flusher is CPU-bound.
-
A small
LogBufMBcould slow down write transactions when these transactions have to wait for a log flush operation to make space for redo logging. An oversized log buffer has no impact other than consuming extra memory. The value ofLOG_BUFFER_WAITSshows the number of times a thread was delayed while trying to insert a transaction log record into the log buffer because the log buffer was full. Generally, if this value is increasing, it indicates that the log buffer is too small. -
The
LogFileSizeattribute specifies the maximum size of each transaction log file in megabytes. IfLogFileSizeis too small, then TimesTen has to create multiple log files within a transaction log flush operation. The overhead of file creation often leads toLOG_BUF_WAITSevents, which could significantly impact performance.
You can observe the value of the LOG_BUFFER_WAITS metric (using either the SYS.MONITOR table or the ttIsql monitor command) to see if it increases while running a workload. After which, you can increase the value of LogBufMB to improve the database performance.
The trade-off from increasing the value of LogBufMB is that more
transactions are buffered in memory and may be lost if the process crashes. If
DurableCommits are enabled, increasing the value of
LogBufMB value does not improve performance.
If log buffer waits still persist after increasing the LogBufMB and LogFileSize values, then review the other possible issues mentioned above.
The LogBufParallelism connection attribute specifies the number of transaction log buffer strands. This attribute improves transaction throughput when multiple connections run write transactions concurrently. Configure this to the lesser value of the number of CPU cores on the system and the number of concurrent connections running write transactions.
See LogBufMB, LogFileSize and LogBufParallelism in the Oracle TimesTen In-Memory Database Reference.