Getting server timings

Be aware that this tool is a per-node, per-bucket operation. That means that if you want to perform this operation, you must specify the IP address of a node in the cluster and a named bucket. If you do not provided a named bucket, the server will apply the setting to any default bucket that exists at the specified node. If you want to perform this operation for an entire cluster, you will need to perform the command for every node/bucket combination that exists for that cluster.

The following is sample output from cbstats timings :

disk_insert (10008 total)
   8us - 16us    : ( 94.80%)8 ###########################################
   16us - 32us   : ( 97.70%)  290 #
   32us - 64us   : ( 98.43%)   73
   64us - 128us  : ( 99.29%)   86
   128us - 256us : ( 99.77%)   48
   256us - 512us : ( 99.79%)    2
   512us - 1ms   : ( 99.91%)   12
   1ms - 2ms     : ( 99.92%)    1
disk_commit (1 total)
    0 - 1s        : (100.00%) 1 #############################################################
disk_vbstate_snapshot (2 total)
    4s - 8s       : (100.00%) 2 #############################################################
get_stats_cmd (1535 total)
    ....
set_vb_cmd (1024 total)
    4us - 8us     : ( 97.95%) 1003 ########################################################
    8us - 16us    : ( 98.83%)    9
    ....

The first statistic tells you that disk_insert took 8–16µs8 times, 16–32µs 290 times, and so forth.

The following are the possible return values provided by cbstats timings. The return values provided by this command depend on what has actually occurred on a data bucket:

bg_load Background fetches waiting for disk
bg_wait Background fetches waiting in the dispatcher queue
data_age Age of data written to disk
disk_commit Time waiting for a commit after a batch of updates
disk_del Wait for disk to delete an item
disk_insert Wait for disk to store a new item
disk_vbstate_snapshot Time spent persisting vbucket state changes
disk_update Wait time for disk to modify an existing item
get_cmd Servicing get requests
get_stats_cmd Servicing get_stats requests
set_vb_cmd Servicing vbucket set state commands
item_alloc_sizes Item allocation size counters (in bytes)
notify_io Time for waking blocked connections
storage_age Time since most recently persisted item was initially queued for storage.
tap_mutation Time spent servicing tap mutations