This topic describes how to configure log compression.
OceanBase Database allows you to compress REDO logs for transfer, to reduce the network bandwidth required for log transfer between the primary cluster and standby clusters.
You can control log compression by using the following configuration items:
clog_transport_compress_all: specifies whether to enable log compression. The default value isFalse. For more information about the configuration item, see clog_transport_compress_all.clog_transport_compress_func: specifies the compression algorithm. The default value islz4_1.0. Six compression algorithms are supported: lz4_1.0, snappy_1.0, zlib_1.0, zstd_1.0, stream_lz4_1.0, and stream_zstd_1.0. For more information about the configuration item, see clog_transport_compress_func.
Compression of logs transferred between the primary cluster and standby clusters is controlled by the configuration items of the primary cluster. Considering the switchover between the primary cluster and standby clusters, we recommend that you use the same compression configurations for the primary and standby clusters.
You can run the following command to configure log compression:
obclient> ALTER SYSTEM SET clog_transport_compress_all = 'true';