Index Memory Quota Usage

Hi Team,

We had a two-node cluster, each with 32 GB RAM. We assigned 9 GB to the index service on each node, but when checking the servers, one node’s index service uses more memory while the other uses less. Could you help us understand why?

Thanks,

Debasis

Ask your question on the AI chat bot on the lower right of Couchbase Documentation | Couchbase Docs

Why do index nodes use different amounts of RAM?

The index nodes in a Couchbase cluster can use different amounts of RAM due to the following reasons:

  1. Index size: Different indexes can have varying sizes depending on the number of entries, key lengths, and document IDs. Larger indexes require more RAM.

  2. Index storage type: Memory-optimized indexes reside fully in memory, while standard indexes keep only a working set in memory. Memory-optimized indexes consume more RAM.

  3. Index updates: Indexes with higher mutation rates (inserts, updates, deletes) require more RAM to process the pending updates efficiently.

  4. Index memory quota: Each node running the Index Service has a configurable memory quota. Nodes with different quotas will use varying amounts of RAM for indexes.

  5. Index data distribution: If indexes are not evenly distributed across nodes, some nodes may host larger portions of index data, leading to higher RAM usage.

By monitoring index statistics like index memory usage, pending updates, and scan rates, you can understand the RAM usage patterns and adjust the memory quotas or index configurations as needed.

Learn more at:

Thanks @mreiche for explanation. I understand these points, but my concern is why Couchbase does not distribute index data evenly across two nodes both running the Index service. Here we do not explicitly configure memory quota for each node. We configure the quotas across cluster.

Thanks,

Debasis

I assume because if cost. Just like a binary tree. There is a cost to balance. And as long as the performance is satisfactory, there is no reason to incur the extra cost of balancing.

Now - if one node was failing because it had exceeded the allowable RAM, while the other node had plenty of spare RAM, then there would be an issue.