A newer version of this documentation is available.

View Latest

setting-compaction

Set the cluster-wide auto compaction settings.

Syntax

The basic syntax is:

couchbase-cli setting-compaction -c [host]:8091 -u [admin] -p [password] [options]

Description

Use this command to set various options for cluster-wide auto compaction.

Options

The following are the command options:

Table 1. setting-compaction options
Options Description

--compaction-db-percentage=PERCENTAGE

Percentage of disk fragmentation when bucket compaction is triggered.

--compaction-db-size=SIZE[MB]

Size of disk fragmentation when bucket compaction is triggered.

--compaction-view-percentage=PERCENTAGE

Percentage of disk fragmentation when view compaction is triggered.

--compaction-view-size=SIZE[MB]

Size of disk fragmentation when view compaction is triggered.

--compaction-period-from=HH:MM

Allow compaction from this time onwards.

--compaction-period-to=HH:MM

Stop allowing compaction at this time.

--enable-compaction-abort=[0|1]

Allow compaction to abort when time expires (yes=1, no=0).

--enable-compaction-parallel=[0|1]

Allow compaction of buckets and views in parallel (yes=1, no=0).

Examples

Enable auto compaction starting at 10:00 and ending at 19:00 without forcing compaction to abort outside this time period.

couchbase-cli setting-compaction -c 192.168.0.1:8091 -u Administrator -p password \
--compaction-period-from=10:00 --compaction-period-to=19:00 --enable-compaction-abort=0