mapleFU commented on code in PR #2171:
URL: https://github.com/apache/kvrocks/pull/2171#discussion_r1526258669


##########
kvrocks.conf:
##########
@@ -727,6 +727,27 @@ rocksdb.cache_index_and_filter_blocks yes
 # default snappy
 rocksdb.compression snappy
 
+# Specify the compression level to use. It trades compression speed 
+#   and ratio, might be useful when tuning for disk space.
+#   See details: https://github.com/facebook/rocksdb/wiki/Space-Tuning
+# For zstd: valid range is from 1 to 19, 
+#   where 1 is fastest compression and 19 is best compression.
+# For zlib: valid range is from 1 to 9, 
+#   where 1 is fastest compression and 9 is best compression.
+# For lz4: adjusting the level influences the 'acceleration'. 
+#   RocksDB sets a negative level to indicate acceleration directly, 
+#   with more negative values indicating higher speed and less compression.
+# Note: This setting is ignored for compression algorithms like Snappy that 
+#   do not support variable compression levels.
+# RocksDB Default: 
+#   - zstd: 3
+#   - zlib: Z_DEFAULT_COMPRESSION (currently -1)
+#   - kLZ4: -1 (i.e., `acceleration=1`; see `CompressionOptions::level` doc)
+# For all others, RocksDB does not specify a compression level. 
+# If the compression type doesn't support the setting, it will be a no-op.
+# Default: 6 (DB space tuning)
+rocksdb.compression_level 6

Review Comment:
   
https://github.com/facebook/rocksdb/blob/096fb9b67d19a9a180e7c906b4a0cdb2b2d0c1f6/include/rocksdb/compression_type.h#L43-L68
   
   Why setting it to 6 by default?Though the doc says 6 is space tuning ( 
https://github.com/facebook/rocksdb/wiki/Space-Tuning#compression-level ), I 
think we should keep it "default in rocksdb" by default



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to