【问题标题】:Cassandra Key Cache emptyCassandra 密钥缓存为空
【发布时间】:2012-01-24 15:51:06
【问题描述】:

我是 Cassandra 的新手,我正在尝试优化我的读取(写入时间很好,每 0.1 秒大约 1000 行),我一直在阅读 Key 缓存和 Row 缓存。

使用带有 Hector 库的 Java 插入数据似乎一切正常,但读取速度确实很慢(比我比较的 SQL Server 实例慢大约 2-3 倍)。我开始查看 cfstats 显示的统计数据:

Key cache capacity: 200000
Key cache size: 0
Key cache hit rate: NaN
Row cache capacity: 40000
Row cache size: 0

插入后不应该在 Key 或 Row 缓存中有什么吗?我想这就是我尝试阅读时它运行如此缓慢的原因。

任何帮助将不胜感激......

【问题讨论】:

  • 这是在哪个 cassandra 版本上运行?

标签: java cassandra hector


【解决方案1】:

密钥缓存仅用于从磁盘 sstables 读取的数据。如果您查询的数据最近已插入或更新,则会改为从 memtable 中读取,并且不会填充密钥缓存。

【讨论】:

    猜你喜欢
    • 2019-02-04
    • 2015-03-05
    • 1970-01-01
    • 1970-01-01
    • 2013-05-01
    • 2019-02-23
    • 2012-12-27
    • 2016-04-18
    • 2020-05-25
    相关资源
    最近更新 更多