cbepctl tool
The cbepctl tool is used to control vBucket states, configuration, and memory and disk persistence behavior.
Changes to the cluster configuration using cbepctl are not persisted over a cluster restart.
Operating system | Location |
---|---|
Linux | /opt/couchbase/bin/cbepctl |
Windows | C:\Program Files\Couchbase\Server\bin\cbepctl.exe |
Mac OS X | /Applications/Couchbase Server.app/Contents/Resources/couchbase-core/bin/cbepctl |
Be aware that this tool is a per-node, per-bucket operation. That means that if you want to perform this operation, you must specify the IP address of a node in the cluster and a named bucket. If you do not provided a named bucket, the server will apply the setting to any default bucket that exists at the specified node. If you want to perform this operation for an entire cluster, you will need to perform the command for every node/bucket combination that exists for that cluster.
cbepctl host:11210 -b bucket_name -p bucket_password start
cbepctl host:11210 -b bucket_name -p bucket_password stop
cbepctl host:11210 -b bucket_name -p bucket_password set type param value
For this command, host is the IP address for your Couchbase cluster, or node in the cluster. The port will always be the standard port used for cluster-wide stats and is at 11210. You also provide the named bucket and the password for the named bucket. After this you provide command options and authentication.
You can use the following command options to manage persistence:
Option | Description |
---|---|
stop | Stop persistence |
start | Start persistence |
drain | Wait until queues are drained |
set | To set checkpoint_param, flush_param, and tap_param. This changes how or when persistence occurs. |
You can use the following command options, combined with the parameters to set checkpoint_param, flush_param, and tap_param. These changes the behavior of persistence in Couchbase Server.
cbepctl set checkpoint_param
The command options for checkpoint_param are:
Parameter | Description |
---|---|
chk_max_items | Max number of items allowed in a checkpoint. |
chk_period | Time bound (in sec.) on a checkpoint. |
item_num_based_new_chk | True if a new checkpoint can be created based on. the number of items in the open checkpoint. |
keep_closed_chks | True if we want to keep closed checkpoints in memory, as long as the current memory usage is below high water mark. |
max_checkpoints | Max number of checkpoints allowed per vbucket. |
cbepctl set flush_param
The complete list of options for flush_param are:
Parameter | Description |
---|---|
alog_sleep_time | Access scanner interval (minute) |
alog_task_time | Access scanner next task time (UTC) |
bg_fetch_delay | Delay before executing a bg fetch (test feature). |
couch_response_timeout | timeout in receiving a response from CouchDB. |
exp_pager_stime | Expiry Pager interval. Time interval that Couchbase Server waits before it performs cleanup and removal of expired items from disk. |
pager_active_vb_pcnt | Percentage of active vBuckets items among all ejected items by item pager. |
max_size | Maximum memory used by the server. |
mem_high_wat | Low water mark. |
mem_low_wat | High water mark. |
mutation_mem_threshold | Amount of RAM that can be consumed in that caching layer before clients start receiving temporary out of memory messages. |
timing_log | Path to log detailed timing stats. |
warmup_min_memory_threshold | Memory threshold (%) during warmup to enable traffic. |
warmup_min_item_threshold | Item number threshold (%) during warmup to enable traffic. |
klog_compactor_queue_cap | queue cap to throttle the log compactor. |
klog_max_log_size | maximum size of a mutation log file allowed. |
klog_max_entry_ratio | max ratio of # of items logged to # of unique items. |
pager_unbiased_period | Period after last access scanner run during which item pager preserve working set. |
queue_age_cap | Maximum queue age before flushing data. |
max_txn_size | Maximum number of items in a flusher transaction. |
min_data_age | Minimum data age before flushing data. |
cbepctl set tap_param
Parameter | Description |
---|---|
tap_keepalive | Seconds to hold a named tap connection. |
tap_throttle_queue_cap | Maximum disk write queue size to throttle tap streams (infinite means no cap). |
tap_throttle_cap_pcnt | Percentage of total items in write queue at which we throttle tap input. |
tap_throttle_threshold | Percentage of memory in use to throttle tap streams |