A newer version of this documentation is available.

View Latest

Memory and Storage

  • reference
March 9, 2025
+ 12

APIs in this Section

Using the REST API, memory quotas can be allocated to services, and the current allocations retrieved. During cluster initialization, the on-disk paths for services can be specified on a per node basis.

Reader and writer threads can be configured, to ensure that disk access is highly performant.

Additionally, compaction can be managed: this is used by Couchbase Server to relocate on-disk data; so as to ensure the data’s closest-possible proximity, and thereby reclaim fragments of unused disk-space. The periodic compaction of a bucket’s data helps to ensure the ongoing efficiency of both reads and writes.

Administrators can initiate the compaction of a single bucket’s data at any time, and can cancel such compaction if and when necessary. The REST APIs that support this are described in Performing Compaction Manually.

Additionally, settings are provided whereby compaction is triggered automatically, according to a specified configuration and schedule. This auto-compaction can be achieved in two ways:

  • Globally, meaning that all buckets in the cluster are compacted according to the same configuration and schedule — with the exception of those buckets for which these default settings are deliberately overridden. The REST APIs that support global auto-compaction are described in Auto-Compaction: Global.

  • Per bucket, meaning that a specified bucket is automatically compacted according to a different configuration and schedule than those established as the global defaults. The REST APIs that support per-bucket auto-compaction are described in Auto-Compaction: Per Bucket.

The methods and URIs covered in this section are listed in the table below.

HTTP Method URI Documented at

POST

/nodes/self/controller/settings

Initializing a Node

POST

/pools/default

Configuring Memory

POST

/pools/default/settings/memcached/global

Setting Thread Allocations

GET

/nodes/self

Getting Storage Information

POST

/pools/default/buckets/[bucket-name]/controller/compactBucket

Performing Compaction Manually

POST

/pools/default/buckets/[bucket-name]/controller/cancelBucketCompaction

Performing Compaction Manually

GET

/settings/autoCompaction

Auto-Compaction: Global

POST

/controller/setAutoCompaction

Auto-Compaction: Global

GET

/pools/default/buckets/[bucket-name]

Auto-Compaction: Per Bucket

POST

/pools/default/buckets/[bucket-name]

Auto-Compaction: Per Bucket