From 28389c230c822a0c1adbdfa2dd88ae7f51072903 Mon Sep 17 00:00:00 2001 From: Bryan Stillwell Date: Fri, 11 Sep 2020 16:51:19 -0600 Subject: [PATCH 1/2] compressor: Add a config option to specify Zstd compression level Add a new configuration item called 'compressor_zstd_level' so that the Zstandard compression level can be tuned to the workload on a cluster. Fixes: https://tracker.ceph.com/issues/47422 Signed-off-by: Bryan Stillwell --- src/common/legacy_config_opts.h | 1 + src/common/options.cc | 4 ++++ src/compressor/zstd/CompressionPluginZstd.h | 2 +- src/compressor/zstd/ZstdCompressor.h | 8 ++++---- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index cd7b78f1018a0..d206c7e4e352f 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -82,6 +82,7 @@ SAFE_OPTION(plugin_dir, OPT_STR) OPTION(compressor_zlib_isal, OPT_BOOL) OPTION(compressor_zlib_level, OPT_INT) //regular zlib compression level, not applicable to isa-l optimized version +OPTION(compressor_zstd_level, OPT_INT) //regular zstd compression level OPTION(qat_compressor_enabled, OPT_BOOL) diff --git a/src/common/options.cc b/src/common/options.cc index 2af36dd0e4ef3..46efcc6a2fbad 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -785,6 +785,10 @@ std::vector