Setting bucket priority

Setting bucket priority

The disk I/O priority for a bucket can be set to either low or high.

Description

To set the disk I/O priority for a bucket, use the couchbase-cli tool, bucket-create or bucket-edit command, and the --bucket-priority=[low | high] option.

CLI command and parameter

Disk I/O priority can be changed when either creating or editing a bucket. Use either the bucket-create or bucket-edit command with the --bucket-priority parameter

Syntax

Basic syntax:

To set bucket priority when creating a bucket, set the --enable-priority parameter.

couchbase-cli bucket-create -c [localhost]:8091 -u [admin] -p [password] 
    --bucket=[bucket-name]
    --enable-priority=[low | high]
    [options]
      

To modify bucket priority when editing the bucket properties:

couchbase-cli bucket-edit -c [localhost]:8091 -u [admin] -p [password] 
    --bucket=[bucket-name]
    --enable-priority=[low | high]
    [options]
      

Example: Creating a bucket and setting high priority

To create a new couchbase bucket with high priority:


couchbase-cli bucket-create -c 192.168.0.1:8091 -u Administrator -p password
    --bucket=test_bucket 	
    --bucket-type=couchbase 
    --bucket-port=11222 
    --bucket-ramsize=200 
    --bucket-replica=1 
    --bucket-priority=high
   

Example: Setting high priority

To modify a bucket to high priority:


couchbase-cli bucket-edit -c 192.168.0.1:8091 -u Administrator -p password
    --bucket=test_bucket 
    --bucket-priority=high