获得表状态(例如总行数)和当前工作量(例如Cassandra的op / s)的最佳方法?

时间:2019-07-10 02:02:23

标签: cassandra multiprocess nodetool workload

我正在尝试基于Cassandra的应用程序做两件事,这不可能为了测试而停止所有服务:

  1. 使用python驱动程序测试性能,如op / s和99.9%的延迟。为了获得更准确的结果,我们想知道当前的工作量,例如Cassandra的读写操作。
  2. 获取一些信息,例如表包含的行总数(我们的表目前有近80亿条记录)以及每周插入多少记录(有一些我们无法控制的数据源,因此很难获取此信息直接从插入脚本中删除。)

我已经尝试了一些方法来解决这两个问题:

  1. 已更新注释。

  2. select count(*) from xxx根本不起作用,而且速度太慢。 我尝试使用nodetool tablestats来获取一些信息,例如以system_distributed:

Keyspace : system_distributed
    Read Count: 0
    Read Latency: NaN ms
    Write Count: 0
    Write Latency: NaN ms
    Pending Flushes: 0
        Table: parent_repair_history
        SSTable count: 0
        Space used (live): 0
        Space used (total): 0
        Space used by snapshots (total): 0
        Off heap memory used (total): 0
        SSTable Compression Ratio: -1.0
        Number of partitions (estimate): 0
        Memtable cell count: 0
        Memtable data size: 0
        Memtable off heap memory used: 0
        Memtable switch count: 0
        Local read count: 0
        Local read latency: NaN ms
        Local write count: 0
        Local write latency: NaN ms
        Pending flushes: 0
        Percent repaired: 100.0
        Bloom filter false positives: 0
        Bloom filter false ratio: 0.00000
        Bloom filter space used: 0
        Bloom filter off heap memory used: 0
        Index summary off heap memory used: 0
        Compression metadata off heap memory used: 0
        Compacted partition minimum bytes: 0
        Compacted partition maximum bytes: 0
        Compacted partition mean bytes: 0
        Average live cells per slice (last five minutes): NaN
        Maximum live cells per slice (last five minutes): 0
        Average tombstones per slice (last five minutes): NaN
        Maximum tombstones per slice (last five minutes): 0
        Dropped Mutations: 0
        Table: repair_history
        SSTable count: 0
        Space used (live): 0
        Space used (total): 0
        Space used by snapshots (total): 0
        Off heap memory used (total): 0
        SSTable Compression Ratio: -1.0
        Number of partitions (estimate): 0
        Memtable cell count: 0
        Memtable data size: 0
        Memtable off heap memory used: 0
        Memtable switch count: 0
        Local read count: 0
        Local read latency: NaN ms
        Local write count: 0
        Local write latency: NaN ms
        Pending flushes: 0
        Percent repaired: 100.0
        Bloom filter false positives: 0
        Bloom filter false ratio: 0.00000
        Bloom filter space used: 0
        Bloom filter off heap memory used: 0
        Index summary off heap memory used: 0
        Compression metadata off heap memory used: 0
        Compacted partition minimum bytes: 0
        Compacted partition maximum bytes: 0
        Compacted partition mean bytes: 0
        Average live cells per slice (last five minutes): NaN
        Maximum live cells per slice (last five minutes): 0
        Average tombstones per slice (last five minutes): NaN
        Maximum tombstones per slice (last five minutes): 0
        Dropped Mutations: 0
        Table: view_build_status
        SSTable count: 0
        Space used (live): 0
        Space used (total): 0
        Space used by snapshots (total): 0
        Off heap memory used (total): 0
        SSTable Compression Ratio: -1.0
        Number of partitions (estimate): 0
        Memtable cell count: 0
        Memtable data size: 0
        Memtable off heap memory used: 0
        Memtable switch count: 0
        Local read count: 0
        Local read latency: NaN ms
        Local write count: 0
        Local write latency: NaN ms
        Pending flushes: 0
        Percent repaired: 100.0
        Bloom filter false positives: 0
        Bloom filter false ratio: 0.00000
        Bloom filter space used: 0
        Bloom filter off heap memory used: 0
        Index summary off heap memory used: 0
        Compression metadata off heap memory used: 0
        Compacted partition minimum bytes: 0
        Compacted partition maximum bytes: 0
        Compacted partition mean bytes: 0
        Average live cells per slice (last five minutes): NaN
        Maximum live cells per slice (last five minutes): 0
        Average tombstones per slice (last five minutes): NaN
        Maximum tombstones per slice (last five minutes): 0
        Dropped Mutations: 0

这些参数有些我无法理解:

a。本地写入计数是什么意思?如果我有一个分布在不同节点上的表并且有多个副本,那么如何计算该表的多少行?

b。前五行(读取计数,写入计数)是否描述了该键空间(system_distributed)的信息?

c。这里所有的等待时间都意味着平均等待时间吗?

感谢你们能给我任何建议。

贾西

0 个答案:

没有答案