HomeFreeBSD

zio_compress: introduce max size threshold

Description

zio_compress: introduce max size threshold

Now default compression is lz4, which can stop
compression process by itself on incompressible data.
If there are additional size checks -
we will only make our compressratio worse.

New usable compression thresholds are:

  • less than BPE_PAYLOAD_SIZE (embedded_data feature);
  • at least one saved sector.

Old 12.5% threshold is left to minimize affect
on existing user expectations of CPU utilization.

If data wasn't compressed - it will be saved as
ZIO_COMPRESS_OFF, so if we really need to recompress
data without ashift info and check anything -
we can just compress it with zero threshold.
So, we don't need a new feature flag here!

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes #9416

Details

Provenance
George Melikov <mail@gmelikov.ru>Authored on Sep 10 2019, 8:34 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Sep 20 2024, 12:23 AM
Parents
rG4bf6a2ab87c9: ZTS: use openssl for md5digest and sha256digest
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG522f2629c8ec: zio_compress: introduce max size threshold (authored by George Melikov <mail@gmelikov.ru>).Sep 20 2024, 12:23 AM