Getting Memory Information

      +
      Use the REST API to retrieve the current memory quota information for services in a cluster.

      HTTP Method and URI

      GET /pools/default

      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.

      curl Syntax

      curl -v -X GET <network_address>:<port_number>/pools/default \
       -u <username>:<password>

      Required Permissions

      Full Admin role.

      Responses

      Value Description

      200 OK and JSON array containing the expired backups and their details.

      Successful call.

      400

      Invalid parameter.

      401 Unauthorized

      Authorization failure due to incorrect username or password.

      403 Forbidden, plus a JSON message explaining the minimum permissions.

      The provided username has insufficient privileges to call this method.

      404 Object Not Found

      Error in the URI path.

      500 Internal Server Error

      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:

      • memoryQuota for the Data Service.

      • queryMemoryQuota for the Query Service.

      • indexMemoryQuota for the Index Service.

      • ftsMemoryQuota for the Search Service.

      • cbasMemoryQuota for the Analytics Service.

      • eventingMemoryQuota for 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.