Looking for guidance for CompressionType for rocksdb storage engine in percona mysql
Have a look at the default value for rocksdb_default_cf_options
MyRocks server variables - Percona Server for MySQL
Compare that to this options string, which comes from another consultant on his view of best options for MyRocks:
rocksdb_default_cf_options=write_buffer_size=256m;target_file_size_base=32m;max_bytes_for_level_base=512m;level0_file_num_compaction_trigger=4;level0_slowdown_writes_trigger=10;level0_stop_writes_trigger=15;max_write_buffer_number=4;compression_per_level=kLZ4Compression;bottommost_compression=kZSTD;compression_opts=-14:3:0:32768:327680;block_based_table_factory={cache_index_and_filter_blocks=1;filter_policy=bloomfilter:10:false;whole_key_filtering=1};level_compaction_dynamic_level_bytes=true;optimize_filters_for_hits=true;compaction_pri=kMinOverlappingRatio;memtable_prefix_bloom_size_ratio=0.05;prefix_extractor=capped:36
Thanks, I will be grateful if you share the documentation link to the different types of compression in the RocksDB storage engine and a guide on how to change compression at the table level and globally.
@Mathava_Selvan, I did. See my link above. You can’t change MyRocks compression on a per-table basis. It can only be done on a per-column family basis as the docs I linked above explain.
Thanks , Really helps.
I am trying to find possible values for compression_per_level
, bottommost_compression
, and compaction_pri
for the rocksdb_default_cf_options
variable, but I am unable to find them. Could someone please help with this?
Note: The goal is to reduce the table size with the help of the RocksDB storage engine. Please advise if any relevant settings would have an impact.
This is what I found:
I would stick with ZSTD. It’s fast and has excellent compression and is the most modern of the compression options. This is what is used in the config I provided earlier.