High RAM usage. Upgrade needed or normal?


#1

Hi

I have 3 Couchbase servers in a cluster. They are only used for couchbase. All (virtuell) machines have the same specs. The specs per machine are 4GB RAM; 2 cores Intel Xeon. Each server preserves 1.2GB RAM for Couchbase documents. 1.2GB of 4GB is about 30%. But usage is way higher.

What would happen if I double the RAM of each machine (4GB -> 8GB)? Will the usage go up to 90% again? Is this expected bahaviour?
More details: there are no disk fetches, all documents are still in RAM. There were not many operations per second while taking the screenshot. The servers more or less idle.

Thanks, Ben


#2

Hi, benjamin,

  1. When you upgrade from 4GB to 8GB, RAM usage won’t be shown as 90%.
  2. Is 4GB the total RAM for the physical box or 4GB perf VM? Are these 3 VMs co located on one physical box?
  3. Can you go to your settings tab to check RAM quota for Data/Index Service ?

Thanks,
Qi


#3

In addition, generally speaking, Couchbase works hard to keep as much of the data as possible in memory including replicas. This benefits you in that you’ll have faster failover in the event of failure.

What you’re seeing is fairly normal. If you add more resources, you’ll have more free memory. If you don’t add more resources, replica items will be ejected first, then less used items, etc.


#5

Thank your for the many quick responses. I feel this is an important question and should be discussed thoroughly.

@qicb
2. I rent virtual servers. The provider is similar to AWS. 4GB is the total RAM for one virtual server. I don’t know if the 3 VMs are on one physical server.
3.

@ingenthr
It’s great that Couchbase tries to keep as much documents in RAM as possible. Still I don’t understand it thoroughly. Here’s my back-of-the-envelope calculation:
3 servers; each server has 4GB RAM; each server preserves 1.2GB for Couchbase data; each server has 1GB of Couchbase data in RAM. Is there replica data in the 1GB RAM? Why can I limit how much RAM can be used for Couchbase data, if I actually cannot? Or in other words why is the RAM usage at about 3.6GB (90% of 4GB) per one virtual server. 1.2GB is used for Couchbase data, what are the remaining 2.4GB used for? Apologies if I came across rude. It would be great if you have an answer.

@vhp1360
I don’t have an answer for you. But I’d like to add additional info of my cluster. Currently 3.51GB/3600MB are in use. The total physical RAM of the cluster is 12GB.

Thanks, Ben


#6

I need to correct one thing. In the first post I said that all documents are still in RAM. This is not true, it’s about 80% now.