OceanBase AI Database supports synchronous logging. In this mode, a worker thread encapsulates the log content and writes the log file at the same time. This not only degrades application performance but also may cause log congestion when I/O exceptions occur, which results in SQL response time jitter or even exceptions of the OBServer process. To address this issue, OceanBase AI Database introduces the asynchronous logging mode. In this mode, a worker thread only encapsulates the log content, and the log file is written by a separate thread. This improves program performance and system stability. You can use the cluster-level configuration item enable_async_syslog to specify whether to enable asynchronous logging. By default, asynchronous logging is enabled.
Notice
We recommend that you enable asynchronous logging for stability. However, if asynchronous logging is enabled, a small amount of logs immediately before an unexpected exit of an OBServer node may be lost. Therefore, we recommend that you disable asynchronous logging in test environments.
If exceptions occur in the system, OceanBase AI Database records a large number of logs. To retain logs for a longer period for easy troubleshooting, OceanBase AI Database supports log throttling. You can control the log recording rate by specifying the cluster-level configuration item syslog_io_bandwidth_limit. The default value is 30 MB/s. When log throttling is enabled, logs are randomly discarded and the INFO-level log REACH SYSLOG RATE LIMIT is recorded. ERROR-level logs are not throttled.
Notice
Asynchronous logging also consumes CPU resources. In scenarios with extreme performance requirements, such as a promotion campaign, you can set the log level to ERROR to reduce the number of logs.