Warmup

The cbstats warmup command shows statistics related to warmup logic.

Description

If a Couchbase Server node is starting up for the first time, it creates whatever DB files necessary and begin serving data immediately. However, if there is already data on disk (likely because the node rebooted or the service restarted), the node needs to read all of this data off of disk before it can begin serving data. This is called warmup. Depending on the size of data, this can take some time.

The cbstats warmup command is used to get information about server warmup, including the status of warmup and whether warmup is enabled. The following shows the command syntax:

cbstats [host]:[dataport] -b bucket_name -p bucket_password raw warmup

cbstats [host]:11210 warmup

The bucket does not need to be specified, if the default bucket statistics are being requested.

Table 1. cbstats options
Option Description
-a Iterate over all buckets. This requires administrator username and password.
-p The password for the bucket if one exists.
-d The bucket to get statistics from. Default: default.

The following statistics are of particular interest when monitoring the warmup.

ep_warmup_thread
This is the overall indication of whether or not warmup is still running. Look for values: running and complete.
ep_warmup_state
This describes which phase of warmup is currently running. Look for values: loading keys, loading access log, and done.
  • When ep_warmup_state is loading keys, compare ep_warmup_key_count (current number) with ep_warmup_estimated_key_count (target number).
  • When ep_warmup_state is loading access log, compare ep_warmup_value_count (current number) with ep_warmup_estimated_value_count (target number).
Table 2. cbstats warmup stats
Statistic Description Value Type
ep_warmup Shows if warmup is enabled / disabled String values: enabled or disabled
ep_warmup_dups Number of failures due to duplicate keys Integer
ep_warmup_estimated_key_count Estimated number of keys in database Integer. Default: unknown
ep_warmup_estimate_time Estimated time in microseconds to do warmup Integer.
ep_warmup_estimated_value_count Estimated number of key data to read based on the access log Integer. Default: unknown
ep_warmup_item_expired Number if expired items. Integer. Default: 0
ep_warmup_keys_count Number of keys warmed up Integer
ep_warmup_keys_time Total time spent by loading persisted keys Integer
ep_warmup_min_item_threshold Enable data traffic after loading this percentage of key data Integer
ep_warmup_min_memory_threshold Enable data traffic after filling this % of memory Integer (%)
ep_warmup_oom Number of out of memory failures during warmup Integer
ep_warmup_state The current state of the warmup thread String
ep_warmup_thread Warmup thread status String values: running or complete
ep_warmup_time Total time spent by loading data (warmup) Integer (microseconds)
ep_warmup_value_count Number of values warmed up Integer

Example

Example request:


cbstats 10.5.2.117:11210 warmup
			

Response

Example response:


 ep_warmup:                       enabled
 ep_warmup_dups:                  0
 ep_warmup_estimate_time:         57546
 ep_warmup_estimated_key_count:   0
 ep_warmup_estimated_value_count: unknown
 ep_warmup_item_expired:          0
 ep_warmup_key_count:             0
 ep_warmup_keys_time:             529022
 ep_warmup_min_item_threshold:    100
 ep_warmup_min_memory_threshold:  100
 ep_warmup_oom:                   0
 ep_warmup_state:                 done
 ep_warmup_thread:                complete
 ep_warmup_time:                  529192
 ep_warmup_value_count:           0