4

我正在阅读 cassandra yml 来调整一些参数以优化性能。

# Throttles compaction to the given total throughput across the entire
# system. The faster you insert data, the faster you need to compact in
# order to keep the sstable count down, but in general, setting this to
# 16 to 32 times the rate you are inserting data is more than sufficient.
# Setting this to 0 disables throttling. Note that this account for all types
# of compaction, including validation compaction.
compaction_throughput_mb_per_sec: 16 

在这里,cassandra 建议将“compaction_throughput_mb_per_sec”保持为数据插入速率的 16 到 32 倍。我们正在使用批量加载器插入数据,它以非常高的速率插入数据。我应该更改此设置吗?或者它应该保持原样?

4

1 回答 1

4

那么你知道你的批量加载器每秒会推送多少数据吗?这是持续负载还是突发性负载?如果您确实知道这一点,那么您基本上只需遵循该参数的配置文件注释中的指南即可。

我怀疑您没有该信息,在这种情况下,问题是您的系统是否行为不端(您目前是否看到问题?)。抱歉,我不知道其他预测的好方法,这是一个调整练习。您希望找到一个值,以保证 Cassandra 在压缩方面不会落后,但同时您不希望压缩杀死您的磁盘 i/o。弄清楚这一点(我知道)的唯一方法是尝试观察。

于 2013-09-04T23:45:14.133 回答