キャッシングの監視と調整

nodetoolを使用したキャッシュ・オプションの変更、および各変更による影響の監視。

キャッシュのオプションの変更は段階的に少しずつ調整して、DataStax OpsCenterまたはnodetoolユーティリティを使用して、各変更の効果を監視します。nodetool infoコマンドの出力は、cassandra.yamlファイルで構成される以下の行キャッシュおよびキー・キャッシュのメトリックを示します。
  • キャッシュ・サイズ(バイト)
  • 容量(バイト)
  • ヒット数
  • 要求数
  • 最新のヒット率
  • 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 Data Center :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

メモリー使用率が高い場合は、データ・キャッシュの調整を検討してください。

cassandra.yamlファイルの場所は、インストールのタイプによって異なります。
パッケージ・インストール /etc/cassandra/cassandra.yaml
tarボール・インストール install_location/resources/cassandra/conf/cassandra.yaml
Windowsインストール C:\Program Files\DataStax Community\apache-cassandra\conf\cassandra.yaml