Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

rangumanikar_88470 avatar image
rangumanikar_88470 asked Erick Ramirez answered

How is performance impacted by a high number of tokens?

Hi team,

We are currently using 256 number of tokens.We are planning to change it to 32 or 16.Before that i would like to know more insights about the performance impact on the cluster if we keep the same number of tokens?

Regards

Mani Rangu

virtual nodes
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Erick Ramirez avatar image
Erick Ramirez answered

For the most part, a high num_tokens is not so much an issue with performance but issues relating to:

  1. a higher chance of affecting replica availability with multi-node outages, and
  2. repairs being more expensive, taking a longer time to complete.

For details, Anthony Grasso discussed these issues at length in his blog post The Impacts of Changing the Number of VNodes in Apache Cassandra where he also talked about the correct way of changing the virtual node configuration on an existing cluster. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

steve.lacerda avatar image
steve.lacerda answered

Hi! I would definitely recommend reducing the number of tokens. In older versions of dse and cassandra, 256 vnodes were recommended in order to better balance data load, but post 3.0 versions haven't had the same load issues.

Due to better node balancing algorithms (like using allocate tokens for replication factor in cassandra.yaml), we recommend decreasing the tokens to 8. By decreasing the tokens, you will seriously offload a lot of work from the node when bootstrapping and repairing simply because there will be far fewer sstables.


Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.