如何理解“Estimated droppable tombstones”?

时间:2016-11-04 19:23:57

标签: cassandra

我有来自sstablemetadata的cassandra输出,我知道这个估计可丢弃的墓碑是对墓碑的估计,但这个数字究竟是什么意思?

[root@cass04 ~]# du -sh /mnt/cassandra/data/Telesto/DeviceImpressions-53cf1590475911e5bad7894bc771451d/* | sort -h | tail -6  
26G /mnt/cassandra/data/Telesto/DeviceImpressions-53cf1590475911e5bad7894bc771451d/Telesto-DeviceImpressions-ka-9310-Data.db
99G /mnt/cassandra/data/Telesto/DeviceImpressions-53cf1590475911e5bad7894bc771451d/Telesto-DeviceImpressions-ka-8374-Data.db
113G    /mnt/cassandra/data/Telesto/DeviceImpressions-53cf1590475911e5bad7894bc771451d/Telesto-DeviceImpressions-ka-8714-Data.db
170G    /mnt/cassandra/data/Telesto/DeviceImpressions-53cf1590475911e5bad7894bc771451d/Telesto-DeviceImpressions-ka-9063-Data.db
201G    /mnt/cassandra/data/Telesto/DeviceImpressions-53cf1590475911e5bad7894bc771451d/Telesto-DeviceImpressions-ka-8146-Data.db
271G    /mnt/cassandra/data/Telesto/DeviceImpressions-53cf1590475911e5bad7894bc771451d/Telesto-DeviceImpressions-ka-8084-Data.db
[root@cass04 ~]# du -sh /mnt/cassandra/data/Telesto*/* | sort -h | tail -6 | awk '{print $2}' | xargs /usr/local/apache-cassandra/tools/bin/sstablemetadata | grep tombstones^C
[root@cass04 ~]# du -sh /mnt/cassandra/data/Telesto/DeviceImpressions-53cf1590475911e5bad7894bc771451d/* | sort -h | tail -6 | awk '{print $2}' | xargs /usr/local/apache-cassandra/tools/bin/sstablemetadata | grep tombstones
Estimated droppable tombstones: 6.137201062686473E-5
Estimated droppable tombstones: 1.1680085943591365E-4
Estimated droppable tombstones: 6.626254059536159E-5
Estimated droppable tombstones: 5.116100385316167E-5
Estimated droppable tombstones: 0.8704887039387946
Estimated droppable tombstones: 0.10260068095210549

1 个答案:

答案 0 :(得分:2)

它是可以放弃的墓碑数(过去的gc宽限)与列数的近似比率。

在示例中,如果是10列。其中8个是七天gc宽限期后的墓碑,8/10或saveRDS()

如果这高于0.8(0.2默认,压缩策略选项),则可能会获得单个sstable压缩来清除墓碑。

有些情况下仍然不会发生。可以使用其他选项[{1}},tombstone_threshold

调整这些选项

https://docs.datastax.com/en/cql/3.1/cql/cql_reference/compactSubprop.html