I have a cassandra 5 node cluster with 256GB memory. I am facing some performance issue on read operation so I decided to increase my heap size as it was using the defualt. I updated cassandra-env file with MAX_HEAP_SIZE="128G" & HEAP_NEWSIZE="32G".
I found a bit better performace for read query but I saw some messages like "Some operations were slow" and a Garbage Collection event in the logs.It seems that increasing the heap size might have led to increased garbage collection activity.
Could you please assist me to adjust other parameters as well with respect to MAX_HEAP_SIZE="128G".
First, I would not change the parameters in cassandra-env.sh. Instead, use the jvm.options file.
Second, I would probably not move to 128G heap size, that's probably too large.
Third, the newsize and max heap size should be the same, otherwise, you'll get expansion and that could cause perf issues.
Fourth, you'll have to understand what's happening before you increase the heap size. Why increase the heap size? Are you seeing allocation errors because the heap is exhausted? Are you seeing long old gen GC pauses?
In jvm.options, set -Xmx and -Xms instead of mussing with cassandra-env.sh.