mick
mick

Reputation: 25

How Cassandra In-memory feature works

I have few questions with regards to the In-Memory feature in Cassandra

1.) I have a 4 node datacenter and in Opscenter, under memory usage , it shows there is 100GB of in-memory available. Does it mean that each of the 4 nodes have 100GB memory available or is the 100Gb the total in memory capacity for my datacenter?

2.) If really 100GB is available for In-Memory for a datacenter, is it advisable to use the full capacity? Do I need to factor replication factor as well? Say I have a 15GB data which I want to store it in In-Memory, if the replication factor is 2, will it be like we have 30GB of data in In-memory for the datacenter?

3.) In dse.yaml file, there is a property which has the value like percentage of system memory "max_memory_to_lock_fraction" and by default it is 20%. As per the guidelines from Datastax Cassandra, we need to ensure that the in memory usage does not exceed 45% of total available system memory for each node. Is this "max_memory_to_lock_fraction" the parameter that needs to be set for 45%?

4.) Datastax documentation says compression needs to be removed for In-memory table. If compression is indeed set, will it affect the read/write performance?

5.) Output of dsetool inmemorystatus has a parameter called "Current Total memory not able to lock". Is the value present in this parameter denote the available memory. Like say if the value is 1024MB, does it mean that still 1GB In-memory is available for use.

I am using DSE 4.8.11 version. Please help me as I am trying to understand this feature so as to leverage it best.

Thanks in advance.

Upvotes: 0

Views: 4894

Answers (1)

Marko Švaljek
Marko Švaljek

Reputation: 2101

1) It depends on how you configure it it can be per cluster (all of the available memory) or you can view graphs of individual nodes

2) Yes, replication factor increases data by factor times in total. You will have to factor that in on the cluster level. Very nice tool to help you start: https://www.ecyrd.com/cassandracalculator/

3) Yes max_memory_to_lock_fraction is what you are looking for

4) It will increase processing time, since writes in cassandra are actually cpu bound this might not be best performance wise idea.

5) Yes this means there is still memory (of specified amount), but due to settings cassandra is unable to lock it.

Upvotes: 2

Related Questions