# Cassandra

This page describes the Optimization Pack for the component type Cassandra.

## Metrics

| Metric                     |              | Description                                    |
| -------------------------- | ------------ | ---------------------------------------------- |
| read\_rate                 | ops/s        | Read queries per second                        |
| read\_response\_time\_p99  | milliseconds | 99th percentile of read queries response time  |
| read\_response\_time\_avg  | milliseconds | Average response time of read queries          |
| write\_rate                | ops/s        | Write queries per second                       |
| write\_response\_time\_p99 | milliseconds | 99th percentile of write queries response time |
| read\_response\_time\_max  | milliseconds | Maximum response time of read queries          |
| total\_rate                | ops/s        | Total queries per second                       |
| write\_response\_time\_avg | milliseconds | Average response time of write queries         |
| write\_response\_time\_max | milliseconds | Maximum response time of write queries         |
| read\_response\_time\_p90  | milliseconds | 90th percentile of read queries response time  |
| write\_response\_time\_p90 | milliseconds | 90th percentile of write queries response time |

## Parameters

| Parameter                                       | Type        | Unit         | Default Value                  | Domain                                                                                      | Restart | Description                                                                                |
| ----------------------------------------------- | ----------- | ------------ | ------------------------------ | ------------------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------ |
| cassandra\_compactionStrategy                   | categorical |              | `SizeTieredCompactionStrategy` | `LeveledCompactionStrategy`, `SizeTieredCompactionStrategy`, `TimeWindowCompactionStrategy` | yes     | Compaction strategy in use                                                                 |
| cassandra\_concurrentReads                      | integer     |              | `32`                           | `2` → `128`                                                                                 | yes     | Concurrent Reads                                                                           |
| cassandra\_concurrentWrites                     | integer     |              | `32`                           | `2` → `128`                                                                                 | yes     | Concurrent Writes                                                                          |
| cassandra\_fileCacheSizeInMb                    | integer     | megabytes    | `512`                          | `128` → `4096`                                                                              | yes     | Total memory to use for SSTable-reading buffers                                            |
| cassandra\_memtableCleanupThreshold             | real        |              | `0.11`                         | `0.01` → `0.99`                                                                             | yes     | Ratio used for automatic memtable flush                                                    |
| cassandra\_concurrentCompactors                 | integer     |              | `2`                            | `1` → `32`                                                                                  | yes     | Sets the number of concurrent compaction processes allowed to run simultaneously on a node |
| cassandra\_commitlog\_compression               | categorical |              | `NoCompressor`                 | `NoCompressor`, `LZ4Compressor`, `SnappyCompressor`, `DeflateCompressor`                    |         | Sets the compression of commit log                                                         |
| cassandra\_commitlog\_segment\_size\_in\_mb     | integer     | megabytes    | `32`                           | `8` → `32`                                                                                  |         | Sets the segment size of commit log                                                        |
| cassandra\_compaction\_throughput\_mb\_per\_sec | integer     | megabytes/s  | `16`                           | `0` → `999`                                                                                 |         | Sets the number of throughput for compaction                                               |
| cassandra\_commitlog\_sync\_period\_in\_ms      | integer     | milliseconds | `10000`                        | `1` → `25000`                                                                               |         | Sets the sync period of commit log                                                         |
