Question-: You wanted to increase the memory allocated to Java process, which runs the Cassandra node. Which of the following is correct place to increase the memory? A. You would be updating logback.xml file B. You would be updating the Cassandra.yaml file C. You would be updating the jvm.options file D. You would be updating the node system properties
Answer: C
Explanation: Java process required its own memory. So suppose you have 256GB RAM on the node, on which the Cassandra node would be setup. You would be using the out this 128GB for running your Cassandra node smoothly, that is only for the Java process. Cassandra node would have some other processes also running. Hence, you need to keep the memory available. So in this case 128GB for java process and remaining 128GB. Now question is how can we allocate the memory to Java process. If you have ever worked with the Java then you might be knowing that there is a way, while starting the Java process you can provide various options like -Xmx (for maximum memory), -Xms (for minimum required memory). What is the memory required for New Generation is Java process can be set using the -Xmn etc. So, where do you configure all these values so that Cassandra node while read all these values and set the options accordingly. There is file called, jvm.options. Which you can use to setup all these values. It is always recommended that you leave 15-20% of RAM for other process. Admin Only
Question-: Which all below are the recommendation for the Java GC tuning in the Cassandra cluster node? A. Heap size should be always between ¼ and ½ of the available memory (RAM) on the node. B. Node should not use offheap cache and file system cache. C. While tuning the GC parameters enable the GC logging D. GCInspector class logs information about any garbage collection that takes long than 200ms.
Answer: A,C,D
Explanation: GC settings and tuning is very critical for the Cassandra cluster, Hence, setting Java Heap size more than 32GB may interfere with the OS page cache. Operating systems that maintain the OS page cache for frequently accessed data are very good at keeping this data in memory. Properly tuning the OS page cache usually results in better performance that increasing the row cache, there are some guidelines you need to follow while tuning the GC. - Heap size which is usually between ¼ and ½ of system memory and should not be larger than 32 GB - You should always keep the enough memory for the offheap cache and file system cache. - Enable GC logging when adjusting GC. - Enable the parallel processing for GC. - GCInspector class logs information about any garbage collection that takes longer than 200ms. Garbage collection that occur frequently and take a moderate length of time (seconds) to complete that indicates that there is excessive garbage collection pressure on the JVM. If you wanted to enable the gc logging go to the file jvm.options and update the following setting -xloggc:/var/log/Cassandra/gc.log However, once you change this value then it required node to be restarted. Similarly Heap sizes are also configured in this file only. -Xmx and -Xmx (This should be generally kept the same, so that while starting the node, all required memory can be reserved by the node JVM process). And it can avoid the GC pauses.
Question-: You have recently faced GC issues on a particular node in the Cassandra cluster. And to troubleshoot that you have to enable the gc logging. You identified the issue and fixed the same. You kept the GC logging on for this node for next days. As you wanted to troubleshoot again in case issue re-occur, is this fine? A. Yes B. No
Answer: B
Explanation: Keeping the GC logging on can be a detrimental to your Ring(Cassandra cluster). So you should avoid the keeping GC logging on. If GC logging on, it can affect your Cassandra cluster.