On 29 July 2013 14:43, Langston, Jim <Jim.Langston@compuware.com> wrote:

Running nodetool and looking at the cfstats output, for the 
counters such as write count and read count, do those numbers
reflect any replication ? 

For instance, if write count shows 3000 and the replication factor
is 3, is that really 1000 writes ?   

The counts are the number of operations that particular node has processed.  So if you sum up all the write counts across all node's cfstats output, it will be a factor of replication factor too high, assuming all replicas received all writes.  (A write message will be sent to all replicas, but if one is down or busy it may not get processed.)

If your cluster is balanced, then you can estimate the total number of write operations from one cfstats output as

count * num_nodes / replication_factor

So, as in your example, if one node shows write count 3000 and you have RF 3 with e.g. 3 nodes, your cluster will have processed about 3000 writes.

Reads are a bit harder, because, unlike writes, not all nodes necessarily receive all read requests.  It depends on consistency level, snitch and value of read_repair_chance.  You can estimate how many nodes will be involved in each read request though to figure out how many reads have actually been submitted.

However, I think the numbers exposed by StorageProxyMBean getWriteOperations() and getReadOperations() would give you the true number (when summed up over all nodes).  These numbers don't over count for replication since they count client requests.  I don't think these are exposed by any nodetool commands though, but you can use any JMX client to read them.

Richard.