Document Type | Technical Information
Field | Administration
Applicable Product Versions | Tibero6, Tibero7
Document Number | TADTI192
Overview
When settings such as SLOG_FILE_SIZE = 100M and SLOG_TOTAL_SIZE_LIMIT = 300M are configured, users generally expect the following log file configuration.
One SLOG file currently in use
Two backup log files of 100M each
In other words, a total of 3 log files are expected to exist.
However, in certain situations, only two files may be present when checking the log files as follows.
The currently used SLOG file (e.g., 15M)
A backup log file (e.g., 101M)
The capacity check of the log files operates lazily in the AGENT, and the log file size check is performed at 1-second intervals.
If error codes occur very frequently in the SLOG (e.g., dozens of errors per second), the capacity check may be performed when the log file size has slightly increased to about 101M instead of exactly 100M.
At the moment of opening a new file, the system adds the maximum capacity that will be used in advance to ensure that the SLOG_TOTAL_SIZE_LIMIT is not exceeded. During this process, the oldest backup log file is deleted first, so as a result, three log files may not be created.
Method
Assuming log rotation operates under the following situation.
log rotate (size limit 300)
| Backup_old 100M Backup 100M Currently writing 101M New file to open (max 100M) | Delete Backup_old Backup 100M Currently writing 101M New file to open (max 100M) | Delete Backup Currently writing 101M New file to open (max 100M) | Backup 101M New file to open (-> Currently remaining 15M file) |
| 401M ( > size limit ) | 301M ( > size limit ) | 201M | Current situation |
In other words, it is normal behavior to add the maximum capacity that will be used in advance at the time of opening a new file to maintain the size limit.
Therefore, even if there appears to be free capacity, the number of log files may appear fewer than expected due to the internal operation method.