O'Reilly logo

Learning Cassandra for Administrators by Vijay Parthasarathy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Compression

Compression reduces the data and disk utilization of a Cassandra node, subsequently reducing the need for disk IO. When Cassandra needs to look for data, it looks up the in-memory chunk offset and unpacks the data chunk to get to the columns. Compression is a CPU-intensive process, hence you might want to keep an eye on CPU usage when compression is enabled. Both writes and reads are affected because of the chunks that have to be compressed and uncompressed. On the flip side, compression of data means less data to write and hence better performance.

CREATE TABLE Standard1 (
              id text,
              column_name text,
             PRIMARY KEY (id)
            )
            WITH compression = { 'sstable_compression' : 'DeflateCompressor', 'chunk_length_kb' = 64};

The bigger the compression ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required