0

签入 Opscenter 或 cfstats 时,我似乎没有启用任何缓存。我在 Debian 上使用 Solandra 运行 Cassandra 1.1.7。我在 cassandra.yaml 中设置了所需的全局选项:

key_cache_size_in_mb: 800
key_cache_save_period: 14400
row_cache_size_in_mb: 800
row_cache_save_period: 15400
row_cache_provider: SerializingCacheProvider

列族的创建如下:

create column family example
with column_type = 'Standard'
and comparator = 'BytesType'
and default_validation_class = 'BytesType'
and key_validation_class = 'BytesType'
and read_repair_chance = 1.0
and dclocal_read_repair_chance = 0.0
and gc_grace = 864000
and min_compaction_threshold = 4
and max_compaction_threshold = 32
and replicate_on_write = true
and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
and caching = 'ALL';

Opscenter 未显示缓存图上的可用数据,CFSTATS 未显示任何与缓存相关的字段:

Column Family: charsets
SSTable count: 1
Space used (live): 5558
Space used (total): 5558
Number of Keys (estimate): 128
Memtable Columns Count: 0
Memtable Data Size: 0
Memtable Switch Count: 0
Read Count: 61381
Read Latency: 0.123 ms.
Write Count: 0
Write Latency: NaN ms.
Pending Tasks: 0
Bloom Filter False Postives: 0
Bloom Filter False Ratio: 0.00000
Bloom Filter Space Used: 16
Compacted row minimum size: 1917
Compacted row maximum size: 2299
Compacted row mean size: 2299

任何帮助或建议表示赞赏。

山姆

4

1 回答 1

2

在 Cassandra 1.1 中,缓存统计信息已从 cfstats 移至 info。如果您运行 nodetool info,您应该会看到如下内容:

Key Cache : size 5552 (bytes), capacity 838860800 (bytes), 38 hits, 47 requests, 0.809 recent hit rate, 14400 save period in seconds
Row Cache : size 0 (bytes), capacity 838860800 (bytes), 0 hits, 0 requests, NaN recent hit rate, 15400 save period in seconds

这是因为现在有全局缓存,而不是每个 CF。Opscenter 似乎需要针对此更改进行更新 - 也许有可用的更高版本可用。

于 2013-03-25T12:42:41.553 回答