nodetool cfstats
显示我下面的输出:Cassandra没有压缩sstables?
Read Count: 746287
Read Latency: 8.772114064696291 ms.
Write Count: 135629
Write Latency: 0.052691931666531494 ms.
Pending Flushes: 0
Table: graphindex
** SSTable count: 230 **
Space used (live): 1532001
Space used (total): 1532001
Space used by snapshots (total): 0
SSTable Compression Ratio: 0.8071848230527264
Memtable cell count: 159436
Memtable data size: 2609278
Memtable switch count: 1
Local read count: 746287
** Local read latency: 8.773 ms **
Local write count: 135629
Local write latency: 0.053 ms
Pending flushes: 0
Bloom filter false positives: 1122
Bloom filter false ratio: 0.00000
Bloom filter space used: 39312
Compacted partition minimum bytes: 43
Compacted partition maximum bytes: 20501
Compacted partition mean bytes: 70
Average live cells per slice (last five minutes): 320.3775491198426
Maximum live cells per slice (last five minutes): 3183.0
** Average tombstones per slice (last five minutes): 7997.852040836836 **
** Maximum tombstones per slice (last five minutes): 27078.0 **
正如你可以看到sstables的数量是相当大的。该表使用默认压缩SizeTieredCompactionStrategy与最小极限4和最大32
我的问题是:
为什么还是有那么多的sstables考虑到数据的节点的量并不大和sstables很小?如何(何时)发生这种情况?
当SizeTieredCompactionStrategy实际触发压缩?在the other post我发现:
默认情况下,未成年人可压实开始任何时候卡桑德拉为列族在磁盘上创建 4 SSTables。 A小调压实必须 开始之前SSTables总数达到32
但如果sstables的数量已经超过了32我应该怎么办?手动运行主要压缩是唯一的解决方案吗?
我问的原因是由于大量的墓碑(上面输出的最后一行)和sstables,读取延迟变得非常糟糕。 gc_grace_period
保持在较低的价值,但由于卡桑德拉没有紧凑的sstables,墓碑仍然在那里。或者我错过了什么?
我有成千上万的sstables同样的问题。你有没有找到解释? – tbsalling 2015-03-27 18:54:47
不幸的不是。我见过很多尺寸完全相同的sstables,这些sstables没有压缩... – 2015-03-27 20:20:02
您是否尝试过在每个节点上运行'nodetool enableautocompaction'?我认为这将使STCS在后台运行。 – tbsalling 2015-03-28 21:33:39