Database Reference
In-Depth Information
High memory usage
Before we dive into memory usage, it is nice to point out that providing a lot of RAM to
the Java heap may not always help. We have learned in a previous chapter that Cassandra
automatically sets the heap memory, which is good in most cases. If you are planning to
override it, note that garbage collection does not do well beyond a 16 GB heap.
There are a couple of things you should check when debugging for high memory usage.
The bloom filter's false positive ratio can lead to large memory usage. For smaller error
rates in the bloom filter, we need a larger memory. If you find the bloom filter to be the cul-
prit and decide to increase the false positive ratio, remember that the recommended maxim-
um value for the false positive value is 0.1. Performance starts to degrade after this. This
may not be applicable to Cassandra 1.2 and onward where the bloom filter is managed off-
heap.
Continuing the subject of off-heap, another thing that one might want to look into is row
caches. Row caches are stored off-heap, if you have the JNA installed. If there is no JNA,
the row cache falls back onto the on-heap memory—adding to the used heap memory. It
may lead to frequent GC calls.
High memory usage can be a result of pulling lots of rows in one go. Look into such quer-
ies. Cassandra 1.2 onward has a trace feature that can help you find such queries.
Search WWH ::




Custom Search