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

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

问题描述

我正在运行一个包含 3 台计算机的小型 Cassandra 2.2.1 测试集群.其中两个是 i7s,一个是稍慢的 i5,但在第一次设置时我没有打扰这台较慢的机器按比例减少 vnode 的数量,因为我认为事情会受到 IO 限制(它们都有 SSD 和16GB 内存).它们都在默认的 256 个 vnode 上.

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?

我发现文档对此有些不清楚,因为它主要讨论添加新节点而不是更改现有硬件上的 vnode.

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 decommission 或 nodetool removenode,然后在该节点上停止 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天全站免登陆