xref: /3.0.3-GA/ep-engine/docs/stats.org (revision 6dbd231f)
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_blob_num                        | The number of blob objects in the cache|
104| ep_blob_overhead                   | The "unused" memory caused by the      |
105|                                    | allocator returning bigger chunks than |
106|                                    | requested                              |
107| ep_value_size                      | Memory used to store values for        |
108|                                    | resident keys                          |
109| ep_storedval_size                  | Memory used by storedval objects       |
110| ep_storedval_overhead              | The "unused" memory caused by the      |
111|                                    | allocator returning bigger chunks than |
112|                                    | requested                              |
113| ep_storedval_num                   | The number of storedval objects        |
114|                                    | allocated                              |
115| ep_overhead                        | Extra memory used by transient data    |
116|                                    | like persistence queues, replication   |
117|                                    | queues, checkpoints, etc               |
118| ep_item_num                        | The number of item objects allocated   |
119| ep_mem_low_wat                     | Low water mark for auto-evictions      |
120| ep_mem_high_wat                    | High water mark for auto-evictions     |
121| ep_total_cache_size                | The total byte size of all items, no   |
122|                                    | matter the vbucket's state, no matter  |
123|                                    | if an item's value is ejected          |
124| ep_oom_errors                      | Number of times unrecoverable OOMs     |
125|                                    | happened while processing operations   |
126| ep_tmp_oom_errors                  | Number of times temporary OOMs         |
127|                                    | happened while processing operations   |
128| ep_mem_tracker_enabled             | True if memory usage tracker is        |
129|                                    | enabled                                |
130| ep_bg_fetched                      | Number of items fetched from disk      |
131| ep_bg_meta_fetched                 | Number of meta items fetched from disk |
132| ep_bg_remaining_jobs               | Number of remaining bg fetch jobs      |
133| ep_max_bg_remaining_jobs           | Max number of remaining bg fetch jobs  |
134|                                    | that we have seen in the queue so far  |
135| ep_tap_bg_fetched                  | Number of tap disk fetches             |
136| ep_tap_bg_fetch_requeued           | Number of times a tap bg fetch task is |
137|                                    | requeued                               |
138| ep_num_pager_runs                  | Number of times we ran pager loops     |
139|                                    | to seek additional memory              |
140| ep_num_expiry_pager_runs           | Number of times we ran expiry pager    |
141|                                    | loops to purge expired items from      |
142|                                    | memory/disk                            |
143| ep_num_access_scanner_runs         | Number of times we ran accesss scanner |
144|                                    | to snapshot working set                |
145| ep_access_scanner_num_items        | Number of items that last access       |
146|                                    | scanner task swept to access log.      |
147| ep_access_scanner_task_time        | Time of the next access scanner task   |
148|                                    | (GMT)                                  |
149| ep_access_scanner_last_runtime     | Number of seconds that last access     |
150|                                    | scanner task took to complete.         |
151| ep_items_rm_from_checkpoints       | Number of items removed from closed    |
152|                                    | unreferenced checkpoints               |
153| ep_num_value_ejects                | Number of times item values got        |
154|                                    | ejected from memory to disk            |
155| ep_num_eject_failures              | Number of items that could not be      |
156|                                    | ejected                                |
157| ep_num_not_my_vbuckets             | Number of times Not My VBucket         |
158|                                    | exception happened during runtime      |
159| ep_tap_keepalive                   | Tap keepalive time                     |
160| ep_dbname                          | DB path                                |
161| ep_io_num_read                     | Number of io read operations           |
162| ep_io_num_write                    | Number of io write operations          |
163| ep_io_read_bytes                   | Number of bytes read (key + values)    |
164| ep_io_write_bytes                  | Number of bytes written (key + values) |
165| ep_pending_ops                     | Number of ops awaiting pending         |
166|                                    | vbuckets                               |
167| ep_pending_ops_total               | Total blocked pending ops since reset  |
168| ep_pending_ops_max                 | Max ops seen awaiting 1 pending        |
169|                                    | vbucket                                |
170| ep_pending_ops_max_duration        | Max time (µs) used waiting on pending  |
171|                                    | vbuckets                               |
172| ep_bg_num_samples                  | The number of samples included in the  |
173|                                    | avgerage                               |
174| ep_bg_min_wait                     | The shortest time (µs) in the wait     |
175|                                    | queue                                  |
176| ep_bg_max_wait                     | The longest time (µs) in the wait      |
177|                                    | queue                                  |
178| ep_bg_wait_avg                     | The average wait time (µs) for an item |
179|                                    | before it's serviced by the dispatcher |
180| ep_bg_min_load                     | The shortest load time (µs)            |
181| ep_bg_max_load                     | The longest load time (µs)             |
182| ep_bg_load_avg                     | The average time (µs) for an item to   |
183|                                    | be loaded from the persistence layer   |
184| ep_num_non_resident                | The number of non-resident items       |
185| ep_bg_wait                         | The total elapse time for the wait     |
186|                                    | queue                                  |
187| ep_bg_load                         | The total elapse time for items to be  |
188|                                    | loaded from the persistence layer      |
189| ep_allow_data_loss_during_shutdown | Whether data loss is allowed during    |
190|                                    | server shutdown                        |
191| ep_alog_block_size                 | Access log block size                  |
192| ep_alog_path                       | Path to the access log                 |
193| ep_alog_sleep_time                 | Interval between access scanner runs   |
194|                                    | in minutes                             |
195| ep_alog_task_time                  | Hour in GMT time when access scanner   |
196|                                    | task is scheduled to run               |
197| ep_backend                         | The backend that is being used for     |
198|                                    | data persistence                       |
199| ep_backfill_mem_threshold          | The maximum percentage of memory that  |
200|                                    | the backfill task can consume before   |
201|                                    | it is made to back off.                |
202| ep_bg_fetch_delay                  | The amount of time to wait before      |
203|                                    | doing a background fetch               |
204| ep_chk_max_items                   | The number of items allowed in a       |
205|                                    | checkpoint before a new one is created |
206| ep_chk_period                      | The maximum lifetime of a checkpoint   |
207|                                    | before a new one is created            |
208| ep_chk_persistence_remains         | Number of remaining vbuckets for       |
209|                                    | checkpoint persistence                 |
210| ep_chk_persistence_timeout         | Timeout for vbucket checkpoint         |
211|                                    | persistence                            |
212| ep_chk_remover_stime               | The time interval for purging closed   |
213|                                    | checkpoints from memory                |
214| ep_config_file                     | The location of the ep-engine config   |
215|                                    | file                                   |
216| ep_couch_bucket                    | The name of this bucket                |
217| ep_couch_host                      | The hostname that the couchdb views    |
218|                                    | server is listening on                 |
219| ep_couch_port                      | The port the couchdb views server is   |
220|                                    | listening on                           |
221| ep_couch_reconnect_sleeptime       | The amount of time to wait before      |
222|                                    | reconnecting to couchdb                |
223| ep_couch_response_timeout          | Length of time to wait for a response  |
224|                                    | from couchdb before reconnecting       |
225| ep_data_traffic_enabled            | Whether or not data traffic is enabled |
226|                                    | for this bucket                        |
227| ep_db_data_size                    | Total size of valid data in db files   |
228| ep_db_file_size                    | Total size of the db files             |
229| ep_degraded_mode                   | True if the engine is either warming   |
230|                                    | up or data traffic is disabled         |
231| ep_enable_chk_merge                | True if merging closed checkpoints is  |
232|                                    | enabled.                               |
233| ep_exp_pager_stime                 | The time interval for purging expired  |
234|                                    | items from memory                      |
235| ep_failpartialwarmup               | True if we want kill the bucket if     |
236|                                    | warmup fails                           |
237| ep_flushall_enabled                | True if this bucket allows the use of  |
238|                                    | the flush_all command                  |
239| ep_getl_default_timeout            | The default getl lock duration         |
240| ep_getl_max_timeout                | The maximum getl lock duration         |
241| ep_ht_locks                        | The amount of locks per vb hashtable   |
242| ep_ht_size                         | The initial size of each vb hashtable  |
243| ep_item_num_based_new_chk          | True if the number of items in the     |
244|                                    | current checkpoint plays a role in a   |
245|                                    | new checkpoint creation                |
246| ep_keep_closed_chks                | True if we want to keep the closed     |
247|                                    | checkpoints for each vbucket unless    |
248|                                    | the memory usage is above high water   |
249|                                    | mark                                   |
250| ep_max_checkpoints                 | The maximum amount of checkpoints that |
251|                                    | can be in memory per vbucket           |
252| ep_max_item_size                   | The maximum value size                 |
253| ep_max_size                        | The maximum amount of memory this      |
254|                                    | bucket can use                         |
255| ep_max_vbuckets                    | The maximum amount of vbuckets that    |
256|                                    | can exist in this bucket               |
257| ep_mutation_mem_threshold          | The ratio of total memory available    |
258|                                    | that we should start sending temp oom  |
259|                                    | or oom message when hitting            |
260| ep_pager_active_vb_pcnt            | Active vbuckets paging percentage      |
261| ep_tap_ack_grace_period            | The amount of time to wait for a tap   |
262|                                    | acks before disconnecting              |
263| ep_tap_ack_initial_sequence_number | The initial sequence number for a tap  |
264|                                    | ack when a tap stream is created       |
265| ep_tap_ack_interval                | The amount of messages a tap producer  |
266|                                    | should send before requesting an ack   |
267| ep_tap_ack_window_size             | The maximum amount of ack requests     |
268|                                    | that can be sent before the consumer   |
269|                                    | sends a response ack. When the window  |
270|                                    | is full the tap stream is paused.      |
271| ep_tap_backfill_resident           | The resident ratio for deciding how to |
272|                                    | do backfill. If under the ratio we     |
273|                                    | schedule full disk backfill. If above  |
274|                                    | the ratio then we do bg fetches for    |
275|                                    | non-resident items.                    |
276| ep_tap_backlog_limit               | The maximum amount of backfill items   |
277|                                    | that can be in memory waiting to be    |
278|                                    | sent to the tap consumer               |
279| ep_tap_backoff_period              | The number of seconds the tap          |
280|                                    | connection                             |
281| ep_tap_bg_fetch_requeued           | Number of times a tap bg fetch task is |
282|                                    | requeued                               |
283| ep_tap_bg_max_pending              | The maximum number of bg jobs a tap    |
284|                                    | connection may have                    |
285| ep_tap_noop_interval               | Number of seconds between a noop is    |
286|                                    | sent on an idle connection             |
287| ep_tap_requeue_sleep_time          | The amount of time to wait before a    |
288|                                    | failed tap item is requeued            |
289| ep_tap_throttle_cap_pcnt           | Percentage of total items in write     |
290|                                    | queue at which we throttle tap input   |
291| ep_tap_throttle_queue_cap          | Max size of a write queue to throttle  |
292|                                    | incoming tap input                     |
293| ep_tap_throttle_threshold          | Percentage of max mem at which we      |
294|                                    | begin NAKing tap input                 |
295| ep_uncommitted_items               | The amount of items that have not been |
296|                                    | written to disk                        |
297| ep_vb0                             | Whether vbucket 0 should be created by |
298|                                    | default                                |
299| ep_waitforwarmup                   | True if we should wait for the warmup  |
300|                                    | process to complete before enabling    |
301|                                    | traffic                                |
302| ep_warmup                          | Shows if warmup is enabled / disabled  |
303| ep_warmup_batch_size               | The size of each batch loaded during   |
304|                                    | warmup                                 |
305| ep_warmup_dups                     | Number of Duplicate items encountered  |
306|                                    | during warmup                          |
307| ep_warmup_min_items_threshold      | Percentage of total items warmed up    |
308|                                    | before we enable traffic               |
309| ep_warmup_min_memory_threshold     | Percentage of max mem warmed up before |
310|                                    | we enable traffic                      |
311| ep_warmup_oom                      | The amount of oom errors that occured  |
312|                                    | during warmup                          |
313| ep_warmup_thread                   | The status of the warmup thread        |
314| ep_warmup_time                     | The amount of time warmup took         |
315| ep_workload_pattern                | Workload pattern (mixed, read_heavy,   |
316|                                    | write_heavy) monitored at runtime      |
317
318
319** vBucket total stats
320
321| Stat                          | Description                                |
322|-------------------------------+--------------------------------------------|
323| ep_vb_total                   | Total vBuckets (count)                     |
324| curr_items_tot                | Total number of items                      |
325| curr_items                    | Number of active items in memory           |
326| curr_temp_items               | Number of temporary items in memory        |
327| vb_dead_num                   | Number of dead vBuckets                    |
328| ep_diskqueue_items            | Total items in disk queue                  |
329| ep_diskqueue_memory           | Total memory used in disk queue            |
330| ep_diskqueue_fill             | Total enqueued items on disk queue         |
331| ep_diskqueue_drain            | Total drained items on disk queue          |
332| ep_diskqueue_pending          | Total bytes of pending writes              |
333| ep_vb_snapshot_total          | Total VB state snapshots persisted in disk |
334| ep_meta_data_memory           | Total memory used by meta data             |
335| ep_meta_data_disk             | Total disk used by meta data               |
336
337*** Active vBucket class stats
338
339| Stat                          | Description                                |
340|-------------------------------+--------------------------------------------|
341| vb_active_num                 | Number of active vBuckets                  |
342| vb_active_curr_items          | Number of in memory items                  |
343| vb_active_num_non_resident    | Number of non-resident items               |
344| vb_active_perc_mem_resident   | % memory resident                          |
345| vb_active_eject               | Number of times item values got ejected    |
346| vb_active_expired             | Number of times an item was expired        |
347| vb_active_ht_memory           | Memory overhead of the hashtable           |
348| vb_active_itm_memory          | Total item memory                          |
349| vb_active_meta_data_memory    | Total metadata memory                      |
350| vb_active_meta_data_disk      | Total metadata disk                        |
351| vb_active_ops_create          | Number of create operations                |
352| vb_active_ops_update          | Number of update operations                |
353| vb_active_ops_delete          | Number of delete operations                |
354| vb_active_ops_reject          | Number of rejected operations              |
355| vb_active_queue_size          | Active items in disk queue                 |
356| vb_active_queue_memory        | Memory used for disk queue                 |
357| vb_active_queue_age           | Sum of disk queue item age in milliseconds |
358| vb_active_queue_pending       | Total bytes of pending writes              |
359| vb_active_queue_fill          | Total enqueued items                       |
360| vb_active_queue_drain         | Total drained items                        |
361
362*** Replica vBucket stats
363
364| Stat                          | Description                                |
365|-------------------------------+--------------------------------------------|
366| vb_replica_num                | Number of replica vBuckets                 |
367| vb_replica_curr_items         | Number of in memory items                  |
368| vb_replica_num_non_resident   | Number of non-resident items               |
369| vb_replica_perc_mem_resident  | % memory resident                          |
370| vb_replica_eject              | Number of times item values got ejected    |
371| vb_replica_expired            | Number of times an item was expired        |
372| vb_replica_ht_memory          | Memory overhead of the hashtable           |
373| vb_replica_itm_memory         | Total item memory                          |
374| vb_replica_meta_data_memory   | Total metadata memory                      |
375| vb_replica_meta_data_disk     | Total metadata disk                        |
376| vb_replica_ops_create         | Number of create operations                |
377| vb_replica_ops_update         | Number of update operations                |
378| vb_replica_ops_delete         | Number of delete operations                |
379| vb_replica_ops_reject         | Number of rejected operations              |
380| vb_replica_queue_size         | Replica items in disk queue                |
381| vb_replica_queue_memory       | Memory used for disk queue                 |
382| vb_replica_queue_age          | Sum of disk queue item age in milliseconds |
383| vb_replica_queue_pending      | Total bytes of pending writes              |
384| vb_replica_queue_fill         | Total enqueued items                       |
385| vb_replica_queue_drain        | Total drained items                        |
386
387*** Pending vBucket stats
388
389| Stat                          | Description                                |
390|-------------------------------+--------------------------------------------|
391| vb_pending_num                | Number of pending vBuckets                 |
392| vb_pending_curr_items         | Number of in memory items                  |
393| vb_pending_num_non_resident   | Number of non-resident items               |
394| vb_pending_perc_mem_resident  | % memory resident                          |
395| vb_pending_eject              | Number of times item values got ejected    |
396| vb_pending_expired            | Number of times an item was expired        |
397| vb_pending_ht_memory          | Memory overhead of the hashtable           |
398| vb_pending_itm_memory         | Total item memory                          |
399| vb_pending_meta_data_memory   | Total metadata memory                      |
400| vb_pending_meta_data_disk     | Total metadata disk                        |
401| vb_pending_ops_create         | Number of create operations                |
402| vb_pending_ops_update         | Number of update operations                |
403| vb_pending_ops_delete         | Number of delete operations                |
404| vb_pending_ops_reject         | Number of rejected operations              |
405| vb_pending_queue_size         | Pending items in disk queue                |
406| vb_pending_queue_memory       | Memory used for disk queue                 |
407| vb_pending_queue_age          | Sum of disk queue item age in milliseconds |
408| vb_pending_queue_pending      | Total bytes of pending writes              |
409| vb_pending_queue_fill         | Total enqueued items                       |
410| vb_pending_queue_drain        | Total drained items                        |
411
412
413** vBucket detail stats
414
415The stats below are listed for each vbucket.
416
417| Stat                          | Description                                |
418|-------------------------------+--------------------------------------------|
419| num_items                     | Number of items in this vbucket            |
420| num_tmp_items                 | Number of temporary items in memory        |
421| num_non_resident              | Number of non-resident items               |
422| vb_pending_perc_mem_resident  | % memory resident                          |
423| vb_pending_eject              | Number of times item values got ejected    |
424| vb_pending_expired            | Number of times an item was expired        |
425| ht_memory                     | Memory overhead of the hashtable           |
426| ht_item_memory                | Total item memory                          |
427| ht_cache_size                 | Total size of cache (Includes non resident |
428|                               | items)                                     |
429| num_ejects                    | Number of times an item was ejected from   |
430|                               | memory                                     |
431| ops_create                    | Number of create operations                |
432| ops_update                    | Number of update operations                |
433| ops_delete                    | Number of delete operations                |
434| ops_reject                    | Number of rejected operations              |
435| queue_size                    | Pending items in disk queue                |
436| queue_memory                  | Memory used for disk queue                 |
437| queue_age                     | Sum of disk queue item age in milliseconds |
438| queue_fill                    | Total enqueued items                       |
439| queue_drain                   | Total drained items                        |
440| pending writes                | Total bytes of pending writes              |
441| db_data_size                  | Total size of valid data on disk           |
442| db_file_size                  | Total size of the db file                  |
443| high_seqno                    | The last seqno assigned by this vbucket    |
444| purge_seqno                   | The last seqno purged by the compactor     |
445| uuid                          | The current vbucket uuid                   |
446
447** vBucket seqno stats
448
449| Stats                         | Description                                |
450| ------------------------------+--------------------------------------------|
451| high_seqno                    | The last seqno assigned by this vbucket    |
452| purge_seqno                   | The last seqno purged by the compactor     |
453| uuid                          | The current vbucket uuid                   |
454
455
456
457** Tap stats
458
459| ep_tap_ack_grace_period        | The amount of time to wait for a tap acks |
460|                                | before disconnecting                      |
461| ep_tap_ack_interval            | The amount of messages a tap producer     |
462|                                | should send before requesting an ack      |
463| ep_tap_ack_window_size         | The maximum amount of ack requests that   |
464|                                | can be sent before the consumer sends a   |
465|                                | response ack. When the window is full the |
466|                                | tap stream is paused                      |
467| ep_tap_queue_backfillremaining | Number of items needing to be backfilled  |
468| ep_tap_total_backlog_size      | Number of remaining items for replication |
469| ep_tap_total_queue             | Sum of tap queue sizes on the current     |
470|                                | tap queues                                |
471| ep_tap_total_fetched           | Sum of all tap messages sent              |
472| ep_tap_bg_max_pending          | The maximum number of bg jobs a tap       |
473|                                | connection may have                       |
474| ep_tap_bg_fetched              | Number of tap disk fetches                |
475| ep_tap_bg_fetch_requeued       | Number of times a tap bg fetch task is    |
476|                                | requeued                                  |
477| ep_tap_fg_fetched              | Number of tap memory fetches              |
478| ep_tap_deletes                 | Number of tap deletion messages sent      |
479| ep_tap_throttled               | Number of tap messages refused due to     |
480|                                | throttling                                |
481| ep_tap_count                   | Number of tap connections                 |
482| ep_tap_bg_num_samples          | The number of tap bg fetch samples        |
483|                                | included in the avg                       |
484| ep_tap_bg_min_wait             | The shortest time (µs) for a tap item     |
485|                                | before it is serviced by the dispatcher   |
486| ep_tap_bg_max_wait             | The longest time (µs) for a tap item      |
487|                                | before it is serviced by the dispatcher   |
488| ep_tap_bg_wait_avg             | The average wait time (µs) for a tap item |
489|                                | before it is serviced by the dispatcher   |
490| ep_tap_bg_min_load             | The shortest time (µs) for a tap item to  |
491|                                | be loaded from the persistence layer      |
492| ep_tap_bg_max_load             | The longest time (µs) for a tap item to   |
493|                                | be loaded from the persistence layer      |
494| ep_tap_bg_load_avg             | The average time (µs) for a tap item to   |
495|                                | be loaded from the persistence layer      |
496| ep_tap_noop_interval           | The number of secs between a noop is      |
497|                                | added to an idle connection               |
498| ep_tap_backoff_period          | The number of seconds the tap connection  |
499|                                | should back off after receiving ETMPFAIL  |
500| ep_tap_queue_fill              | Total enqueued items                      |
501| ep_tap_queue_drain             | Total drained items                       |
502| ep_tap_queue_backoff           | Total back-off items                      |
503| ep_tap_queue_backfill          | Number of backfill remaining              |
504| ep_tap_queue_itemondisk        | Number of items remaining on disk         |
505| ep_tap_throttle_threshold      | Percentage of memory in use before we     |
506|                                | throttle tap streams                      |
507| ep_tap_throttle_queue_cap      | Disk write queue cap to throttle          |
508|                                | tap streams                               |
509
510
511*** Per Tap Client Stats
512
513Each stat begins with =ep_tapq:= followed by a unique /client_id/ and
514another colon.  For example, if your client is named, =slave1=, the
515=qlen= stat would be =ep_tapq:slave1:qlen=.
516
517| type                        | The kind of tap connection (producer or  | PC |
518|                             | consumer)                                |    |
519| created                     | Creation time for the tap connection     | PC |
520| supports_ack                | true if the connection use acks          | PC |
521| connected                   | true if this client is connected         | PC |
522| disconnects                 | Number of disconnects from this client   | PC |
523| reserved                    | true if the tap stream is reserved       | P  |
524| suspended                   | true if the tap stream is suspended      | P  |
525| qlen                        | Queue size for the given client_id       | P  |
526| qlen_high_pri               | High priority tap queue items            | P  |
527| qlen_low_pri                | Low priority tap queue items             | P  |
528| vb_filters                  | Size of connection vbucket filter set    | P  |
529| vb_filter                   | The content of the vbucket filter        | P  |
530| rec_fetched                 | Tap messages sent to the client          | P  |
531| rec_skipped                 | Number of messages skipped due to        | P  |
532|                             | tap reconnect with a different filter    | P  |
533| idle                        | True if this connection is idle          | P  |
534| has_queued_item             | True if there are any remaining items    | P  |
535|                             | from hash table or disk                  |    |
536| bg_result_size              | Number of ready background results       | P  |
537| bg_jobs_issued              | Number of background jobs started        | P  |
538| bg_jobs_completed           | Number of background jobs completed      | P  |
539| flags                       | Connection flags set by the client       | P  |
540| pending_disconnect          | true if we're hanging up on this client  | P  |
541| paused                      | true if this client is blocked           | P  |
542| pending_backfill            | true if we're still backfilling keys     | P  |
543|                             | for this connection                      | P  |
544| pending_disk_backfill       | true if we're still backfilling keys     | P  |
545|                             | from disk for this connection            | P  |
546| backfill_completed          | true if all items from backfill is       | P  |
547|                             | successfully transmitted to the client   | P  |
548| backfill_start_timestamp    | Timestamp of backfill start              | P  |
549| reconnects                  | Number of reconnects from this client    | P  |
550| backfill_age                | The age of the start of the backfill     | P  |
551| ack_seqno                   | The current tap ACK sequence number      | P  |
552| recv_ack_seqno              | Last receive tap ACK sequence number     | P  |
553| ack_log_size                | Tap ACK backlog size                     | P  |
554| ack_window_full             | true if our tap ACK window is full       | P  |
555| seqno_ack_requested         | The seqno of the ack message that the    | P  |
556|                             | producer is wants to get a response for  |    |
557| expires                     | When this ACK backlog expires            | P  |
558| queue_memory                | Memory used for tap queue                | P  |
559| queue_fill                  | Total queued items                       | P  |
560| queue_drain                 | Total drained items                      | P  |
561| queue_backoff               | Total back-off items                     | P  |
562| queue_backfillremaining     | Number of backfill remaining             | P  |
563| queue_itemondisk            | Number of items remaining on disk        | P  |
564| total_backlog_size          | Num of remaining items for replication   | P  |
565| total_noops                 | Number of NOOP messages sent             | P  |
566| num_checkpoint_end          | Number of chkpoint end operations        |  C |
567| num_checkpoint_end_failed   | Number of chkpoint end operations failed |  C |
568| num_checkpoint_start        | Number of chkpoint end operations        |  C |
569| num_checkpoint_start_failed | Number of chkpoint end operations failed |  C |
570| num_delete                  | Number of delete operations              |  C |
571| num_delete_failed           | Number of failed delete operations       |  C |
572| num_flush                   | Number of flush operations               |  C |
573| num_flush_failed            | Number of failed flush operations        |  C |
574| num_mutation                | Number of mutation operations            |  C |
575| num_mutation_failed         | Number of failed mutation operations     |  C |
576| num_opaque                  | Number of opaque operation               |  C |
577| num_opaque_failed           | Number of failed opaque operations       |  C |
578| num_vbucket_set             | Number of vbucket set operations         |  C |
579| num_vbucket_set_failed      | Number of failed vbucket set operations  |  C |
580| num_unknown                 | Number of unknown operations             |  C |
581
582** Tap Aggregated Stats
583
584Aggregated tap stats allow named tap connections to be logically
585grouped and aggregated together by prefixes.
586
587For example, if all of your tap connections started with =rebalance_=
588or =replication_=, you could call =stats tapagg _= to request stats
589grouped by everything before the first =_= character, giving you a set
590for =rebalance= and a set for =replication=.
591
592*** Results
593
594| [prefix]:count              | Number of connections matching this prefix |
595| [prefix]:qlen               | Total length of queues with this prefix    |
596| [prefix]:backfill_remaining | Number of items needing to be backfilled   |
597| [prefix]:backoff            | Total number of backoff events             |
598| [prefix]:drain              | Total number of items drained              |
599| [prefix]:fill               | Total number of items filled               |
600| [prefix]:itemondisk         | Number of items remaining on disk          |
601| [prefix]:total_backlog_size | Num of remaining items for replication     |
602
603** Dcp Stats
604
605Each stat begins with =ep_dcpq:= followed by a unique /client_id/ and
606another colon.  For example, if your client is named, =slave1=, the
607=created= stat would be =ep_dcpq:slave1:created=.
608
609***Consumer Connections
610
611| connected          | True if this client is connected                      |
612| created            | Creation time for the tap connection                  |
613| pending_disconnect | True if we're hanging up on this client               |
614| reserved           | True if the dcp stream is reserved                    |
615| supports_ack       | True if the connection use flow control               |
616| total_acked_bytes  | The amount of bytes that the consumer has acked       |
617| type               | The connection type (producer, consumer, or notifier) |
618
619****Per Stream Stats
620
621| buffer_bytes       | The amount of unprocessed bytes                       |
622| buffer_items       | The amount of unprocessed items                       |
623| end_seqno          | The seqno where this stream should end                |
624| flags              | The flags used to create this stream                  |
625| items_ready        | Whether the stream has messages ready to send         |
626| opaque             | The unique stream identifier                          |
627| snap_end_seqno     | The start seqno of the last snapshot received         |
628| snap_start_seqno   | The end seqno of the last snapshot received           |
629| start_seqno        | The start start seqno used to create this stream      |
630| state              | The stream state (pending, reading, or dead)          |
631| vb_uuid            | The vb uuid used to create this stream                |
632
633***Producer/Notifier Connections
634
635| bytes_sent         | The amount of unacked bytes sent to the consumer       |
636| connected          | True if this client is connected                       |
637| created            | Creation time for the tap connection                   |
638| flow_control       | True if the connection use flow control                |
639| items_remaining    | The amount of items remaining to be sent               |
640| items_sent         | The amount of items already sent to the consumer       |
641| last_sent_time     | The last time this connection sent a message           |
642| max_buffer_bytes   | The maximum amount of bytes that can be sent without   |
643|                    | receiving an ack from the consumer                     |
644| noop_enabled       | Whether or not this connection sends noops             |
645| noop_wait          | Whether or not this connection is waiting for a        |
646|                    | noop response from the consumer                        |
647| pending_disconnect | True if we're hanging up on this client                |
648| reserved           | True if the dcp stream is reserved                     |
649| supports_ack       | True if the connection use flow control                |
650| total_acked_bytes  | The amount of bytes that have been acked by the        |
651|                    | consumer when flow control is enabled                  |
652| total_bytes_sent   | The amount of bytes already sent to the consumer       |
653| type               | The connection type (producer, consumer, or notifier)  |
654| unacked_bytes      | The amount of bytes the consumer has no acked          |
655
656****Per Stream Stats
657
658| backfilled         | The amount of items sent from disk                     |
659| end_seqno          | The seqno send mutations up to                         |
660| flags              | The flags supplied in the stream request               |
661| items_ready        | Whether the stream has items ready to send             |
662| last_sent_seqno    | The last seqno sent by this stream                     |
663| memory             | The amount of items sent from memory                   |
664| opaque             | The unique stream identifier                           |
665| snap_end_seqno     | The last snapshot end seqno (Used if a consumer is     |
666|                    | resuming a stream)                                     |
667| snap_start_seqno   | The last snapshot start seqno (Used if a consumer is   |
668|                    | resuming a stream)                                     |
669| start_seqno        | The seqno to start sending mutations from              |
670| state              | The stream state (pending, backfilling, in-memory,     |
671|                    | takeover-send, takeover-wait, or dead)                 |
672| vb_uuid            | The vb uuid used in the stream request                 |
673| cur_snapshot_type  | The type of the current snapshot being received        |
674| cur_snapshot_start | The start seqno of the current snapshot being received |
675| cur_snapshot_end   | The end seqno of the current snapshot being received   |
676
677** Dcp Aggregated Stats
678
679Aggregated dcp stats allow dcp connections to be logically grouped and
680aggregated together by prefixes.
681
682For example, if all of your dcp connections started with =xdcr:= or
683=replication=, you could call =stats dcpagg := to request stats grouped by
684everything before the first =:= character, giving you a set for =xdcr= and a
685set for =replication=.
686
687*** Results
688
689| [prefix]:count              | Number of connections matching this prefix   |
690| [prefix]:producer_count     | Total producer connections with this prefix  |
691| [prefix]:items_sent         | Total items sent with this prefix            |
692| [prefix]:items_remaining    | Total items remaining to be sent with this   |
693|                             | prefix                                       |
694| [prefix]:total_bytes        | Total number of bytes sent with this prefix  |
695| [prefix]:total_backlog_size | Total backfill items remaining to be sent    |
696|                             | with this prefix
697
698** Timing Stats
699
700Timing stats provide histogram data from high resolution timers over
701various operations within the system.
702
703*** General Form
704
705As this data is multi-dimensional, some parsing may be required for
706machine processing.  It's somewhat human readable, but the =stats=
707script mentioned in the Getting Started section above will do fancier
708formatting for you.
709
710Consider the following sample stats:
711
712: STAT disk_insert_8,16 9488
713: STAT disk_insert_16,32 290
714: STAT disk_insert_32,64 73
715: STAT disk_insert_64,128 86
716: STAT disk_insert_128,256 48
717: STAT disk_insert_256,512 2
718: STAT disk_insert_512,1024 12
719: STAT disk_insert_1024,2048 1
720
721This tells you that =disk_insert= took 8-16µs 9,488 times, 16-32µs
722290 times, and so on.
723
724The same stats displayed through the =stats= CLI tool would look like
725this:
726
727: disk_insert (10008 total)
728:    8us - 16us    : ( 94.80%) 9488 ###########################################
729:    16us - 32us   : ( 97.70%)  290 #
730:    32us - 64us   : ( 98.43%)   73
731:    64us - 128us  : ( 99.29%)   86
732:    128us - 256us : ( 99.77%)   48
733:    256us - 512us : ( 99.79%)    2
734:    512us - 1ms   : ( 99.91%)   12
735:    1ms - 2ms     : ( 99.92%)    1
736
737
738*** Available Stats
739
740The following histograms are available from "timings" in the above
741form to describe when time was spent doing various things:
742
743| bg_wait               | bg fetches waiting in the dispatcher queue     |
744| bg_load               | bg fetches waiting for disk                    |
745| set_with_meta         | set_with_meta latencies                        |
746| bg_tap_wait           | tap bg fetches waiting in the dispatcher queue |
747| bg_tap_load           | tap bg fetches waiting for disk                |
748| pending_ops           | client connections blocked for operations      |
749|                       | in pending vbuckets                            |
750| storage_age           | Analogous to ep_storage_age in main stats      |
751| data_age              | Analogous to ep_data_age in main stats         |
752| get_cmd               | servicing get requests                         |
753| arith_cmd             | servicing incr/decr requests                   |
754| get_stats_cmd         | servicing get_stats requests                   |
755| get_vb_cmd            | servicing vbucket status requests              |
756| set_vb_cmd            | servicing vbucket set state commands           |
757| del_vb_cmd            | servicing vbucket deletion commands            |
758| chk_persistence_cmd   | waiting for checkpoint persistence             |
759| tap_vb_set            | servicing tap vbucket set state commands       |
760| tap_vb_reset          | servicing tap vbucket reset commands           |
761| tap_mutation          | servicing tap mutations                        |
762| notify_io             | waking blocked connections                     |
763| paged_out_time        | time (in seconds) objects are non-resident     |
764| disk_insert           | waiting for disk to store a new item           |
765| disk_update           | waiting for disk to modify an existing item    |
766| disk_del              | waiting for disk to delete an item             |
767| disk_vb_del           | waiting for disk to delete a vbucket           |
768| disk_commit           | waiting for a commit after a batch of updates  |
769| disk_vbstate_snapshot | Time spent persisting vbucket state changes    |
770| item_alloc_sizes      | Item allocation size counters (in bytes)       |
771
772The following histograms are available from "scheduler" and "runtimes"
773describing the scheduling overhead times and task runtimes incurred by various
774IO and Non-IO tasks respectively:
775
776| bg_fetcher_tasks            | histogram of scheduling overhead/task    |
777|                             | runtimes for background fetch tasks      |
778| bg_fetcher_meta_tasks       | histogram of scheduling overhead/task    |
779|                             | runtimes for background fetch meta tasks |
780| tap_bg_fetcher_tasks        | histogram of scheduling overhead/task    |
781|                             | runtimes for tap background fetch tasks  |
782| vkey_stat_bg_fetcher_tasks  | histogram of scheduling overhead/task    |
783|                             | runtimes for fetching item from disk for |
784|                             | vkey stat tasks                          |
785| warmup_tasks                | histogram of scheduling overhead/task    |
786|                             | runtimes for warmup tasks                |
787| vbucket_persist_high_tasks  | histogram of scheduling overhead/task    |
788|                             | runtimes for snapshot vbucket state in   |
789|                             | high priority tasks                      |
790| vbucket_deletion_tasks      | histogram of scheduling overhead/task    |
791|                             | runtimes for vbucket deletion tasks      |
792| flusher_tasks               | histogram of scheduling overhead/task    |
793|                             | runtimes for flusher tasks               |
794| flush_all_tasks             | histogram of scheduling overhead/task    |
795|                             | runtimes for flush all tasks             |
796| compactor_tasks             | histogram of scheduling overhead/task    |
797|                             | runtimes for vbucket level compaction    |
798|                             | tasks                                    |
799| statsnap_tasks              | histogram of scheduling overhead/task    |
800|                             | runtimes for stats snapshot tasks        |
801| mutation_log_compactor_tasks| histogram of scheduling overhead/task    |
802|                             | runtimes for access log compaction tasks |
803| access_scanner_tasks        | histogram of scheduling overhead/task    |
804|                             | runtimes for access scanner tasks        |
805| conn_notification_tasks     | histogram of scheduling overhead/task    |
806|                             | runtimes for connection notification     |
807|                             | tasks                                    |
808| checkpoint_remover_tasks    | histogram of scheduling overhead/task    |
809|                             | runtimes for checkpoint removal tasks    |
810| vb_memory_deletion_tasks    | histogram of scheduling overhead/task    |
811|                             | runtimes for memory deletion of vbucket  |
812|                             | tasks                                    |
813| checkpoint_stats_tasks      | histogram of scheduling overhead/task    |
814|                             | runtimes for checkpoint stats tasks      |
815| item_pager_tasks            | histogram of scheduling overhead/task    |
816|                             | runtimes for item pager tasks            |
817| backfill_tasks_tasks        | histogram of scheduling overhead/task    |
818|                             | runtimes for backfill tasks              |
819| tap_resume_tasks            | histogram of scheduling overhead/task    |
820|                             | runtimes for resume suspended tap        |
821|                             | connection tasks                         |
822| tapconnection_reaper_tasks  | histogram of scheduling overhead/task    |
823|                             | runtimes for tap/dcp connection reaper   |
824|                             | tasks                                    |
825| hashtable_resize_tasks      | histogram of scheduling overhead/task    |
826|                             | runtimes for hash table resizer tasks    |
827| pending_ops_tasks           | histogram of scheduling overhead/task    |
828|                             | runtimes for processing dcp bufferred    |
829|                             | items tasks                              |
830| conn_manager_tasks          | histogram of scheduling overhead/task    |
831|                             | runtimes for dcp/tap connection manager  |
832|                             | tasks                                    |
833
834** Hash Stats
835
836Hash stats provide information on your vbucket hash tables.
837
838Requesting these stats does affect performance, so don't do it too
839regularly, but it's useful for debugging certain types of performance
840issues.  For example, if your hash table is tuned to have too few
841buckets for the data load within it, the =max_depth= will be too large
842and performance will suffer.
843
844| avg_count    | The average number of items per vbucket                  |
845| avg_max      | The average max depth of a vbucket hash table            |
846| avg_min      | The average min depth of a vbucket hash table            |
847| largest_max  | The largest hash table depth of in all vbuckets          |
848| largest_min  | The the largest minimum hash table depth of all vbuckets |
849| max_count    | The largest number of items in a vbucket                 |
850| min_count    | The smallest number of items in a vbucket                |
851| total_counts | The total numer of items in all vbuckets                 |
852
853It is also possible to get more detailed hash tables stats by using
854'hash detail'. This will print per-vbucket stats.
855
856Each stat is prefixed with =vb_= followed by a number, a colon, then
857the individual stat name.
858
859For example, the stat representing the size of the hash table for
860vbucket 0 is =vb_0:size=.
861
862| state            | The current state of this vbucket                |
863| size             | Number of hash buckets                           |
864| locks            | Number of locks covering hash table operations   |
865| min_depth        | Minimum number of items found in a bucket        |
866| max_depth        | Maximum number of items found in a bucket        |
867| reported         | Number of items this hash table reports having   |
868| counted          | Number of items found while walking the table    |
869| resized          | Number of times the hash table resized           |
870| mem_size         | Running sum of memory used by each item          |
871| mem_size_counted | Counted sum of current memory used by each item  |
872
873** Checkpoint Stats
874
875Checkpoint stats provide detailed information on per-vbucket checkpoint
876datastructure.
877
878Like Hash stats, requesting these stats has some impact on performance.
879Therefore, please do not poll them from the server frequently.
880Each stat is prefixed with =vb_= followed by a number, a colon, and then
881each stat name.
882
883| cursor_name:cursor_checkpoint_id | Checkpoint ID at which the cursor is      |
884|                                  | name 'cursor_name' is pointing now        |
885| cursor_name:cursor_seqno         | The seqno at which the cursor             |
886|                                  | 'cursor_name' is pointing now             |
887| open_checkpoint_id               | ID of the current open checkpoint         |
888| num_tap_cursors                  | Number of referencing TAP cursors         |
889| num_checkpoint_items             | Number of total items in a checkpoint     |
890|                                  | datastructure                             |
891| num_open_checkpoint_items        | Number of items in the open checkpoint    |
892| num_checkpoints                  | Number of checkpoints in a checkpoint     |
893|                                  | datastructure                             |
894| num_items_for_persistence        | Number of items remaining for persistence |
895| state                            | The state of the vbucket this checkpoint  |
896|                                  | contains data for                         |
897| last_closed_checkpoint_id        | The last closed checkpoint number         |
898| persisted_checkpoint_id          | The slast persisted checkpoint number     |
899
900** Memory Stats
901
902This provides various memory-related stats including the stats from tcmalloc.
903Note that tcmalloc stats are not available on some operating systems
904(e.g., Windows) that do not support tcmalloc.
905
906| mem_used (deprecated)               | Engine's total memory usage          |
907| bytes                               | Engine's total memory usage          |
908| ep_kv_size                          | Memory used to store item metadata,  |
909|                                     | keys and values, no matter the       |
910|                                     | vbucket's state. If an item's value  |
911|                                     | is ejected, this stat will be        |
912|                                     | decremented by the size of the       |
913|                                     | item's value.                        |
914| ep_value_size                       | Memory used to store values for      |
915|                                     | resident keys                        |
916| ep_overhead                         | Extra memory used by transient data  |
917|                                     | like persistence queue, replication  |
918|                                     | queues, checkpoints, etc             |
919| ep_max_size                         | Max amount of data allowed in memory |
920| ep_mem_low_wat                      | Low water mark for auto-evictions    |
921| ep_mem_high_wat                     | High water mark for auto-evictions   |
922| ep_oom_errors                       | Number of times unrecoverable OOMs   |
923|                                     | happened while processing operations |
924| ep_tmp_oom_errors                   | Number of times temporary OOMs       |
925|                                     | happened while processing operations |
926| ep_blob_num                         | The number of blob objects in the    |
927|                                     | cache                                |
928| ep_blob_overhead                    | The "unused" memory caused by the    |
929|                                     | allocator returning bigger chunks    |
930|                                     | than requested                       |
931| ep_storedval_size                   | Memory used by storedval objects     |
932| ep_storedval_overhead               | The "unused" memory caused by the    |
933|                                     | allocator returning bigger chunks    |
934|                                     | than requested                       |
935| ep_storedval_num                    | The number of storedval objects      |
936|                                     | allocated                            |
937| ep_item_num                         | The number of item objects allocated |
938| ep_mem_tracker_enabled              | If smart memory tracking is enabled  |
939| total_allocated_bytes               | Engine's total memory usage reported |
940|                                     | from the underlying memory allocator |
941| total_heap_size                     | Bytes of system memory reserved by   |
942|                                     | the underlying memory allocator      |
943| total_free_mapped_bytes             | Number of bytes in free, mapped      |
944|                                     | pages in the underlying allocator's  |
945|                                     | page heap                            |
946| total_free_unmapped_bytes           | Number of bytes in free, unmapped    |
947|                                     | pages in page heap. These are bytes  |
948|                                     | that have been released back to OS   |
949|                                     | by the underlying memory allocator   |
950| total_fragmentation_bytes           | Bytes of the fragmented memory in    |
951|                                     | the underlying allocator. Note that  |
952|                                     | the free and mapped pages inside the |
953|                                     | allocator are not considered as the  |
954|                                     | fragmentation as they can be used    |
955|                                     | for incoming memory allocations.     |
956| tcmalloc_max_thread_cache_bytes     | A limit to how much memory the       |
957|                                     | underlying memory allocator TCMalloc |
958|                                     | dedicates for small objects          |
959| tcmalloc_current_thread_cache_bytes | A measure of some of the memory that |
960|                                     | the underlying allocator TCMalloc is |
961|                                     | using for small objects              |
962
963
964** Stats Key and Vkey
965| key_cas                       | The keys current cas value             |KV|
966| key_data_age                  | How long the key has waited for its    |KV|
967|                               | value to be persisted (0 if clean)     |KV|
968| key_exptime                   | Expiration time from the epoch         |KV|
969| key_flags                     | Flags for this key                     |KV|
970| key_is_dirty                  | If the value is not yet persisted      |KV|
971| key_last_modified_time        | Last updated time                      |KV|
972| key_valid                     | See description below                  | V|
973| key_vb_state                  | The vbucket state of this key          |KV|
974
975=key_valid= can have the following responses:
976
977this_is_a_bug - Some case we didn't take care of.
978dirty - The value in memory has not been persisted yet.
979length_mismatch - The key length in memory doesn't match the length on disk.
980data_mismatch - The data in memroy doesn't match the data on disk.
981flags_mismatch - The flags in memory don't match the flags on disk.
982valid - The key is both on disk and in memory
983ram_but_not_disk - The value doesn't exist yet on disk.
984item_deleted - The item has been deleted.
985
986** Warmup
987
988Stats =warmup= shows statistics related to warmup logic
989
990| ep_warmup                       | Shows if warmup is enabled / disabled      |
991| ep_warmup_estimated_key_count   | Estimated number of keys in database       |
992| ep_warmup_estimated_value_count | Estimated number of values in database     |
993| ep_warmup_state                 | The current state of the warmup thread     |
994| ep_warmup_thread                | Warmup thread status                       |
995| ep_warmup_key_count             | Number of keys warmed up                   |
996| ep_warmup_value_count           | Number of values warmed up                 |
997| ep_warmup_dups                  | Duplicates encountered during warmup       |
998| ep_warmup_oom                   | OOMs encountered during warmup             |
999| ep_warmup_item_expired          | Number of items expired during warmup      |
1000| ep_warmup_time                  | Time (µs) spent by warming data            |
1001| ep_warmup_keys_time             | Time (µs) spent by warming keys            |
1002| ep_warmup_mutation_log          | Number of keys present in mutation log     |
1003| ep_warmup_access_log            | Number of keys present in access log       |
1004| ep_warmup_min_items_threshold   | Percentage of total items warmed up        |
1005|                                 | before we enable traffic                   |
1006| ep_warmup_min_memory_threshold  | Percentage of max mem warmed up before     |
1007|                                 | we enable traffic                          |
1008
1009
1010** KV Store Stats
1011
1012These provide various low-level stats and timings from the underlying KV
1013storage system and useful to understand various states of the storage
1014system.
1015
1016The following stats are available for all database engine:
1017
1018| open              | Number of database open operations                 |
1019| close             | Number of database close operations                |
1020| readTime          | Time spent in read operations                      |
1021| readSize          | Size of data in read operations                    |
1022| writeTime         | Time spent in write operations                     |
1023| writeSize         | Size of data in write operations                   |
1024| delete            | Time spent  in delete() calls                      |
1025
1026The following stats are available for the CouchStore database engine:
1027
1028| backend_type      | Type of backend database engine                    |
1029| commit            | Time spent in CouchStore commit operation          |
1030| compaction        | Time spent in compacting vbucket database file     |
1031| numLoadedVb       | Number of Vbuckets loaded into memory              |
1032| lastCommDocs      | Number of docs in the last commit                  |
1033| failure_set       | Number of failed set operation                     |
1034| failure_get       | Number of failed get operation                     |
1035| failure_vbset     | Number of failed vbucket set operation             |
1036| save_documents    | Time spent in CouchStore save documents operation  |
1037
1038** KV Store Timing Stats
1039
1040KV Store Timing stats provide timing information from the underlying storage
1041system. These stats are on shard (group of partitions) level.
1042
1043*** Available Stats
1044The following histograms are available from "kvtimings" in the form
1045described in Timings section above. These stats are prefixed with the
1046rw_<Shard number>: indicating the times spent doing various things:
1047
1048| commit                | time spent in commit operations                |
1049| compact               | time spent in file compaction operations       |
1050| delete                | time spent in delete operations                |
1051| save_documents        | time spent in persisting documents in storage  |
1052| writeTime             | time spent in writing to storage subsystem     |
1053| writeSize             | sizes of writes given to storage subsystem     |
1054| bulkSize              | batch sizes of the save documents calls        |
1055| fsReadTime            | time spent in doing filesystem reads           |
1056| fsWriteTime           | time spent in doing filesystem writes          |
1057| fsSyncTime            | time spent in doing filesystem sync operations |
1058| fsReadSize            | sizes of various filesystem reads issued       |
1059| fsWriteSize           | sizes of various filesystem writes issued      |
1060| fsReadSeek            | values of various seek operations in file      |
1061
1062
1063** Workload Raw Stats
1064Some information about the number of shards and Executor pool information.
1065These are available as "workload" stats:
1066
1067| ep_workload:num_shards  | number of shards or groups of partitions     |
1068| ep_workload:num_writers | number of threads that prioritize write ops  |
1069| ep_workload:num_readers | number of threads that prioritize read ops   |
1070| ep_workload:num_auxio   | number of threads that prioritize aux io ops |
1071| ep_workload:num_nonio   | number of threads that prioritize non io ops |
1072| ep_workload:max_writers | max number of threads doing write ops        |
1073| ep_workload:max_readers | max number of threads doing read ops         |
1074| ep_workload:max_auxio   | max number of threads doing aux io ops       |
1075| ep_workload:max_nonio   | max number of threads doing non io ops       |
1076| ep_workload:num_sleepers| number of threads that are sleeping |
1077| ep_workload:ready_tasks | number of global tasks that are ready to run |
1078
1079Additionally the following stats on the current state of the TaskQueues are
1080also presented
1081| HiPrioQ_Writer:InQsize   | count high priority bucket writer tasks waiting  |
1082| HiPrioQ_Writer:OutQsize  | count high priority bucket writer tasks runnable |
1083| HiPrioQ_Reader:InQsize   | count high priority bucket reader tasks waiting  |
1084| HiPrioQ_Reader:OutQsize  | count high priority bucket reader tasks runnable |
1085| HiPrioQ_AuxIO:InQsize    | count high priority bucket auxio  tasks waiting  |
1086| HiPrioQ_AuxIO:OutQsize   | count high priority bucket auxio  tasks runnable |
1087| HiPrioQ_NonIO:InQsize    | count high priority bucket nonio  tasks waiting  |
1088| HiPrioQ_NonIO:OutQsize   | count high priority bucket nonio  tasks runnable |
1089| LowPrioQ_Writer:InQsize  | count low priority bucket writer tasks waiting   |
1090| LowPrioQ_Writer:OutQsize | count low priority bucket writer tasks runnable  |
1091| LowPrioQ_Reader:InQsize  | count low priority bucket reader tasks waiting   |
1092| LowPrioQ_Reader:OutQsize | count low priority bucket reader tasks runnable  |
1093| LowPrioQ_AuxIO:InQsize   | count low priority bucket auxio  tasks waiting   |
1094| LowPrioQ_AuxIO:OutQsize  | count low priority bucket auxio  tasks runnable  |
1095| LowPrioQ_NonIO:InQsize   | count low priority bucket nonio  tasks waiting   |
1096| LowPrioQ_NonIO:OutQsize  | count low priority bucket nonio  tasks runnable  |
1097
1098** Dispatcher Stats/JobLogs
1099
1100This provides the stats from AUX dispatcher and non-IO dispatcher, and
1101from all the reader and writer threads running for the specific bucket.
1102Along with stats, the job logs for each of the dispatchers and worker
1103threads is also made available.
1104
1105The following stats are available for the workers and dispatchers:
1106
1107| state             | Threads's current status: running, sleeping etc.              |
1108| runtime           | The amount of time since the thread started running           |
1109| task              | The activity/job the thread is involved with at the moment    |
1110
1111The following stats are for individual job logs:
1112
1113| starttime         | The timestamp when the job started                            |
1114| runtime           | Time it took for the job to run                               |
1115| task              | The activity/job the thread ran during that time              |
1116
1117
1118** Stats Reset
1119
1120Resets the list of stats below.
1121
1122Reset Stats:
1123
1124| ep_bg_load                        |
1125| ep_bg_wait                        |
1126| ep_bg_max_load                    |
1127| ep_bg_min_load                    |
1128| ep_bg_max_wait                    |
1129| ep_bg_min_wait                    |
1130| ep_commit_time                    |
1131| ep_flush_duration                 |
1132| ep_flush_duration_highwat         |
1133| ep_io_num_read                    |
1134| ep_io_num_write                   |
1135| ep_io_read_bytes                  |
1136| ep_io_write_bytes                 |
1137| ep_items_rm_from_checkpoints      |
1138| ep_num_eject_failures             |
1139| ep_num_pager_runs                 |
1140| ep_num_not_my_vbuckets            |
1141| ep_num_value_ejects               |
1142| ep_pending_ops_max                |
1143| ep_pending_ops_max_duration       |
1144| ep_pending_ops_total              |
1145| ep_storage_age                    |
1146| ep_storage_age_highwat            |
1147| ep_too_old                        |
1148| ep_too_young                      |
1149| ep_tap_bg_load_avg                |
1150| ep_tap_bg_max_load                |
1151| ep_tap_bg_max_wait                |
1152| ep_tap_bg_min_load                |
1153| ep_tap_bg_min_wait                |
1154| ep_tap_bg_wait_avg                |
1155| ep_tap_throttled                  |
1156| ep_tap_total_fetched              |
1157| ep_vbucket_del_max_walltime       |
1158| pending_ops                       |
1159
1160Reset Histograms:
1161
1162| bg_load                           |
1163| bg_wait                           |
1164| bg_tap_load                       |
1165| bg_tap_wait                       |
1166| chk_persistence_cmd               |
1167| data_age                          |
1168| del_vb_cmd                        |
1169| disk_insert                       |
1170| disk_update                       |
1171| disk_del                          |
1172| disk_vb_del                       |
1173| disk_commit                       |
1174| get_stats_cmd                     |
1175| item_alloc_sizes                  |
1176| get_vb_cmd                        |
1177| notify_io                         |
1178| pending_ops                       |
1179| set_vb_cmd                        |
1180| storage_age                       |
1181| tap_mutation                      |
1182| tap_vb_reset                      |
1183| tap_vb_set                        |
1184
1185
1186* Details
1187
1188** Ages
1189
1190The difference between =ep_storage_age= and =ep_data_age= is somewhat
1191subtle, but when you consider that a given record may be updated
1192multiple times before hitting persistence, it starts to be clearer.
1193
1194=ep_data_age= is how old the data we actually wrote is.
1195
1196=ep_storage_age= is how long the object has been waiting to be
1197persisted.
1198
1199** Warming Up
1200
1201Opening the data store is broken into three distinct phases:
1202
1203*** Initializing
1204
1205During the initialization phase, the server is not accepting
1206connections or otherwise functional.  This is often quick, but in a
1207server crash can take some time to perform recovery of the underlying
1208storage.
1209
1210This time is made available via the =ep_dbinit= stat.
1211
1212*** Warming Up
1213
1214After initialization, warmup begins.  At this point, the server is
1215capable of taking new writes and responding to reads.  However, only
1216records that have been pulled out of the storage or have been updated
1217from other clients will be available for request.
1218
1219(note that records read from persistence will not overwrite new
1220records captured from the network)
1221
1222During this phase, =ep_warmup_thread= will report =running= and
1223=ep_warmed_up= will be increasing as records are being read.
1224
1225*** Complete
1226
1227Once complete, =ep_warmed_up= will stop increasing and
1228=ep_warmup_thread= will report =complete=.
1229
1230* Uuid
1231The uuid stats allows clients to check if the unique identifier created
1232and assigned to the bucket when it is created. By looking at this a client
1233can verify that the bucket hasn't been recreated since it was used.
1234