OpsCenter汇总*表永远在增长

时间:2016-07-26 06:58:53

标签: datastax-enterprise opscenter

我们正在使用DSE 4.8.8和OpsCenter 5.2.4。我们所有的OpsCenter.rollups*表都在不断增长,特别是rollups60 one:

Size of rollups60, 1 month

密钥空间OpsCenter使用org.apache.cassandra.locator.NetworkTopologyStrategy,DC1 1,DC2 1

表格设置:

CREATE TABLE "OpsCenter".rollups60 (
    key text,
    "timestamp" varint,
    value blob,
    PRIMARY KEY (key, "timestamp")
) WITH COMPACT STORAGE
    AND CLUSTERING ORDER BY ("timestamp" ASC)
    AND bloom_filter_fp_chance = 0.01
    AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
    AND comment = '{"info": "OpsCenter management data.", "version": [5, 2, 1]}'
    AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
    AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND dclocal_read_repair_chance = 0.0
    AND default_time_to_live = 0
    AND gc_grace_seconds = 0
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.25
    AND speculative_retry = 'NONE';

keytimestamp上的条目没有TTL,列value上的TTL为604618。

知道怎么解决这个问题吗?我已经尝试过截断,如下所述:Datastax support

1 个答案:

答案 0 :(得分:2)

您可以通过群集配置文件设置1分钟(汇总60表)ttl,例如:https://docs.datastax.com/en/opscenter/6.5/opsc/configure/opscChangingPerformanceDataExpiration_t.html

[cassandra_metrics]

1min_ttl = 43200
5min_ttl = 1209600
2hr_ttl = 0
24hr_ttl = 0

也可以在每个代理的address.yaml中进行设置。但是,可以更轻松地在OpsCenter群集配置中进行设置。

您可以稍微调整表格设置以改善清除墓碑。

ALTER TABLE "OpsCenter".rollups60 WITH
  compaction = {'class': 'SizeTieredCompactionStrategy',
    'tombstone_compaction_interval': '1',
    'unchecked_tombstone_compaction': 'true',
    'tombstone_threshold': '0.05'} AND 
  gc_grace_seconds = 0

为了更积极,您可以使用LCS,但这会增加IO使用率。为了你的场景,虽然它可能是好的(至少上面有ttl选项)你实际上不会有那么多数据存储。

ALTER TABLE "OpsCenter".rollups60 WITH
  compaction = {'class': 'LeveledCompactionStrategy', 
    'sstable_size_in_mb': '256mb',
    'tombstone_compaction_interval': '1',
    'unchecked_tombstone_compaction': 'true',
    'tombstone_threshold': '0.05'} AND 
  gc_grace_seconds = 0