[MDEV-23196] Compression opts not enabled on user defined settings Created: 2020-07-16 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - RocksDB |
| Affects Version/s: | 10.2.25, 10.5.4 |
| Fix Version/s: | 10.4, 10.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Jonas Krauss | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Environment: |
mariadb.org binary distribution |
||
| Attachments: |
|
| Description |
|
When setting compression_opts in rocksdb_default_cf_options, it is supposed to set the rocksdb internal setting Options.compression_opts.enabled to true. Checking the rocksdb LOG in MariaDB the value stays false, unless explicitly set to true. Not working sample conf: rocksdb_default_cf_options=...;compression_opts:-14:3:0;... Working sample conf: rocksdb_default_cf_options=...;compression_opts:-14:3:0:0:0:true;... This behavior seems not desired according to rocksdb's description of this parameter: Not sure if this is supposed to be different in MyRocks than in RocksDB but my best guess is that it is not. My fear is that set compression options are not actually used. |
| Comments |
| Comment by Jonas Krauss [ 2020-07-17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Debugging further, the parameter "enabled" might not play a role for the compression opts to be used. I have run a couple a imports with and without bulk load on a vanilla MariaDB instance (with wiping the database clean between imports). It turns out the size of the SST files is the same with "enabled" = false and "enabled" = true. E.g.
produces the same size of rocksdb files as
Changing the compression opts to a higher level, without enable set to true, does bring down the size:
I might just have misunderstood the meaning of this parameter. Would be glad if someone with deeper knowledge would shed some light onto this. By now I have probably read every page of the rocksdb and myrocks github wiki twice, but haven't found a clear explanation. Btw: setting the max_dict_bytes/zstd_max_train_bytes does not seem to have an effect. This might be due to the fact, that in this simple scenario I have tested, not enough levels exits to trigger bottommost_compression or the data I have used is not benefiting from the dictionary. I have also tested with a block size of 64kb, the dictionary effect is likely smaller at this size.
|