You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Leon Zaruvinsky <le...@gmail.com> on 2020/08/06 23:53:45 UTC

Difference in num_tokens between Cassandra 2 and 3?

Hi,

I'm currently investigating an upgrade for our Cassandra cluster from 2.2
to 3.11, and as part of that would like to understand if there is any
change in how the cluster behaves w.r.t number of tokens.  For historical
reasons, we have num_tokens set very high but want to make sure that this
is not more dangerous in a later version.

I've read recent threads on the new default, and the Netflix whitepaper, so
I'm fairly comfortable with the pros/cons of various token counts - but
specifically am interested about the difference in behavior between
Cassandra major versions, if one exists.

Thanks,
Leon

Re: Difference in num_tokens between Cassandra 2 and 3?

Posted by Elliott Sims <el...@backblaze.com>.
I've found there to be some behavior differences in practice as well going
from 2.2 to 3.11 with a high token count, but all differences for the
better.  3.x seems noticeably less likely to crater or GC-thrash during
repairs compared to 2.x, probably due to the sum of small changes rather
than any one in particular.

On Thu, Aug 6, 2020 at 4:54 PM Leon Zaruvinsky <le...@gmail.com>
wrote:

> Hi,
>
> I'm currently investigating an upgrade for our Cassandra cluster from 2.2
> to 3.11, and as part of that would like to understand if there is any
> change in how the cluster behaves w.r.t number of tokens.  For historical
> reasons, we have num_tokens set very high but want to make sure that this
> is not more dangerous in a later version.
>
> I've read recent threads on the new default, and the Netflix whitepaper,
> so I'm fairly comfortable with the pros/cons of various token counts - but
> specifically am interested about the difference in behavior between
> Cassandra major versions, if one exists.
>
> Thanks,
> Leon
>

Re: Difference in num_tokens between Cassandra 2 and 3?

Posted by Leon Zaruvinsky <le...@gmail.com>.
Thanks Erick, that confirms my suspicion.

Cheers!

On Thu, Aug 6, 2020 at 8:55 PM Erick Ramirez <er...@datastax.com>
wrote:

> C* 3.0 added a new algorithm that optimised the token allocation
> (CASSANDRA-7032) [1] with allocate_tokens_for_keyspace in cassandra.yaml
> (originally allocate_tokens_keyspace but renamed) [2].
>
> Apart from that, there's no real change to how num_tokens work. What
> really changed is the philosophy on 256 being a bad default operationally.
> The new proposed default is 16 (CASSANDRA-13701). [3]
>
> [1] https://issues.apache.org/jira/browse/CASSANDRA-7032
> [2]
> https://github.com/apache/cassandra/commit/36d0f55d46ac0edb5a4f140c7993c6d207605fe7
> [3] https://issues.apache.org/jira/browse/CASSANDRA-13701
>

Re: Difference in num_tokens between Cassandra 2 and 3?

Posted by Erick Ramirez <er...@datastax.com>.
C* 3.0 added a new algorithm that optimised the token allocation
(CASSANDRA-7032) [1] with allocate_tokens_for_keyspace in cassandra.yaml
(originally allocate_tokens_keyspace but renamed) [2].

Apart from that, there's no real change to how num_tokens work. What really
changed is the philosophy on 256 being a bad default operationally. The new
proposed default is 16 (CASSANDRA-13701). [3]

[1] https://issues.apache.org/jira/browse/CASSANDRA-7032
[2]
https://github.com/apache/cassandra/commit/36d0f55d46ac0edb5a4f140c7993c6d207605fe7
[3] https://issues.apache.org/jira/browse/CASSANDRA-13701