1

我正在用一个简单的模型测试 cassandra 的性能。

CREATE TABLE "NoCache" (
  key ascii,
  column1 ascii,
  value ascii,
  PRIMARY KEY (key, column1)
) WITH COMPACT STORAGE AND
  bloom_filter_fp_chance=0.010000 AND
  caching='ALL' AND
  comment='' AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=864000 AND
  read_repair_chance=0.100000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'SnappyCompressor'};

我正在使用 pycassa、get/xget 函数 () 获取行键的 100 列。但在服务器中获得大约 15 毫秒的读取延迟。

colums=COL_FAM.get(row_key, column_count=100)

节点工具cfstats

            Column Family: NoCache
            SSTable count: 1
            Space used (live): 103756053
            Space used (total): 103756053
            Number of Keys (estimate): 128
            Memtable Columns Count: 0
            Memtable Data Size: 0
            Memtable Switch Count: 0
            Read Count: 20
            Read Latency: 15.717 ms.
            Write Count: 0
            Write Latency: NaN ms.
            Pending Tasks: 0
            Bloom Filter False Positives: 0
            Bloom Filter False Ratio: 0.00000
            Bloom Filter Space Used: 976
            Compacted row minimum size: 4769
            Compacted row maximum size: 557074610
            Compacted row mean size: 87979499

这种类型的延迟是惊人的!当nodetool info显示读取直接在行缓存中命中时。

Row Cache        : size 4834713 (bytes), capacity 67108864 (bytes), 35 hits, 38 requests, 1.000 recent hit rate, 0 save period in seconds

谁能告诉我为什么 cassandra 在从行缓存中读取时要花这么多时间?

4

1 回答 1

2

启用跟踪并查看它在做什么。http://www.datastax.com/dev/blog/tracing-in-cassandra-1-2

于 2013-06-27T10:22:11.527 回答