Why does cassandra PoolingSegmentedFile recycle the RandomAccessReader? The
RandomAccessReader objects consums too much memory.

I have a cluster of 4 nodes. Every node's cassandra jvm has 8G heap. The
cassandra's memory is full after about one month, so I have to restart the
4 nodes every month.

I have 100G data on every node, with LevedCompactionStrategy and 10M
sstable size, so there are more than 10000 sstable files. By looking
through the heap dump file, I see there are more than 9000 SSTableReader
objects in memory, which references lots of  RandomAccessReader objects.
The memory is consumed by these RandomAccessReader objects.

I see the PoolingSegementedFile has a recycle method, which puts the
RandomAccessReader to a queue. Looks like the Queue always grow until the
sstable is compacted.  Is there any way to stop the RandomAccessReader
recycling? Or, set a limit to the recycled RandomAccessReader's number?

Reply via email to