Cassandra vnodes:我可以降低在较慢的节点上的数量,期望重新平衡自动发生吗? [英] Cassandra vnodes: can I lower the number on slower nodes and expect rebalancing to occur automatically?

查看:276
本文介绍了Cassandra vnodes:我可以降低在较慢的节点上的数量,期望重新平衡自动发生吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行一个带有3台计算机的小型Cassandra 2.2.1测试集群。其中两个是i7,一个是一个有点慢i5,但我没有打扰,当第一次设置的东西给这个较慢的机器一个比例较低的数量的vnodes,因为我认为会是IO绑定(他们都有SSD和16GB RAM)。他们都默认256个节点。

I am running a small Cassandra 2.2.1 test cluster with 3 computers in it. Two of them are i7s and one is a somewhat slower i5, but I didn't bother when first setting things up to give this slower machine a proportionally lower number of vnodes, as I thought things would be IO bound (they all have SSDs and 16GB RAM). They're all on default 256 vnodes.

我发现Cassandra实际上是相当CPU密集,然而这个i5似乎正在举行的东西(在HTOP运行100%x4)。我可以减少Vnodes的数量,在cassandra.yaml中,192,重新启动只是那个节点,并期望整个3机集群重新平衡?自动分享新的vnode分配等?或者,我必须在i5单独做一些事情,或者可能在所有3台机器上使用nodetool?

I'm finding Cassandra actually to be quite CPU intensive though and this i5 seems to be holding things up (running 100%x4 on HTOP). Can I reduce its number of Vnodes to say, 192 in cassandra.yaml, restart just that node, and expect the whole 3-machine cluster to rebalance? Share out the new vnode allocations automatically etc? Or do I have to do something on the i5 alone, or perhaps on all 3 machines with nodetool?

我发现文档有点不清楚,因为它主要谈论添加新的节点,而不是改变现有硬件上的vnodes。

I am finding the documentation somewhat unclear on this as it talks mostly about adding new nodes rather than changing vnodes on existing hardware.

推荐答案

简单的重新启动不会允许您更改vnode的数量。

A simple restart won't allow you to change the number of vnodes.

您需要为i5节点执行nodetool停用或nodetool清除,然后停止该节点上的Cassandra,清除所有数据,更新num_tokens,然后启动Cassandra备份,并让它作为一个重新加入集群具有减少的令牌数的空新节点。然后Cassandra将重新平衡在i5盒子上的减少数量的令牌。

You'll need to do a nodetool decommission or nodetool removenode for the i5 node, then stop Cassandra on that node, scrub all the data, update num_tokens, then start Cassandra back up and let it rejoin the cluster as an empty new node with the reduced number of tokens. Then Cassandra will rebalance with the reduced number of tokens on the i5 box.

至少这是如何是在2.1.9,但可能是相同的更新分支。

At least that's how it is in 2.1.9, but probably it is the same in the newer branches too.

这篇关于Cassandra vnodes:我可以降低在较慢的节点上的数量,期望重新平衡自动发生吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆