Michael Kjellman created CASSANDRA-11051:
--------------------------------------------

             Summary: Make LZ4 Compression Level Configurable 
                 Key: CASSANDRA-11051
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11051
             Project: Cassandra
          Issue Type: Improvement
          Components: Compaction
            Reporter: Michael Kjellman
         Attachments: lz4_2.2.patch

We'd like to make the LZ4 Compressor implementation configurable on a per 
column family basis. Testing has shown a ~4% reduction in file size with the 
higher compression LZ4 implementation vs the standard compressor we currently 
use instantiated by the default constructor. The attached patch adds the 
following optional parameters 'lz4_compressor_type' and 
'lz4_high_compressor_level' to the LZ4Compressor. If none of the new optional 
parameters are specified, the Compressor will use the same defaults Cassandra 
has always had for LZ4.

New LZ4Compressor Optional Parameters:
  * lz4_compressor_type can currently be either 'high' (uses LZ4HCCompressor) 
or 'fast' (uses LZ4Compressor)
  * lz4_high_compressor_level can be set between 1 and 17. Not specifying a 
compressor level while specifying lz4_compressor_type as 'high' will use a 
default level of 9 (as picked by the LZ4 library as the "default").

Currently, we use the default LZ4 compressor constructor. This change would 
just expose the level (and implementation to use) to the user via the schema. 
There are many potential cases where users may find that the tradeoff in 
additional CPU and memory usage is worth the on-disk space savings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to