增加复制因子对cassandra性能的影响 [英] Effects of increasing the replication factor on the performance of cassandra

查看:22
本文介绍了增加复制因子对cassandra性能的影响的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在对 Cassandra 的性能进行一些实验.我有一个由 8 个节点组成的集群.在将复制因子从 1 增加到 8 的同时,我注意到整体吞吐量下降了.我对读取和写入都使用一致性级别 ONE.我发现这些不是预期的结果.有人解释为什么会这样吗?

I'm carrying some experiments on the performance of Cassandra. I have a single cluster of 8 nodes. While increasing the replication factor from 1 to 8, i noticed that the overall throughput decreases. I'm using consistency level ONE for both reads and writes. I found that these are not the expected results. Anyone explain why this is happening?

推荐答案

这应该是完全可以预料的.一致性级别 1 将使您的读取性能保持基本相同(如果没有改进,因为它们有更多可能的机器来为每次读取提供服务),但您的写入将做更多的工作.

This should be completely expected. Consistency level one will keep the performance of your reads as basically the same (if not improved since their are more possible machines to serve each read) but your writes will be doing significantly more work.

对集群的每次写入,无论一致性级别如何,最终都会导致写入该数据的每个副本节点.一致性级别仅确定何时将写入向客户端确认为已完成.这并不意味着您可以避免完成所有这些额外写入的性能损失.因此,您可以想象,将复制因子增加到 8 会导致每次写入现在执行 8 倍的工作,这解释了您的性能变化.

Every write to the cluster, regardless of consistency level, will end up causing a write to every replica node for that data. The consistency level only determines when the write will be acknowledged to the client as having been completed. This does not mean you can avoid the performance penalty of having done all those additional writes. So you can imagine that by increasing your replication factor to 8 causes every write to now do 8 times the work which explains your performance changes.

这篇关于增加复制因子对cassandra性能的影响的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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