Whamcloud - gitweb
EX-8355 csdc: stop compressing incompressible file data
The reduced_ratio (original_size/compress_reduced_size) represents
the minimum fraction of pages that are compressed out of each chunk,
namely the compressed chunk needs to shrink by at least
1/reduced_ratio blocks for it to be "compressible".
Let size compression_ratio be defined as
original_size/after_compression_size, so
reduced_ratio = compression_ratio / (compression_ratio - 1)
and we set its default value to 16, equivalent to 1.07 of compression
ratio (i.e. needs to shrink at least one 4KB block out of each 64KB
chunk).
After every compress_check_bytes of data being compressed, file's
compressibility would be re-calculated based on average
compress_reduced and average compress_orig data size.
Stop compressing file data if it is deemed to be incompressible, and
after compress_skip_bytes data have been written uncompressed , retry
the file compressibility check.
compress_reduced_ratio, compress_check_bytes, compress_skip_bytes
are tunable parameters:
osc.*.compress_reduced_ratio
osc.*.compress_check_bytes
osc.*.compress_skip_bytes
their default values are 16, 1M and 32M respectively.
Test-Parameters: testlist=sanity-compr
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I4ce3d752c67f18ba7b100c72a2bb61a91258c6e8
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53306
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
17 files changed: