Note
- For V4.3.x, this parameter is available starting with V4.3.1.
- For V4.2.x, this parameter is available starting with V4.2.3.
Description
syslog_compress_func specifies the compression algorithm for system logs.
When compression is enabled, the following four log files with timestamp suffixes are compressed: observer.log, rootservice.log, election.log, and trace.log. The corresponding files with the .wf suffix are not compressed.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
Only the
systenant can modify this parameter. User tenants cannot modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | String |
| Default value | none, indicating that system log files are not compressed. |
| Value range | none, zstd_1.0, zstd_1.3.8 |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
After the log compression algorithm is set, log compression does not start immediately. It starts when the number of logs or the disk size reaches the limit. The oldest logs are compressed first, retaining more uncompressed logs for easier analysis.
After the value of
syslog_compress_funcis modified, new logs are compressed using the updated algorithm. Compressed logs do not need to be modified. When deleting logs, only the timestamps are compared, and the file suffixes are not considered.Relationship between the
syslog_compress_funcparameter and the syslog_file_uncompressed_count, syslog_disk_size, and max_syslog_file_count parameters:syslog_compress_func =none:- The value of
syslog_file_uncompressed_countis invalid. - Both
syslog_disk_sizeandmax_syslog_file_countcontrol the maximum number of log files, subject to both the quantity and size limits.
- The value of
syslog_compress_func !=none:- The value of
max_syslog_file_countis invalid. - Logs exceeding the value of
syslog_file_uncompressed_countare compressed. When the total size of logs approaches the value ofsyslog_disk_size, the oldest logs are deleted.
- The value of
Examples
Set the compression algorithm for system logs to zstd_1.3.8.
obclient> ALTER SYSTEM SET syslog_compress_func = 'zstd_1.3.8';
