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 configure log compression by using the following cluster-level parameters:
clog_transport_compress_all: specifies whether to enable log compression. The default value isFalse. For more information aboutclog_transport_compress_all, see clog_transport_compress_all.clog_transport_compress_func: specifies the compression algorithm. The default value islz4_1.0. Four compression algorithms are supported: lz4_1.0, snappy_1.0, zlib_1.0, and zstd_1.0. For more information aboutclog_transport_compress_func, see clog_transport_compress_func.
Compression of logs transferred between the primary cluster and standby clusters is controlled by the parameters 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 execute the following statements to configure log compression:
obclient> ALTER SYSTEM SET clog_transport_compress_all = 'true';
Query OK, 0 rows affected
obclient> ALTER SYSTEM SET clog_transport_compress_func = 'zlib_1.0';
Query OK, 0 rows affected