Siyao Meng created HDDS-17145:
---------------------------------
Summary: Make RocksDB compression configurable for OM, SCM and
datanode DBs
Key: HDDS-17145
URL: https://issues.apache.org/jira/browse/HDDS-17145
Project: Apache Ozone
Issue Type: Improvement
Components: db
Reporter: Siyao Meng
h3. Problem
Ozone never sets RocksDB {{compression}}, so OM, SCM and datanode DBs use the
RocksDB default: Snappy through 10.x, LZ4 from 11.5. The only way to change it
is the {{<db>.ini}} override in {{DBConfigFromFile}}. That file replaces a
column family's options entirely, including Ozone's {{format_version=5}} pin,
the bloom filter and the block cache. An ini that does not repeat
{{format_version}} gets RocksDB's default instead: 6 on 10.10, which RocksDB
7.7.3 / Ozone 2.2.x cannot read. That silently breaks downgrade.
h3. Motivation
Upstream measured LZ4 against Snappy on production SST files
(facebook/rocksdb#14818). The compression ratio is comparable, and LZ4 is up to
~8% smaller on more compressible files. Compression CPU is a wash.
Decompression CPU is ~25-30% lower with LZ4, and LZ4 scales better with many
threads. Ozone OM is read-heavy, so this should be measurable.
h3. Proposal
* Add {{compression}} and optional {{bottommost_compression}} settings for OM,
SCM and datanode DBs, for example LZ4 with ZSTD at the bottommost level.
Allowed values: NONE, SNAPPY, LZ4, ZSTD, plus an optional level.
* Apply them in {{DBProfile}}, and in {{RDBSstFileWriter}} for ingested SSTs.
* Default to the current behaviour, or pin it explicitly, so a RocksDB upgrade
does not change it implicitly.
* Only newly written SSTs are affected. RocksDB picks the decompressor per
block, so mixed files are fine.
h3. Compatibility
The official rocksdbjni jars 7.7.3, 10.10.1.1 and 11.8.1 all bundle LZ4. 7.7.3
and 10.10.1.1 were verified to read LZ4 SSTs written by 11.8.1. Verify ZSTD the
same way before allowing it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]