set flush_param
- reference
The command set flush_param establishes bucket parameters for threading and memory management.
Syntax
The basic syntax is:
cbepctl [host]:11210 -b [bucket-name] -u [administrator-name] -p [administrator-password] set flush_param [parameter] [value]
The syntax to configure the access log settings is:
cbepctl [hostname]:11210 -b [bucket-name] -u [administrator-name] -p [administrator-password] set flush_param alog_sleep_time [value] cbepctl [hostname]:11210 -b [bucket-name] -u [administrator-name] -p [administrator-password] set flush_param alog_task_time [value]
The syntax for ejection is:
cbepctl [host]:11210 -b [bucket-name] -u [administrator-name] -p [administrator-password] set flush_param [parameter] [value]
Parameter used for changing ejection thresholds:
-
pager_active_vb_pcnt
The syntax to set the out of memory threshold is:
cbepctl [host]:11210 -b [bucket-name] -u [administrator-name] -p [administrator-password] set flush_param mutation_mem_threshold [value]
Description
Tune the dynamic shared thread pool performance by changing the thread types inside the ep-engine and memcached at run time.
The command set flush_param adjusts the number of threads that prioritize read, write, non-i/o and auxiliary-i/o operations.
These settings take effect immediately and do not require that the bucket be restarted.
|
- alog_sleep_time, alog_task_time
-
Couchbase Server has an optimized disk warmup. An access scanner is periodically run, to determine which keys have been the most frequently used: typically, the scanner writes these key to an access log, which can be accessed by Couchbase Server at warmup, so that the corresponding documents can be loaded first. (See Initialization and Warmup for further information; including cases where item-residency is at very high levels, and in consequence, no access log is created or used.)
The
cbepctl flush_paramcommand is used to change the initial time and the interval for the access scanner. For example, the initial time and interval might be changed to accommodate a peak time when an application needs these keys to be quickly available.By default, the access scanner runs once every 24 hours at 10:00 AM GMT. The scanner is highly CPU-intensive: therefore, to reduce the cluster-wide impact of running this task, its start time should be staggered to a different value on each node in the cluster. Note also that if the scanner runs at the same time that index updates are being made (either on the current node, or on one or more other nodes) by the Index Service, the performance of the index updates may be adversely affected. The scanner should be configured to minimize the likelihood of this problem.
- pager_active_vb_pcnt
-
Ejection means that documents are removed from RAM but the key and metadata remain.
Use
pager_active_vb_pcntsettings to change the server thresholds for ejection.Do not change the ejection defaults unless required by Couchbase Support. - mutation_mem_threshold
-
By default, Couchbase Server sends clients a temporary out-of-memory error message if RAM is 95% consumed and only 5% RAM remains for overhead. Use the
cbepctl set flush_param mutation_mem-thresholdcommand parameter to change this threshold value.Do not change this default to a higher value. However, this value might be reduced if you need more RAM for system overhead such as disk queue or for server data structures.
Options
The following are the command options:
| Option | Description |
|---|---|
|
Access scanner interval (minute) |
|
Access scanner next task time (UTC) |
|
Memory threshold (%) on the current bucket quota before backfill task is made to back off. |
|
Delay before executing a bg fetch (test feature). |
|
timeout in receiving a response from CouchDB. |
|
Deprecated. Enable flush operation. |
|
Percentage of active vBuckets items among all ejected items by item pager. |
|
Maximum memory used by the server. |
|
Amount of RAM that can be consumed in that caching layer before clients start receiving temporary out of memory messages. |
|
Path to log detailed timing stats. |
|
Queue cap to throttle the log compactor. |
|
Maximum size of a mutation log file allowed. |
|
Max ratio of # of items logged to # of unique items. |
|
Period after last access scanner run during which item pager preserve working set. |
|
Maximum queue age before flushing data. |
|
Maximum number of items in a flusher transaction. |
|
Minimum data age before flushing data. |
|
How often the item compressor task should be run, in milliseconds. Default value is 250. |
|
Maximum time, in milliseconds, for which the item compressor task is run, before being paused, and then resumed according to the established |
|
Minimum allowed ratio of each item’s uncompressed form to its compressed form. If the actual ratio is less than this value, the item is stored in uncompressed form. Default value is 1.2. |
| % You must use the percentage sign in order to set the value by percentage. |
Examples
Examples for setting the access scanner process
To change the time interval when the access scanner process runs to every 20 minutes.
cbepctl 10.5.2.117:11210 -b foo-bucket -u Administrator -p password \ set flush_param alog_sleep_time 20
To change the initial time that the access scanner process runs from the 2:00 AM UTC default to 11:00 PM UTC.
cbepctl 10.5.2.117:11210 -b foo-bucket -u Administrator -p password \ set flush_param alog_task_time 23
This response shows the time interval changed to 20 minutes.
setting param: alog_sleep_time 20 set alog_sleep_time to 20
This response shows the initial access scanner run time changed to 11:00 PM UTC.
setting param: alog_task_time 23 set alog_task_time to 23
Examples for setting the out-of-memory error message
In this example, the threshold is reduced to 65% of RAM.
cbepctl 10.5.2.117:11210 -b foo-bucket -u Administrator -p password \ set flush_param mutation_mem_threshold 65%
The following example response shows the RAM threshold set to 65%.
setting param: mutation_mem_threshold 65 set mutation_mem_threshold to 65
Examples for setting percentage of ejected items
Based on the NRU algorithm, the server ejects active and replica data from a node. By default, the server is configured to 60% active items and 40% replica data from a node.
The following example increases the percentage of active items that can be ejected from a node to 50%.
cbepctl 10.5.2.117:11210 -b foo-bucket -u Administrator -p password \ set flush_param pager_active_vb_pcnt 50
Be aware of potential performance implications when changing the percentage of ejected items. It may be more desirable to eject as many replica items as possible and limit the amount of active data that can be ejected. By doing so, active data from a source node is maximized while maintaining incoming requests to that node. However, if the server is ejecting a very large percentage of replica data and a node fails, the replica data is not immediately available. In this case, the items are retrieved from disk and put back into RAM before the request is fulfilled.
The following example response shows the percentage of ejected items being set.
setting param: pager_active_vb_pcnt 50 set pager_active_vb_pcnt to 50