监控和调整缓存

监控和调整缓存

通过小的增量调整来更改缓存选项,然后使用nodetool监控每个更改的效果。nodetool info命令的输出 显示以下行缓存和密钥缓存设置值,这些值在cassandra.yaml文件中配置:

  • Cache size in bytes(高速缓存的大小)

  • Capacity in bytes(容量以字节为单位)

  • Number of hits(点击次数)

  • Number of requests(请求数)

  • Recent hit rate(近期命中率)

  • Duration in seconds after which Cassandra saves the key cache(以秒为单位的持续时间,之后Cassandra将保存密钥缓存)

例如,在启动时,来自nodetool info的信息可能如下所示:

ID               : 387d15ba-7103-491b-9327-1a691dbb504a
Gossip active    : true
Thrift active    : true
Native Transport active: true
Load             : 65.87 KB
Generation No    : 1400189757
Uptime (seconds) : 148760
Heap Memory (MB) : 392.82 / 1996.81
datacenter      : datacenter1
Rack             : rack1
Exceptions       : 0
Key Cache        : entries 10, size 728 (bytes), capacity 103809024 (bytes), 93 hits, 102 requests, 0.912 recent hit rate, 14400 save period in seconds
Row Cache        : entries 0, size 0 (bytes), capacity 0 (bytes), 0 hits, 0 requests, NaN recent hit rate, 0 save period in seconds
Counter Cache    : entries 0, size 0 (bytes), capacity 51380224 (bytes), 0 hits, 0 requests, NaN recent hit rate, 7200 save period in seconds
Token            : -9223372036854775808

注意:在高内存消耗的情况下,考虑调整数据缓存。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值