RAM quota allocation is governed through individual services.
Each service in Couchbase Server tunes its caching based on its needs.
The Data service uses a managed cache based on memcached that is tuned to enable fast key based read and write operations with low latency under high concurrency.
The Index and Search services manage cache to ensure index maintenance and scans can be serviced fast for the most popular indexes in the system.
Query service manages its memory to calculate query responses by processing streams effectively for the execution plans generated by the optimizer and caches certain parts of those query plans.
Allocation of memory to services is governed through RAM quota allocations. Data, Index and Search services both configure RAM quotas per node in the cluster. Query service automatically manages its memory without a defined quota.
Each node in the cluster running the relevant services inherits the value and may allocate up to the specified amount.
Index RAM Quota governs the index service RAM quota allocation per node. Each node running the index service inherits the value of Index RAM Quota for caching Global Secondary Indexes (GSI).
Search RAM Quota governs the search service RAM quota allocation per node. Each node running the search service inherits the value of search RAM Quota for caching Full Text Indexes.
Data RAM Quota governs the data service RAM quota allocation per node. Each node running the data service inherits the value set for Data RAM Quota for caching bucket data.
Bucket RAM Quotas are allocated out of the Cluster Data RAM quota. As an administrator, you can control the total RAM quota allocated to each bucket through Bucket RAM Quota under bucket settings. The total RAM configured across all buckets cannot exceed the total Data RAM Quota allocated for the data service at the cluster level.