Question

I had a cluster which inculdes three nodes. We created a bucket inside and set the number of bucket replicas to be 2. Besides the RAM quota is set to be 10G per node, that is, the total RAM quota is 30G.

I used client-side to save data into this bucket. Hours later, the client-side printed Temporary failure error. and Couchbase web console showed that the bucket RAM reached 29G.Repeated data compression but the RAM didn't reduce anymore.

My questions is organized as follows.

1, I guess the key in bucket can only be saved into the RAM but not in hardware, right or wrong?

2,Wheter the 29G data, which can not be compressed into hardware ,is key or not?

3,Wheter each node that saves others node's replica information is saved in hardware or not? If not, how could it be saved.

4,Every time the client-side saves data, it will make use of hash function to evaluate vbucket in order to judge which nodes that the data will be saved in. Is the process carried on the client-side?

Was it helpful?

Solution

In response to your specific questions:

1, I guess the key in bucket can only be saved into the RAM but not in hardware, right or wrong?

If by hardware you mean disk; then yes, currently Couchbase must hold all document keys (along with some additional metadata) in RAM. This is to ensure that any request for a key can be answered immediately, both in the positive ("yes, this key exists and here's it's value) and the negative ("no, such a key doesn't exist.)"

2,Wheter the 29G data, which can not be compressed into hardware ,is key or not?

Some of this is probably the metadata. If you go to the Bucket tab and display it's statistics by clicking on it's name, you can see the amount of memory used - specifically under the VBucket Resources tab to see how much is used for metadata and user data. See the Couchbase Admin Guide - Viewing Bucket and cluster statistics for more details.

3,Wheter each node that saves others node's replica information is saved in hardware or not? If not, how could it be saved.

The replica metadata is also always kept in RAM, but the replica values (like active values) can be ejected to disk to free up memory.

4,Every time the client-side saves data, it will make use of hash function to evaluate vbucket in order to judge which nodes that the data will be saved in. Is the process carried on the client-side?

Yes the vbucket hashing is done on the client - see the Architecture and Concepts - Vbuckets section in the Admin guide.


In general you may want to review the Sizing chapter in the Admin guide to determine how much of you memory is being used for storing key metadata - specifically the Memory Sizing section. The exact calculation depends on the version of Couchbase (and so I won't duplicate here).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top