Reputation: 186
I am setting up Cassandra 3.11 cluster and wanted to know what is the ideal value for num_tokens. By default, cassandra.yaml has 256. Some blogs on Cassandra suggests values for num_tokens to be 32. Do we see any performance issue with 256 num_tokens or can we have values like 16 or 32. How can we decide the optimal value? Please suggest.
Upvotes: 1
Views: 1300
Reputation: 2310
num_tokens
value as such as no impact on writing. Most of the issue with having large value of num_tokens
is with operation maintenance (repair) and scanning issues while reading. High num_token
value is found to create hotspots, also more parition ranges increase repair time. Community has reduced default value of num_tokens
from 256 to 16 in Cassandra 4.0 release. You can see JIRA here.
You can experiment with lower values of num_tokens. Don't forget to use allocate_tokens_for_keyspace
(Cassandra Documentation
Upvotes: 1