Changing disk write queue quotas

Changing disk write queue quotas

The quota in disk write queues impact the rate of data sent from source nodes to destination nodes.

Description

One of the specific uses of the cbepctl set tap_param command option is to change the default maximum items for a disk write queue. This impacts replication of data that occurs between source and destination nodes within a cluster. Both data that a node receives from client applications and replicated items that it receives are placed on a disk write queue. If there are too many items waiting in the disk write queue at any given destination, Couchbase Server reduces the rate of data that is sent to a destination. This process is also known as backoff.

By default, when a disk write queue contains one million items, a Couchbase node reduces the rate it sends out data to be replicated. This setting can be changed to be the greater of 10% of the items at a destination node or a specific number.

The tap_param parameters are:

Table 1. tap_param parameters
Parameter Description
tap_keepalive Seconds to hold a named tap connection.
tap_throttle_queue_cap Max disk write queue size when tap streams are put into a temporary, 5-second pause. Infinite means there is no cap.
tap_throttle_cap_pcnt Maximum items in disk write queue as percentage of all items on a node. At this point, tap streams are put into a temporary, 5-second pause.
tap_throttle_threshold Percentage of memory in use when tap streams are put into a temporary, 5-second pause.

Syntax

Basic syntax:


cbepctl [localhost]:11210 -b [bucket-name] -p [bucket-password] set tap_param [parameter] [value]
cbepctl [localhost]:11210 -b [bucket-name] -p [bucket-password] set tap_param tap_throttle_queue_cap [value]
cbepctl [localhost]:11210 -b [bucket-name] -p [bucket-password] set tap_param tap_throttle_cap_pcnt [value]
				

Example

The following example changes the setting (for the default bucket) to specify that a replica node send a request to backoff when it has two million items.

cbepctl 10.5.2.117:11210 set tap_param tap_throttle_queue_cap 2000000

The following example changes (for the default bucket) the default percentage used to manage the replication stream. If the items in a disk write queue reach the greater of this percentage or a specified number of items, replication requests slow down.

The threshold is set to 15% of all items at a replica node. When a disk write queue on a replica node reaches this point, it requests replication backoff.

cbepctl 10.5.2.117:11210 set tap_param tap_throttle_cap_pcnt 15

Response

The following example responses show a two million setting and a 15% threshold:


setting param: tap_throttle_queue_cap 2000000
set tap_throttle_queue_cap to 2000000

setting param: tap_throttle_cap_pcnt 15
set tap_throttle_cap_pcnt to 15