Getting Memory Information
Use the REST API to retrieve the current memory quota information for services in a cluster.
Description
Allows you to view memory quotas for the Multi-Dimensional Scaling (MDS) services Data, Index, Search, Eventing, and Analytics. The Query and Backup Services do not require a memory allocation. If no custom quota was specified during configuration for 1 or more services, those services retain the default allocations. These are the default allocations:
-
256 Mb for kv (Data Service)
-
512 Mb for index (Index Service)
-
256 Mb for fts (Search Service)
-
256 Mb for eventing (Eventing Service)
-
1024 Mb for cbas (Analytics Service)
For information about the maximum memory allocation permitted for a node, see Service Memory Quotas.
Responses
| Value | Description |
|---|---|
|
Successful call. |
|
Invalid parameter. |
|
Authorization failure due to incorrect username or password. |
|
The provided username has insufficient privileges to call this method. |
|
Error in the URI path. |
|
Error in Couchbase Server. |
Example
The following example retrieves memory quota (per server node) information for each service.
The output of the REST API call is piped to jq and then the output of the jq is piped to grep to retrieve only the memory quota info.
curl -v -X GET http://127.0.0.1:8091/pools/default -u Administrator:password | jq '.' | grep -i memoryquota
If the call is successful, the response is similar to the following.
The memory quota for the Query service is a soft limit target that the garbage collector works to respect, including running more frequently as the limit is approached or crossed. When set to 0, the soft limit target is disabled, and the garbage collector runs as normal.
"memoryQuota": 7424, "queryMemoryQuota": 0, "indexMemoryQuota": 3243, "ftsMemoryQuota": 512, "cbasMemoryQuota": 2218, "eventingMemoryQuota": 711,
In the example output, the services memory quotas are listed as follows in these parameters:
-
memoryQuotafor the Data Service. -
queryMemoryQuotafor the Query Service. -
indexMemoryQuotafor the Index Service. -
ftsMemoryQuotafor the Search Service. -
cbasMemoryQuotafor the Analytics Service. -
eventingMemoryQuotafor the Eventing Service.
See Also
-
For more information on the maximum memory allocation permitted for a node, see Service Memory Quotas.
-
For more information about adding or removing services on an existing node in a cluster using the UI and the REST API, see Modify Services and Rebalance.
-
For more information about configuring memory for services, see Configuring Memory.