This topic lists the recommended configurations that have been verified to help users achieve optimal performance with OBKV databases in various business scenarios.
Recommended parameter configurations
kv_transport_compress_func
The tenant-level parameter kv_transport_compress_func specifies the algorithm used to compress remote procedure call (RPC) messages returned for query requests in OBKV. If the query results occupy excessive network bandwidth resources, which leads to a network bandwidth bottleneck, you can specify a compression algorithm to reduce the network bandwidth usage.
| Parameter | Description | Default value | Value range | Recommended value | Applicable scope | Applicable version |
|---|---|---|---|---|---|---|
| kv_transport_compress_func | The algorithm used to compress RPC messages returned for query requests in OBKV. | none, which specifies to disable compression. |
none, lz4_1.0, snappy_1.0, zlib_1.0, zstd_1.0, and zstd 1.3.8 | lz4_1.0 | Tenant | V4.2.1.2 and V4.2.2 |
Here is an example:
-- Specify to use lz4 to compress the query results in `tenant_name`, which must be replaced with the actual tenant name.
ALTER SYSTEM SET kv_transport_compress_func = 'lz4_1.0' tenant = tenant_name;
kv_transport_compress_threshold
The tenant-level parameter kv_transport_compress_threshold specifies the minimum result set size that triggers result set compression. You can specify this parameter to avoid the CPU overhead caused by compressing small-sized result sets. The value 0 specifies to compress all result sets.
| Parameter | Description | Default value | Value range | Recommended value | Applicable scope | Applicable version |
|---|---|---|---|---|---|---|
| kv_transport_compress_threshold | The minimum result set size that triggers result set compression. | 10KB | 0 to INT_MAX | Depending on the business model | Tenant | V4.2.1.2 and V4.2.2 |
Here is an example:
-- Specify to compress result sets with a size larger than 20 KB.
ALTER SYSTEM SET kv_transport_compress_threshold = '20KB' tenant = mysql;
Recommended system variable configurations
binlog_row_image
In OBKV, we recommend that you use the default value MINIMAL of the binlog_row_image variable to improve the OBKV performance. If downstream systems have subscription requirements, you can change the value of binlog_row_image to FULL.
The syntax is as follows:
SET GLOBAL binlog_row_image='MINIMAL';
SET GLOBAL binlog_row_image='FULL';
Notice
After you set binlog_row_image to MINIMAL, you need to perform a restart for the value to take effect.