Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我通过 nodetool 和 opscenter 检查了我的密钥缓存命中率,第一个显示命中率为 0.907%。
密钥缓存:条目 1152104,大小 96.73 MB,容量 100 MB,52543777 次命中,57954469 次请求,0.907 最近命中率,14400 秒保存时间
但在 opscenter 中,图表显示 100%。
任何人都明白为什么有区别吗?
Cassandra 在这里可能有一个错误(或至少是拼写错误),它将它列为最近的命中缓存,但它一直是:
https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/tools/nodetool/Info.java#L95
它抓住了“总”命中率的价值:
https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/metrics/CacheMetrics.java#L66
因此,尽管根据 opscenter 的说法,您可能在过去 19 分钟内获得 100% 的命中率,但并不总是 100%。总点击次数/总请求数约为 90%。
这显示在:
52543777 hits, 57954469 requests 52543777 / 57954469 = 0.907