我正在阅读 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 倍。我们使用批量加载器插入数据,以非常高的速率插入数据。我应该更改此设置吗?还是应该保持原样?
最佳答案
那么你知道你的批量加载器每秒会推送多少数据吗?这是持续负载还是突发?如果您确实知道这一点,那么您基本上只需遵循该参数的配置文件注释中的指南。
我怀疑您没有这些信息,在这种情况下,问题是您的系统是否行为不端(您目前是否看到问题?)。抱歉,我不知道以其他方式预测的好方法,这是一个调整练习。您想找到一个值来保证 Cassandra 在压缩时不会落后,但同时又不希望压缩会杀死您的磁盘 i/o。弄清楚这一点(我知道)的唯一方法是尝试观察。
关于压实参数的Cassandra配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11013655/