在进入system.log之前,我们如何在cassandra集群上找到较大的分区?由于这个原因,我们正面临一些性能问题。有人能帮我吗。我们有cassandra版本2.0.11和2.1.16。
发布于 2018-12-28 16:12:30
您可以查看nodetool tablestats (在旧版本的Cassandra中为nodetool cfstats )的输出-对于每个表,它都有行压缩分区最大字节数以及其他信息,例如在本例中,当最大分区大小约为268Mb时:
Table: table_name
SSTable count: 2
Space used (live): 147638509
Space used (total): 147638509
.....
Compacted partition minimum bytes: 43
Compacted partition maximum bytes: 268650950
Compacted partition mean bytes: 430941
Average live cells per slice (last five minutes): 8256.0
Maximum live cells per slice (last five minutes): 10239
Average tombstones per slice (last five minutes): 1.0
Maximum tombstones per slice (last five minutes): 1
.....但是nodetool tablestats只为您提供当前节点的信息,因此您需要在集群的每个节点上执行它。
更新:您可以使用不同的工具查找最大的分区:
发布于 2018-12-28 17:23:12
Try nodetool tablehistograms -- <keyspace> <table>命令提供有关表的统计信息,包括读/写延迟、分区大小、列计数和SSTables数量。
以下是示例输出:
Percentile SSTables Write Latency Read Latency Partition Size Cell Count
(micros) (micros) (bytes)
50% 0.00 73.46 0.00 223875792 61214
75% 0.00 88.15 0.00 668489532 182785
95% 0.00 152.32 0.00 1996099046 654949
98% 0.00 785.94 0.00 3449259151 1358102
99% 0.00 943.13 0.00 3449259151 1358102
Min 0.00 24.60 0.00 5723 4
Max 0.00 5839.59 0.00 5960319812 1955666这提供了适当的表统计数据,比如raw_data表的95%的百分位数的分区大小为107MB,最大值为3.44 of。
希望这有助于解决性能问题。
https://stackoverflow.com/questions/53954080
复制相似问题