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

查看:704
本文介绍了增加复制因子对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?

推荐答案

一致性级别一将保持读取的性能基本相同(如果没有改进,因为他们是更可能的机器服务每个读),但你的写将做更多的工作。

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天全站免登陆