Database Reference
In-Depth Information
you can search the CommitLog and the data SSTables simultaneously, giving bet-
ter read and write performance. It may not be as easy to add a drive to a Cassandra
server running on iron. It would include downtime for the machine, which is not a
problem for Cassandra assuming that your downtime period is less than your set-
ting for max_window_in_ms .
In the cassandra.yaml file, there is a setting called commitlog_directory .
That setting is the one that determines where the CommitLog segments get written
to. Check to see which disk or partition your data_directory is set to in the
cassandra.yaml file and make sure the directory of the CommitLog is set to be on
a different disk or partition. By ensuring that the data_directory and com-
mitlog_directory are on different partitions, the CommitLog reads/writes
don't affect the overall performance of the rest of the reads on the node.
There are also a few other settings in the cassandra.yaml file that affect the
performance of the CommitLog. The commitlog_sync setting can be set to
either batch or sync . If the commitlog_sync is set to batch , Cassandra
will block until the write has been synced to disk. Having the commitlog_sync
set to batch is usually not needed, as under most circumstances writes aren't
acknowledged until another node has the data. On the other hand, periodic
is the default setting and typically is the best for performance as well. You will
also need to ensure that the commitlog_sync_period_in_ms is sensible
for your write workload. For durability, if you have a high-volume write system,
set this to something smaller than 10,000ms (or 10s) to ensure minimal data loss
between flushes.
Although the default setting of 32 for commit-
log_segment_size_in_mb is a sane default, depending on your backup
strategy, this may be something you want to change. If you are doing CommitLog
archiving as a form of backup, choosing a more granular setting of 8 or 16
might be better. This allows a finer point-in-time restore, depending on what your
volume is.
MemTables
There are a few basic tenets to keep in mind when adjusting MemTable thresholds:
Larger MemTables take memory away from caches. Since MemTables
store the actual column data, they will take up at least that amount of
space plus a little extra for index structure overhead. Therefore, your set-
Search WWH ::




Custom Search