xref: /3.0.3-GA/ep-engine/docs/stats.org (revision 5174ad24)
1#+TITLE:     EP Stats
2#+AUTHOR:    Dustin Sallings
3#+EMAIL:     dustin@spy.net
4#+DATE:      2010-02-08 Mon
5#+DESCRIPTION:
6#+KEYWORDS:
7#+LANGUAGE:  en
8#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:nil -:t f:t *:t <:t
9#+OPTIONS:   TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
10#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
11#+EXPORT_SELECT_TAGS: export
12#+EXPORT_EXCLUDE_TAGS: noexport
13#+LINK_UP:
14#+LINK_HOME:
15#+STYLE:  <link rel="stylesheet" type="text/css" href="myorg.css" />
16
17* Getting Started
18
19For introductory information on stats within membase, start with the
20[[http://wiki.membase.org/display/membase/Membase%2BStatistics][membase wiki stats page]].
21
22* Stats Definitions
23
24** Toplevel Stats
25
26| Stat                               | Description                            |
27|------------------------------------+----------------------------------------|
28| uuid                               | The unique identifier for the bucket   |
29| ep_version                         | Version number of ep_engine            |
30| ep_storage_age                     | Seconds since most recently            |
31|                                    | stored object was initially queued     |
32| ep_storage_age_highwat             | ep_storage_age high water mark         |
33| ep_startup_time                    | System-generated engine startup time   |
34| ep_data_age                        | Seconds since most recently            |
35|                                    | stored object was modified             |
36| ep_data_age_highwat                | ep_data_age high water mark            |
37| ep_too_young                       | Number of times an object was          |
38|                                    | not stored due to being too young      |
39| ep_too_old                         | Number of times an object was          |
40|                                    | stored after being dirty too long      |
41| ep_num_workers                     | Global number of shared worker threads |
42| ep_bucket_priority                 | Priority assigned to the bucket        |
43| ep_total_enqueued                  | Total number of items queued for       |
44|                                    | persistence                            |
45| ep_total_new_items                 | Total number of persisted new items    |
46| ep_total_del_items                 | Total number of persisted deletions    |
47| ep_total_persisted                 | Total number of items persisted        |
48| ep_item_flush_failed               | Number of times an item failed to      |
49|                                    | flush due to storage errors            |
50| ep_item_commit_failed              | Number of times a transaction failed   |
51|                                    | to commit due to storage errors        |
52| ep_item_begin_failed               | Number of times a transaction failed   |
53|                                    | to start due to storage errors         |
54| ep_expired_access                  | Number of times an item was expired on |
55|                                    | application access.                    |
56| ep_expired_pager                   | Number of times an item was expired by |
57|                                    | ep engine item pager                   |
58| ep_item_flush_expired              | Number of times an item is not flushed |
59|                                    | due to the expiry of the item          |
60| ep_queue_size                      | Number of items queued for storage     |
61| ep_flusher_todo                    | Number of items currently being        |
62|                                    | written                                |
63| ep_flusher_state                   | Current state of the flusher thread    |
64| ep_commit_num                      | Total number of write commits          |
65| ep_commit_time                     | Number of milliseconds of most recent  |
66|                                    | commit                                 |
67| ep_commit_time_total               | Cumulative milliseconds spent          |
68|                                    | committing                             |
69| ep_vbucket_del                     | Number of vbucket deletion events      |
70| ep_vbucket_del_fail                | Number of failed vbucket deletion      |
71|                                    | events                                 |
72| ep_vbucket_del_max_walltime        | Max wall time (µs) spent by deleting   |
73|                                    | a vbucket                              |
74| ep_vbucket_del_avg_walltime        | Avg wall time (µs) spent by deleting   |
75|                                    | a vbucket                              |
76| ep_pending_compactions             | Number of pending vbucket compactions  |
77| ep_rollback_count                  | Number of rollbacks on consumer        |
78| ep_flush_duration_total            | Cumulative seconds spent flushing      |
79| ep_flush_all                       | True if disk flush_all is scheduled    |
80| ep_num_ops_get_meta                | Number of getMeta operations           |
81| ep_num_ops_set_meta                | Number of setWithMeta operations       |
82| ep_num_ops_del_meta                | Number of delWithMeta operations       |
83| ep_num_ops_set_meta_res_failed     | Number of setWithMeta ops that failed  |
84|                                    | conflict resolution                    |
85| ep_num_ops_del_meta_res_failed     | Number of delWithMeta ops that failed  |
86|                                    | conflict resolution                    |
87| ep_num_ops_set_ret_meta            | Number of setRetMeta operations        |
88| ep_num_ops_del_ret_meta            | Number of delRetMeta operations        |
89| ep_num_ops_get_meta_on_set_meta    | Num of background getMeta operations   |
90|                                    | spawn due to setWithMeta operations    |
91| curr_items                         | Num items in active vbuckets (temp +   |
92|                                    | live)                                  |
93| curr_temp_items                    | Num temp items in active vbuckets      |
94| curr_items_tot                     | Num current items including those not  |
95|                                    | active (replica, dead and pending      |
96|                                    | states)                                |
97| ep_kv_size                         | Memory used to store item metadata,    |
98|                                    | keys and values, no matter the         |
99|                                    | vbucket's state. If an item's value is |
100|                                    | ejected, this stats will be            |
101|                                    | decremented by the size of the item's  |
102|                                    | value.                                 |
103| ep_value_size                      | Memory used to store values for        |
104|                                    | resident keys                          |
105| ep_overhead                        | Extra memory used by transient data    |
106|                                    | like persistence queues, replication   |
107|                                    | queues, checkpoints, etc               |
108| ep_mem_low_wat                     | Low water mark for auto-evictions      |
109| ep_mem_high_wat                    | High water mark for auto-evictions     |
110| ep_total_cache_size                | The total byte size of all items, no   |
111|                                    | matter the vbucket's state, no matter  |
112|                                    | if an item's value is ejected          |
113| ep_oom_errors                      | Number of times unrecoverable OOMs     |
114|                                    | happened while processing operations   |
115| ep_tmp_oom_errors                  | Number of times temporary OOMs         |
116|                                    | happened while processing operations   |
117| ep_mem_tracker_enabled             | True if memory usage tracker is        |
118|                                    | enabled                                |
119| ep_bg_fetched                      | Number of items fetched from disk      |
120| ep_bg_meta_fetched                 | Number of meta items fetched from disk |
121| ep_bg_remaining_jobs               | Number of remaining bg fetch jobs      |
122| ep_max_bg_remaining_jobs           | Max number of remaining bg fetch jobs  |
123|                                    | that we have seen in the queue so far  |
124| ep_tap_bg_fetched                  | Number of tap disk fetches             |
125| ep_tap_bg_fetch_requeued           | Number of times a tap bg fetch task is |
126|                                    | requeued                               |
127| ep_num_pager_runs                  | Number of times we ran pager loops     |
128|                                    | to seek additional memory              |
129| ep_num_expiry_pager_runs           | Number of times we ran expiry pager    |
130|                                    | loops to purge expired items from      |
131|                                    | memory/disk                            |
132| ep_num_access_scanner_runs         | Number of times we ran accesss scanner |
133|                                    | to snapshot working set                |
134| ep_access_scanner_num_items        | Number of items that last access       |
135|                                    | scanner task swept to access log.      |
136| ep_access_scanner_task_time        | Time of the next access scanner task   |
137|                                    | (GMT)                                  |
138| ep_access_scanner_last_runtime     | Number of seconds that last access     |
139|                                    | scanner task took to complete.         |
140| ep_items_rm_from_checkpoints       | Number of items removed from closed    |
141|                                    | unreferenced checkpoints               |
142| ep_num_value_ejects                | Number of times item values got        |
143|                                    | ejected from memory to disk            |
144| ep_num_eject_failures              | Number of items that could not be      |
145|                                    | ejected                                |
146| ep_num_not_my_vbuckets             | Number of times Not My VBucket         |
147|                                    | exception happened during runtime      |
148| ep_tap_keepalive                   | Tap keepalive time                     |
149| ep_dbname                          | DB path                                |
150| ep_io_num_read                     | Number of io read operations           |
151| ep_io_num_write                    | Number of io write operations          |
152| ep_io_read_bytes                   | Number of bytes read (key + values)    |
153| ep_io_write_bytes                  | Number of bytes written (key + values) |
154| ep_pending_ops                     | Number of ops awaiting pending         |
155|                                    | vbuckets                               |
156| ep_pending_ops_total               | Total blocked pending ops since reset  |
157| ep_pending_ops_max                 | Max ops seen awaiting 1 pending        |
158|                                    | vbucket                                |
159| ep_pending_ops_max_duration        | Max time (µs) used waiting on pending  |
160|                                    | vbuckets                               |
161| ep_bg_num_samples                  | The number of samples included in the  |
162|                                    | avgerage                               |
163| ep_bg_min_wait                     | The shortest time (µs) in the wait     |
164|                                    | queue                                  |
165| ep_bg_max_wait                     | The longest time (µs) in the wait      |
166|                                    | queue                                  |
167| ep_bg_wait_avg                     | The average wait time (µs) for an item |
168|                                    | before it's serviced by the dispatcher |
169| ep_bg_min_load                     | The shortest load time (µs)            |
170| ep_bg_max_load                     | The longest load time (µs)             |
171| ep_bg_load_avg                     | The average time (µs) for an item to   |
172|                                    | be loaded from the persistence layer   |
173| ep_num_non_resident                | The number of non-resident items       |
174| ep_bg_wait                         | The total elapse time for the wait     |
175|                                    | queue                                  |
176| ep_bg_load                         | The total elapse time for items to be  |
177|                                    | loaded from the persistence layer      |
178| ep_allow_data_loss_during_shutdown | Whether data loss is allowed during    |
179|                                    | server shutdown                        |
180| ep_alog_block_size                 | Access log block size                  |
181| ep_alog_path                       | Path to the access log                 |
182| ep_alog_sleep_time                 | Interval between access scanner runs   |
183|                                    | in minutes                             |
184| ep_alog_task_time                  | Hour in GMT time when access scanner   |
185|                                    | task is scheduled to run               |
186| ep_backend                         | The backend that is being used for     |
187|                                    | data persistence                       |
188| ep_bg_fetch_delay                  | The amount of time to wait before      |
189|                                    | doing a background fetch               |
190| ep_chk_max_items                   | The number of items allowed in a       |
191|                                    | checkpoint before a new one is created |
192| ep_chk_period                      | The maximum lifetime of a checkpoint   |
193|                                    | before a new one is created            |
194| ep_chk_persistence_remains         | Number of remaining vbuckets for       |
195|                                    | checkpoint persistence                 |
196| ep_chk_persistence_timeout         | Timeout for vbucket checkpoint         |
197|                                    | persistence                            |
198| ep_chk_remover_stime               | The time interval for purging closed   |
199|                                    | checkpoints from memory                |
200| ep_config_file                     | The location of the ep-engine config   |
201|                                    | file                                   |
202| ep_couch_bucket                    | The name of this bucket                |
203| ep_couch_host                      | The hostname that the couchdb views    |
204|                                    | server is listening on                 |
205| ep_couch_port                      | The port the couchdb views server is   |
206|                                    | listening on                           |
207| ep_couch_reconnect_sleeptime       | The amount of time to wait before      |
208|                                    | reconnecting to couchdb                |
209| ep_couch_response_timeout          | Length of time to wait for a response  |
210|                                    | from couchdb before reconnecting       |
211| ep_data_traffic_enabled            | Whether or not data traffic is enabled |
212|                                    | for this bucket                        |
213| ep_db_data_size                    | Total size of valid data in db files   |
214| ep_db_file_size                    | Total size of the db files             |
215| ep_degraded_mode                   | True if the engine is either warming   |
216|                                    | up or data traffic is disabled         |
217| ep_exp_pager_stime                 | The time interval for purging expired  |
218|                                    | items from memory                      |
219| ep_failpartialwarmup               | True if we want kill the bucket if     |
220|                                    | warmup fails                           |
221| ep_flushall_enabled                | True if this bucket allows the use of  |
222|                                    | the flush_all command                  |
223| ep_getl_default_timeout            | The default getl lock duration         |
224| ep_getl_max_timeout                | The maximum getl lock duration         |
225| ep_ht_locks                        | The amount of locks per vb hashtable   |
226| ep_ht_size                         | The initial size of each vb hashtable  |
227| ep_item_num_based_new_chk          | True if the number of items in the     |
228|                                    | current checkpoint plays a role in a   |
229|                                    | new checkpoint creation                |
230| ep_keep_closed_chks                | True if we want to keep the closed     |
231|                                    | checkpoints for each vbucket unless    |
232|                                    | the memory usage is above high water   |
233|                                    | mark                                   |
234| ep_max_checkpoints                 | The maximum amount of checkpoints that |
235|                                    | can be in memory per vbucket           |
236| ep_max_item_size                   | The maximum value size                 |
237| ep_max_size                        | The maximum amount of memory this      |
238|                                    | bucket can use                         |
239| ep_max_vbuckets                    | The maximum amount of vbuckets that    |
240|                                    | can exist in this bucket               |
241| ep_mutation_mem_threshold          | The ratio of total memory available    |
242|                                    | that we should start sending temp oom  |
243|                                    | or oom message when hitting            |
244| ep_pager_active_vb_pcnt            | Active vbuckets paging percentage      |
245| ep_tap_ack_grace_period            | The amount of time to wait for a tap   |
246|                                    | acks before disconnecting              |
247| ep_tap_ack_initial_sequence_number | The initial sequence number for a tap  |
248|                                    | ack when a tap stream is created       |
249| ep_tap_ack_interval                | The amount of messages a tap producer  |
250|                                    | should send before requesting an ack   |
251| ep_tap_ack_window_size             | The maximum amount of ack requests     |
252|                                    | that can be sent before the consumer   |
253|                                    | sends a response ack. When the window  |
254|                                    | is full the tap stream is paused.      |
255| ep_tap_backfill_resident           | The resident ratio for deciding how to |
256|                                    | do backfill. If under the ratio we     |
257|                                    | schedule full disk backfill. If above  |
258|                                    | the ratio then we do bg fetches for    |
259|                                    | non-resident items.                    |
260| ep_tap_backlog_limit               | The maximum amount of backfill items   |
261|                                    | that can be in memory waiting to be    |
262|                                    | sent to the tap consumer               |
263| ep_tap_backoff_period              | The number of seconds the tap          |
264|                                    | connection                             |
265| ep_tap_bg_fetch_requeued           | Number of times a tap bg fetch task is |
266|                                    | requeued                               |
267| ep_tap_bg_max_pending              | The maximum number of bg jobs a tap    |
268|                                    | connection may have                    |
269| ep_tap_noop_interval               | Number of seconds between a noop is    |
270|                                    | sent on an idle connection             |
271| ep_tap_requeue_sleep_time          | The amount of time to wait before a    |
272|                                    | failed tap item is requeued            |
273| ep_tap_throttle_cap_pcnt           | Percentage of total items in write     |
274|                                    | queue at which we throttle tap input   |
275| ep_tap_throttle_queue_cap          | Max size of a write queue to throttle  |
276|                                    | incoming tap input                     |
277| ep_tap_throttle_threshold          | Percentage of max mem at which we      |
278|                                    | begin NAKing tap input                 |
279| ep_uncommitted_items               | The amount of items that have not been |
280|                                    | written to disk                        |
281| ep_vb0                             | Whether vbucket 0 should be created by |
282|                                    | default                                |
283| ep_waitforwarmup                   | True if we should wait for the warmup  |
284|                                    | process to complete before enabling    |
285|                                    | traffic                                |
286| ep_warmup                          | Shows if warmup is enabled / disabled  |
287| ep_warmup_batch_size               | The size of each batch loaded during   |
288|                                    | warmup                                 |
289| ep_warmup_dups                     | Number of Duplicate items encountered  |
290|                                    | during warmup                          |
291| ep_warmup_min_items_threshold      | Percentage of total items warmed up    |
292|                                    | before we enable traffic               |
293| ep_warmup_min_memory_threshold     | Percentage of max mem warmed up before |
294|                                    | we enable traffic                      |
295| ep_warmup_oom                      | The amount of oom errors that occured  |
296|                                    | during warmup                          |
297| ep_warmup_thread                   | The status of the warmup thread        |
298| ep_warmup_time                     | The amount of time warmup took         |
299
300
301** vBucket total stats
302
303| Stat                          | Description                                |
304|-------------------------------+--------------------------------------------|
305| ep_vb_total                   | Total vBuckets (count)                     |
306| curr_items_tot                | Total number of items                      |
307| curr_items                    | Number of active items in memory           |
308| curr_temp_items               | Number of temporary items in memory        |
309| vb_dead_num                   | Number of dead vBuckets                    |
310| ep_diskqueue_items            | Total items in disk queue                  |
311| ep_diskqueue_memory           | Total memory used in disk queue            |
312| ep_diskqueue_fill             | Total enqueued items on disk queue         |
313| ep_diskqueue_drain            | Total drained items on disk queue          |
314| ep_diskqueue_pending          | Total bytes of pending writes              |
315| ep_vb_snapshot_total          | Total VB state snapshots persisted in disk |
316| ep_meta_data_memory           | Total memory used by meta data             |
317
318
319*** Active vBucket class stats
320
321| Stat                          | Description                                |
322|-------------------------------+--------------------------------------------|
323| vb_active_num                 | Number of active vBuckets                  |
324| vb_active_curr_items          | Number of in memory items                  |
325| vb_active_num_non_resident    | Number of non-resident items               |
326| vb_active_perc_mem_resident   | % memory resident                          |
327| vb_active_eject               | Number of times item values got ejected    |
328| vb_active_expired             | Number of times an item was expired        |
329| vb_active_ht_memory           | Memory overhead of the hashtable           |
330| vb_active_itm_memory          | Total item memory                          |
331| vb_active_meta_data_memory    | Total metadata memory                      |
332| vb_active_ops_create          | Number of create operations                |
333| vb_active_ops_update          | Number of update operations                |
334| vb_active_ops_delete          | Number of delete operations                |
335| vb_active_ops_reject          | Number of rejected operations              |
336| vb_active_queue_size          | Active items in disk queue                 |
337| vb_active_queue_memory        | Memory used for disk queue                 |
338| vb_active_queue_age           | Sum of disk queue item age in milliseconds |
339| vb_active_queue_pending       | Total bytes of pending writes              |
340| vb_active_queue_fill          | Total enqueued items                       |
341| vb_active_queue_drain         | Total drained items                        |
342
343*** Replica vBucket stats
344
345| Stat                          | Description                                |
346|-------------------------------+--------------------------------------------|
347| vb_replica_num                | Number of replica vBuckets                 |
348| vb_replica_curr_items         | Number of in memory items                  |
349| vb_replica_num_non_resident   | Number of non-resident items               |
350| vb_replica_perc_mem_resident  | % memory resident                          |
351| vb_replica_eject              | Number of times item values got ejected    |
352| vb_replica_expired            | Number of times an item was expired        |
353| vb_replica_ht_memory          | Memory overhead of the hashtable           |
354| vb_replica_itm_memory         | Total item memory                          |
355| vb_replica_meta_data_memory   | Total metadata memory                      |
356| vb_replica_ops_create         | Number of create operations                |
357| vb_replica_ops_update         | Number of update operations                |
358| vb_replica_ops_delete         | Number of delete operations                |
359| vb_replica_ops_reject         | Number of rejected operations              |
360| vb_replica_queue_size         | Replica items in disk queue                |
361| vb_replica_queue_memory       | Memory used for disk queue                 |
362| vb_replica_queue_age          | Sum of disk queue item age in milliseconds |
363| vb_replica_queue_pending      | Total bytes of pending writes              |
364| vb_replica_queue_fill         | Total enqueued items                       |
365| vb_replica_queue_drain        | Total drained items                        |
366
367*** Pending vBucket stats
368
369| Stat                          | Description                                |
370|-------------------------------+--------------------------------------------|
371| vb_pending_num                | Number of pending vBuckets                 |
372| vb_pending_curr_items         | Number of in memory items                  |
373| vb_pending_num_non_resident   | Number of non-resident items               |
374| vb_pending_perc_mem_resident  | % memory resident                          |
375| vb_pending_eject              | Number of times item values got ejected    |
376| vb_pending_expired            | Number of times an item was expired        |
377| vb_pending_ht_memory          | Memory overhead of the hashtable           |
378| vb_pending_itm_memory         | Total item memory                          |
379| vb_pending_meta_data_memory   | Total metadata memory                      |
380| vb_pending_ops_create         | Number of create operations                |
381| vb_pending_ops_update         | Number of update operations                |
382| vb_pending_ops_delete         | Number of delete operations                |
383| vb_pending_ops_reject         | Number of rejected operations              |
384| vb_pending_queue_size         | Pending items in disk queue                |
385| vb_pending_queue_memory       | Memory used for disk queue                 |
386| vb_pending_queue_age          | Sum of disk queue item age in milliseconds |
387| vb_pending_queue_pending      | Total bytes of pending writes              |
388| vb_pending_queue_fill         | Total enqueued items                       |
389| vb_pending_queue_drain        | Total drained items                        |
390
391** Tap stats
392
393| ep_tap_ack_grace_period        | The amount of time to wait for a tap acks |
394|                                | before disconnecting                      |
395| ep_tap_ack_interval            | The amount of messages a tap producer     |
396|                                | should send before requesting an ack      |
397| ep_tap_ack_window_size         | The maximum amount of ack requests that   |
398|                                | can be sent before the consumer sends a   |
399|                                | response ack. When the window is full the |
400|                                | tap stream is paused                      |
401| ep_tap_queue_backfillremaining | Number of items needing to be backfilled  |
402| ep_tap_total_backlog_size      | Number of remaining items for replication |
403| ep_tap_total_queue             | Sum of tap queue sizes on the current     |
404|                                | tap queues                                |
405| ep_tap_total_fetched           | Sum of all tap messages sent              |
406| ep_tap_bg_max_pending          | The maximum number of bg jobs a tap       |
407|                                | connection may have                       |
408| ep_tap_bg_fetched              | Number of tap disk fetches                |
409| ep_tap_bg_fetch_requeued       | Number of times a tap bg fetch task is    |
410|                                | requeued                                  |
411| ep_tap_fg_fetched              | Number of tap memory fetches              |
412| ep_tap_deletes                 | Number of tap deletion messages sent      |
413| ep_tap_throttled               | Number of tap messages refused due to     |
414|                                | throttling                                |
415| ep_tap_count                   | Number of tap connections                 |
416| ep_tap_bg_num_samples          | The number of tap bg fetch samples        |
417|                                | included in the avg                       |
418| ep_tap_bg_min_wait             | The shortest time (µs) for a tap item     |
419|                                | before it is serviced by the dispatcher   |
420| ep_tap_bg_max_wait             | The longest time (µs) for a tap item      |
421|                                | before it is serviced by the dispatcher   |
422| ep_tap_bg_wait_avg             | The average wait time (µs) for a tap item |
423|                                | before it is serviced by the dispatcher   |
424| ep_tap_bg_min_load             | The shortest time (µs) for a tap item to  |
425|                                | be loaded from the persistence layer      |
426| ep_tap_bg_max_load             | The longest time (µs) for a tap item to   |
427|                                | be loaded from the persistence layer      |
428| ep_tap_bg_load_avg             | The average time (µs) for a tap item to   |
429|                                | be loaded from the persistence layer      |
430| ep_tap_noop_interval           | The number of secs between a noop is      |
431|                                | added to an idle connection               |
432| ep_tap_backoff_period          | The number of seconds the tap connection  |
433|                                | should back off after receiving ETMPFAIL  |
434| ep_tap_queue_fill              | Total enqueued items                      |
435| ep_tap_queue_drain             | Total drained items                       |
436| ep_tap_queue_backoff           | Total back-off items                      |
437| ep_tap_queue_backfill          | Number of backfill remaining              |
438| ep_tap_queue_itemondisk        | Number of items remaining on disk         |
439| ep_tap_throttle_threshold      | Percentage of memory in use before we     |
440|                                | throttle tap streams                      |
441| ep_tap_throttle_queue_cap      | Disk write queue cap to throttle          |
442|                                | tap streams                               |
443
444
445*** Per Tap Client Stats
446
447Each stat begins with =ep_tapq:= followed by a unique /client_id/ and
448another colon.  For example, if your client is named, =slave1=, the
449=qlen= stat would be =ep_tapq:slave1:qlen=.
450
451| type                        | The kind of tap connection (producer or  | PC |
452|                             | consumer)                                |    |
453| created                     | Creation time for the tap connection     | PC |
454| supports_ack                | true if the connection use acks          | PC |
455| connected                   | true if this client is connected         | PC |
456| disconnects                 | Number of disconnects from this client   | PC |
457| reserved                    | true if the tap stream is reserved       | P  |
458| suspended                   | true if the tap stream is suspended      | P  |
459| qlen                        | Queue size for the given client_id       | P  |
460| qlen_high_pri               | High priority tap queue items            | P  |
461| qlen_low_pri                | Low priority tap queue items             | P  |
462| vb_filters                  | Size of connection vbucket filter set    | P  |
463| vb_filter                   | The content of the vbucket filter        | P  |
464| rec_fetched                 | Tap messages sent to the client          | P  |
465| rec_skipped                 | Number of messages skipped due to        | P  |
466|                             | tap reconnect with a different filter    | P  |
467| idle                        | True if this connection is idle          | P  |
468| has_queued_item             | True if there are any remaining items    | P  |
469|                             | from hash table or disk                  |    |
470| bg_result_size              | Number of ready background results       | P  |
471| bg_jobs_issued              | Number of background jobs started        | P  |
472| bg_jobs_completed           | Number of background jobs completed      | P  |
473| flags                       | Connection flags set by the client       | P  |
474| pending_disconnect          | true if we're hanging up on this client  | P  |
475| paused                      | true if this client is blocked           | P  |
476| pending_backfill            | true if we're still backfilling keys     | P  |
477|                             | for this connection                      | P  |
478| pending_disk_backfill       | true if we're still backfilling keys     | P  |
479|                             | from disk for this connection            | P  |
480| backfill_completed          | true if all items from backfill is       | P  |
481|                             | successfully transmitted to the client   | P  |
482| backfill_start_timestamp    | Timestamp of backfill start              | P  |
483| reconnects                  | Number of reconnects from this client    | P  |
484| backfill_age                | The age of the start of the backfill     | P  |
485| ack_seqno                   | The current tap ACK sequence number      | P  |
486| recv_ack_seqno              | Last receive tap ACK sequence number     | P  |
487| ack_log_size                | Tap ACK backlog size                     | P  |
488| ack_window_full             | true if our tap ACK window is full       | P  |
489| seqno_ack_requested         | The seqno of the ack message that the    | P  |
490|                             | producer is wants to get a response for  |    |
491| expires                     | When this ACK backlog expires            | P  |
492| queue_memory                | Memory used for tap queue                | P  |
493| queue_fill                  | Total queued items                       | P  |
494| queue_drain                 | Total drained items                      | P  |
495| queue_backoff               | Total back-off items                     | P  |
496| queue_backfillremaining     | Number of backfill remaining             | P  |
497| queue_itemondisk            | Number of items remaining on disk        | P  |
498| total_backlog_size          | Num of remaining items for replication   | P  |
499| total_noops                 | Number of NOOP messages sent             | P  |
500| num_checkpoint_end          | Number of chkpoint end operations        |  C |
501| num_checkpoint_end_failed   | Number of chkpoint end operations failed |  C |
502| num_checkpoint_start        | Number of chkpoint end operations        |  C |
503| num_checkpoint_start_failed | Number of chkpoint end operations failed |  C |
504| num_delete                  | Number of delete operations              |  C |
505| num_delete_failed           | Number of failed delete operations       |  C |
506| num_flush                   | Number of flush operations               |  C |
507| num_flush_failed            | Number of failed flush operations        |  C |
508| num_mutation                | Number of mutation operations            |  C |
509| num_mutation_failed         | Number of failed mutation operations     |  C |
510| num_opaque                  | Number of opaque operation               |  C |
511| num_opaque_failed           | Number of failed opaque operations       |  C |
512| num_vbucket_set             | Number of vbucket set operations         |  C |
513| num_vbucket_set_failed      | Number of failed vbucket set operations  |  C |
514| num_unknown                 | Number of unknown operations             |  C |
515
516** Tap Aggregated Stats
517
518Aggregated tap stats allow named tap connections to be logically
519grouped and aggregated together by prefixes.
520
521For example, if all of your tap connections started with =rebalance_=
522or =replication_=, you could call =stats tapagg _= to request stats
523grouped by everything before the first =_= character, giving you a set
524for =rebalance= and a set for =replication=.
525
526*** Results
527
528| [prefix]:count              | Number of connections matching this prefix |
529| [prefix]:qlen               | Total length of queues with this prefix    |
530| [prefix]:backfill_remaining | Number of items needing to be backfilled   |
531| [prefix]:backoff            | Total number of backoff events             |
532| [prefix]:drain              | Total number of items drained              |
533| [prefix]:fill               | Total number of items filled               |
534| [prefix]:itemondisk         | Number of items remaining on disk          |
535| [prefix]:total_backlog_size | Num of remaining items for replication     |
536
537** Timing Stats
538
539Timing stats provide histogram data from high resolution timers over
540various operations within the system.
541
542*** General Form
543
544As this data is multi-dimensional, some parsing may be required for
545machine processing.  It's somewhat human readable, but the =stats=
546script mentioned in the Getting Started section above will do fancier
547formatting for you.
548
549Consider the following sample stats:
550
551: STAT disk_insert_8,16 9488
552: STAT disk_insert_16,32 290
553: STAT disk_insert_32,64 73
554: STAT disk_insert_64,128 86
555: STAT disk_insert_128,256 48
556: STAT disk_insert_256,512 2
557: STAT disk_insert_512,1024 12
558: STAT disk_insert_1024,2048 1
559
560This tells you that =disk_insert= took 8-16µs 9,488 times, 16-32µs
561290 times, and so on.
562
563The same stats displayed through the =stats= CLI tool would look like
564this:
565
566: disk_insert (10008 total)
567:    8us - 16us    : ( 94.80%) 9488 ###########################################
568:    16us - 32us   : ( 97.70%)  290 #
569:    32us - 64us   : ( 98.43%)   73
570:    64us - 128us  : ( 99.29%)   86
571:    128us - 256us : ( 99.77%)   48
572:    256us - 512us : ( 99.79%)    2
573:    512us - 1ms   : ( 99.91%)   12
574:    1ms - 2ms     : ( 99.92%)    1
575
576
577*** Available Stats
578
579The following histograms are available from "timings" in the above
580form to describe when time was spent doing various things:
581
582| bg_wait               | bg fetches waiting in the dispatcher queue     |
583| bg_load               | bg fetches waiting for disk                    |
584| set_with_meta         | set_with_meta latencies                        |
585| bg_tap_wait           | tap bg fetches waiting in the dispatcher queue |
586| bg_tap_load           | tap bg fetches waiting for disk                |
587| pending_ops           | client connections blocked for operations      |
588|                       | in pending vbuckets                            |
589| storage_age           | Analogous to ep_storage_age in main stats      |
590| data_age              | Analogous to ep_data_age in main stats         |
591| get_cmd               | servicing get requests                         |
592| arith_cmd             | servicing incr/decr requests                   |
593| get_stats_cmd         | servicing get_stats requests                   |
594| get_vb_cmd            | servicing vbucket status requests              |
595| set_vb_cmd            | servicing vbucket set state commands           |
596| del_vb_cmd            | servicing vbucket deletion commands            |
597| chk_persistence_cmd   | waiting for checkpoint persistence             |
598| tap_vb_set            | servicing tap vbucket set state commands       |
599| tap_vb_reset          | servicing tap vbucket reset commands           |
600| tap_mutation          | servicing tap mutations                        |
601| notify_io             | waking blocked connections                     |
602| paged_out_time        | time (in seconds) objects are non-resident     |
603| disk_insert           | waiting for disk to store a new item           |
604| disk_update           | waiting for disk to modify an existing item    |
605| disk_del              | waiting for disk to delete an item             |
606| disk_vb_del           | waiting for disk to delete a vbucket           |
607| disk_commit           | waiting for a commit after a batch of updates  |
608| disk_vbstate_snapshot | Time spent persisting vbucket state changes    |
609| item_alloc_sizes      | Item allocation size counters (in bytes)       |
610
611** Hash Stats
612
613Hash stats provide information on your vbucket hash tables.
614
615Requesting these stats does affect performance, so don't do it too
616regularly, but it's useful for debugging certain types of performance
617issues.  For example, if your hash table is tuned to have too few
618buckets for the data load within it, the =max_depth= will be too large
619and performance will suffer.
620
621| avg_count    | The average number of items per vbucket                  |
622| avg_max      | The average max depth of a vbucket hash table            |
623| avg_min      | The average min depth of a vbucket hash table            |
624| largest_max  | The largest hash table depth of in all vbuckets          |
625| largest_min  | The the largest minimum hash table depth of all vbuckets |
626| max_count    | The largest number of items in a vbucket                 |
627| min_count    | The smallest number of items in a vbucket                |
628| total_counts | The total numer of items in all vbuckets                 |
629
630It is also possible to get more detailed hash tables stats by using
631'hash detail'. This will print per-vbucket stats.
632
633Each stat is prefixed with =vb_= followed by a number, a colon, then
634the individual stat name.
635
636For example, the stat representing the size of the hash table for
637vbucket 0 is =vb_0:size=.
638
639| state            | The current state of this vbucket                |
640| size             | Number of hash buckets                           |
641| locks            | Number of locks covering hash table operations   |
642| min_depth        | Minimum number of items found in a bucket        |
643| max_depth        | Maximum number of items found in a bucket        |
644| reported         | Number of items this hash table reports having   |
645| counted          | Number of items found while walking the table    |
646| resized          | Number of times the hash table resized           |
647| mem_size         | Running sum of memory used by each item          |
648| mem_size_counted | Counted sum of current memory used by each item  |
649
650** Checkpoint Stats
651
652Checkpoint stats provide detailed information on per-vbucket checkpoint
653datastructure.
654
655Like Hash stats, requesting these stats has some impact on performance.
656Therefore, please do not poll them from the server frequently.
657Each stat is prefixed with =vb_= followed by a number, a colon, and then
658each stat name.
659
660| cursor_name:cursor_checkpoint_id | Checkpoint ID at which the cursor is      |
661|                                  | name 'cursor_name' is pointing now        |
662| open_checkpoint_id               | ID of the current open checkpoint         |
663| num_tap_cursors                  | Number of referencing TAP cursors         |
664| num_checkpoint_items             | Number of total items in a checkpoint     |
665|                                  | datastructure                             |
666| num_open_checkpoint_items        | Number of items in the open checkpoint    |
667| num_checkpoints                  | Number of checkpoints in a checkpoint     |
668|                                  | datastructure                             |
669| num_items_for_persistence        | Number of items remaining for persistence |
670| state                            | The state of the vbucket this checkpoint  |
671|                                  | contains data for                         |
672| last_closed_checkpoint_id        | The last closed checkpoint number         |
673| persisted_checkpoint_id          | The slast persisted checkpoint number     |
674
675** Memory Stats
676
677This provides various memory-related stats including the stats from tcmalloc.
678Note that tcmalloc stats are not available on some operating systems
679(e.g., Windows) that do not support tcmalloc.
680
681| mem_used (deprecated)               | Engine's total memory usage          |
682| bytes                               | Engine's total memory usage          |
683| ep_kv_size                          | Memory used to store item metadata,  |
684|                                     | keys and values, no matter the       |
685|                                     | vbucket's state. If an item's value  |
686|                                     | is ejected, this stat will be        |
687|                                     | decremented by the size of the       |
688|                                     | item's value.                        |
689| ep_value_size                       | Memory used to store values for      |
690|                                     | resident keys                        |
691| ep_overhead                         | Extra memory used by transient data  |
692|                                     | like persistence queue, replication  |
693|                                     | queues, checkpoints, etc             |
694| ep_max_size                         | Max amount of data allowed in memory |
695| ep_mem_low_wat                      | Low water mark for auto-evictions    |
696| ep_mem_high_wat                     | High water mark for auto-evictions   |
697| ep_oom_errors                       | Number of times unrecoverable OOMs   |
698|                                     | happened while processing operations |
699| ep_tmp_oom_errors                   | Number of times temporary OOMs       |
700|                                     | happened while processing operations |
701| ep_mem_tracker_enabled              | If smart memory tracking is enabled  |
702| tcmalloc_allocated_bytes            | Engine's total memory usage reported |
703|                                     | from tcmalloc                        |
704| tcmalloc_heap_size                  | Bytes of system memory reserved by   |
705|                                     | tcmalloc                             |
706| tcmalloc_free_bytes                 | Number of bytes in free, mapped      |
707|                                     | pages in page heap                   |
708| tcmalloc_unmapped_bytes             | Number of bytes in free, unmapped    |
709|                                     | pages in page heap. These are bytes  |
710|                                     | that have been released back to OS   |
711| tcmalloc_max_thread_cache_bytes     | A limit to how much memory TCMalloc  |
712|                                     | dedicates for small objects          |
713| tcmalloc_current_thread_cache_bytes | A measure of some of the memory      |
714|                                     | TCMalloc is using for small objects  |
715
716
717** Stats Key and Vkey
718| key_cas                       | The keys current cas value             |KV|
719| key_data_age                  | How long the key has waited for its    |KV|
720|                               | value to be persisted (0 if clean)     |KV|
721| key_exptime                   | Expiration time from the epoch         |KV|
722| key_flags                     | Flags for this key                     |KV|
723| key_is_dirty                  | If the value is not yet persisted      |KV|
724| key_last_modified_time        | Last updated time                      |KV|
725| key_valid                     | See description below                  | V|
726| key_vb_state                  | The vbucket state of this key          |KV|
727
728=key_valid= can have the following responses:
729
730this_is_a_bug - Some case we didn't take care of.
731dirty - The value in memory has not been persisted yet.
732length_mismatch - The key length in memory doesn't match the length on disk.
733data_mismatch - The data in memroy doesn't match the data on disk.
734flags_mismatch - The flags in memory don't match the flags on disk.
735valid - The key is both on disk and in memory
736ram_but_not_disk - The value doesn't exist yet on disk.
737item_deleted - The item has been deleted.
738
739** Warmup
740
741Stats =warmup= shows statistics related to warmup logic
742
743| ep_warmup                       | Shows if warmup is enabled / disabled      |
744| ep_warmup_estimated_key_count   | Estimated number of keys in database       |
745| ep_warmup_estimated_value_count | Estimated number of values in database     |
746| ep_warmup_state                 | The current state of the warmup thread     |
747| ep_warmup_thread                | Warmup thread status                       |
748| ep_warmup_key_count             | Number of keys warmed up                   |
749| ep_warmup_value_count           | Number of values warmed up                 |
750| ep_warmup_dups                  | Duplicates encountered during warmup       |
751| ep_warmup_oom                   | OOMs encountered during warmup             |
752| ep_warmup_item_expired          | Number of items expired during warmup      |
753| ep_warmup_time                  | Time (µs) spent by warming data            |
754| ep_warmup_keys_time             | Time (µs) spent by warming keys            |
755| ep_warmup_mutation_log          | Number of keys present in mutation log     |
756| ep_warmup_access_log            | Number of keys present in access log       |
757| ep_warmup_min_items_threshold   | Percentage of total items warmed up        |
758|                                 | before we enable traffic                   |
759| ep_warmup_min_memory_threshold  | Percentage of max mem warmed up before     |
760|                                 | we enable traffic                          |
761
762
763** KV Store Stats
764
765These provide various low-level stats and timings from the underlying KV
766storage system and useful to understand various states of the storage
767system.
768
769The following stats are available for all database engine:
770
771| open              | Number of database open operations                 |
772| close             | Number of database close operations                |
773| readTime          | Time spent in read operations                      |
774| readSize          | Size of data in read operations                    |
775| writeTime         | Time spent in write operations                     |
776| writeSize         | Size of data in write operations                   |
777| delete            | Time spent  in delete() calls                      |
778
779The following stats are available for the CouchStore database engine:
780
781| backend_type      | Type of backend database engine                    |
782| commit            | Time spent in CouchStore commit operation          |
783| compaction        | Time spent in compacting vbucket database file     |
784| numLoadedVb       | Number of Vbuckets loaded into memory              |
785| lastCommDocs      | Number of docs in the last commit                  |
786| failure_set       | Number of failed set operation                     |
787| failure_get       | Number of failed get operation                     |
788| failure_vbset     | Number of failed vbucket set operation             |
789| save_documents    | Time spent in CouchStore save documents operation  |
790
791** KV Store Timing Stats
792
793KV Store Timing stats provide timing information from the underlying storage
794system. These stats are on shard (group of partitions) level.
795
796*** Available Stats
797The following histograms are available from "kvtimings" in the form
798described in Timings section above. These stats are prefixed with the
799rw_<Shard number>: indicating the times spent doing various things:
800
801| commit                | time spent in commit operations                |
802| compact               | time spent in file compaction operations       |
803| delete                | time spent in delete operations                |
804| save_documents        | time spent in persisting documents in storage  |
805| writeTime             | time spent in writing to storage subsystem     |
806| writeSize             | sizes of writes given to storage subsystem     |
807| bulkSize              | batch sizes of the save documents calls        |
808| fsReadTime            | time spent in doing filesystem reads           |
809| fsWriteTime           | time spent in doing filesystem writes          |
810| fsSyncTime            | time spent in doing filesystem sync operations |
811| fsReadSize            | sizes of various filesystem reads issued       |
812| fsWriteSize           | sizes of various filesystem writes issued      |
813| fsReadSeek            | values of various seek operations in file      |
814
815
816** Workload Raw Stats
817Some information about the number of shards and Executor pool information.
818These are available as "raw workload" stats:
819
820| ep_workload:num_shards  | number of shards or groups of partitions     |
821| ep_workload:num_writers | number of threads that prioritize write ops  |
822| ep_workload:num_readers | number of threads that prioritize read ops   |
823| ep_workload:num_auxio   | number of threads that prioritize aux io ops |
824| ep_workload:num_nonio   | number of threads that prioritize non io ops |
825
826Additionally the following stats on the current state of the TaskQueues are
827also presented
828| HiPrioQ_Writer:InQsize   | count high priority bucket writer tasks waiting  |
829| HiPrioQ_Writer:OutQsize  | count high priority bucket writer tasks runnable |
830| HiPrioQ_Reader:InQsize   | count high priority bucket reader tasks waiting  |
831| HiPrioQ_Reader:OutQsize  | count high priority bucket reader tasks runnable |
832| HiPrioQ_AuxIO:InQsize    | count high priority bucket auxio  tasks waiting  |
833| HiPrioQ_AuxIO:OutQsize   | count high priority bucket auxio  tasks runnable |
834| HiPrioQ_NonIO:InQsize    | count high priority bucket nonio  tasks waiting  |
835| HiPrioQ_NonIO:OutQsize   | count high priority bucket nonio  tasks runnable |
836| LowPrioQ_Writer:InQsize  | count low priority bucket writer tasks waiting   |
837| LowPrioQ_Writer:OutQsize | count low priority bucket writer tasks runnable  |
838| LowPrioQ_Reader:InQsize  | count low priority bucket reader tasks waiting   |
839| LowPrioQ_Reader:OutQsize | count low priority bucket reader tasks runnable  |
840| LowPrioQ_AuxIO:InQsize   | count low priority bucket auxio  tasks waiting   |
841| LowPrioQ_AuxIO:OutQsize  | count low priority bucket auxio  tasks runnable  |
842| LowPrioQ_NonIO:InQsize   | count low priority bucket nonio  tasks waiting   |
843| LowPrioQ_NonIO:OutQsize  | count low priority bucket nonio  tasks runnable  |
844| shard#_pendingTasks      | number of tasks blocked by shard serialization   |
845| shard#_locked            | true or false based on shard serialization       |
846
847** Dispatcher Stats/JobLogs
848
849This provides the stats from AUX dispatcher and non-IO dispatcher, and
850from all the reader and writer threads running for the specific bucket.
851Along with stats, the job logs for each of the dispatchers and worker
852threads is also made available.
853
854The following stats are available for the workers and dispatchers:
855
856| state             | Threads's current status: running, sleeping etc.              |
857| runtime           | The amount of time since the thread started running           |
858| task              | The activity/job the thread is involved with at the moment    |
859
860The following stats are for individual job logs:
861
862| starttime         | The timestamp when the job started                            |
863| runtime           | Time it took for the job to run                               |
864| task              | The activity/job the thread ran during that time              |
865
866
867** Stats Reset
868
869Resets the list of stats below.
870
871Reset Stats:
872
873| ep_bg_load                        |
874| ep_bg_wait                        |
875| ep_bg_max_load                    |
876| ep_bg_min_load                    |
877| ep_bg_max_wait                    |
878| ep_bg_min_wait                    |
879| ep_commit_time                    |
880| ep_flush_duration                 |
881| ep_flush_duration_highwat         |
882| ep_io_num_read                    |
883| ep_io_num_write                   |
884| ep_io_read_bytes                  |
885| ep_io_write_bytes                 |
886| ep_items_rm_from_checkpoints      |
887| ep_num_eject_failures             |
888| ep_num_pager_runs                 |
889| ep_num_not_my_vbuckets            |
890| ep_num_value_ejects               |
891| ep_pending_ops_max                |
892| ep_pending_ops_max_duration       |
893| ep_pending_ops_total              |
894| ep_storage_age                    |
895| ep_storage_age_highwat            |
896| ep_too_old                        |
897| ep_too_young                      |
898| ep_tap_bg_load_avg                |
899| ep_tap_bg_max_load                |
900| ep_tap_bg_max_wait                |
901| ep_tap_bg_min_load                |
902| ep_tap_bg_min_wait                |
903| ep_tap_bg_wait_avg                |
904| ep_tap_throttled                  |
905| ep_tap_total_fetched              |
906| ep_vbucket_del_max_walltime       |
907| pending_ops                       |
908
909Reset Histograms:
910
911| bg_load                           |
912| bg_wait                           |
913| bg_tap_load                       |
914| bg_tap_wait                       |
915| chk_persistence_cmd               |
916| data_age                          |
917| del_vb_cmd                        |
918| disk_insert                       |
919| disk_update                       |
920| disk_del                          |
921| disk_vb_del                       |
922| disk_commit                       |
923| get_stats_cmd                     |
924| item_alloc_sizes                  |
925| get_vb_cmd                        |
926| notify_io                         |
927| pending_ops                       |
928| set_vb_cmd                        |
929| storage_age                       |
930| tap_mutation                      |
931| tap_vb_reset                      |
932| tap_vb_set                        |
933
934
935* Details
936
937** Ages
938
939The difference between =ep_storage_age= and =ep_data_age= is somewhat
940subtle, but when you consider that a given record may be updated
941multiple times before hitting persistence, it starts to be clearer.
942
943=ep_data_age= is how old the data we actually wrote is.
944
945=ep_storage_age= is how long the object has been waiting to be
946persisted.
947
948** Warming Up
949
950Opening the data store is broken into three distinct phases:
951
952*** Initializing
953
954During the initialization phase, the server is not accepting
955connections or otherwise functional.  This is often quick, but in a
956server crash can take some time to perform recovery of the underlying
957storage.
958
959This time is made available via the =ep_dbinit= stat.
960
961*** Warming Up
962
963After initialization, warmup begins.  At this point, the server is
964capable of taking new writes and responding to reads.  However, only
965records that have been pulled out of the storage or have been updated
966from other clients will be available for request.
967
968(note that records read from persistence will not overwrite new
969records captured from the network)
970
971During this phase, =ep_warmup_thread= will report =running= and
972=ep_warmed_up= will be increasing as records are being read.
973
974*** Complete
975
976Once complete, =ep_warmed_up= will stop increasing and
977=ep_warmup_thread= will report =complete=.
978
979* Uuid
980The uuid stats allows clients to check if the unique identifier created
981and assigned to the bucket when it is created. By looking at this a client
982can verify that the bucket hasn't been recreated since it was used.
983