@akhilravuri2,
First and foremost RAM provides a cache so we always expect to utilize RAM as much as possible in Couchbase.
Now as to your issue “RAM usage reached limit. and stop[p]ed” what were your bucket settings for your “Ejection Method”?
Value Ejection: During ejection, only the value will be ejected (key and metadata will remain in memory).
Full Ejection: During ejection, everything (including key, metadata, and value) will be ejected.
Value Ejection needs more system memory, but provides the best performance. Full Ejection reduces the memory overhead requirement.
If you have your bucket set to “Value Ejection” (the default for “Couchstore”) your system will keep the “key” in memory and this stopping can indeed can happen if you do a test in the UI you might see some warnings pop-up like
[17 Jul, 2022, 10:03:31 AM] - Metadata overhead warning.
Over 56% of RAM allocated to bucket "bb" on node "127.0.0.1"
is taken up by keys and metadata.
I did a test with a single 100MB couchstore bucket with the ejection method “Value Ejection” on a single node test setup. I could only load 565,543 documents like the below:
{"type":"vbs_seed","id":40600001,"dummy":"not_set","timeStamp":"December 5, 2018"}
Essentially I had a source file of 100K docs like the above called “100k.json” then I used the following script to quickly hit capacity.
for i in `seq 1 500`; do
echo "seq $i trying 100K load"
/opt/couchbase/bin/cbimport json -c couchbase://127.0.0.1 -u $CB_USERNAME -p $CB_PASSWORD -b bb -d file://./100k.json -f lines -t 12 -g bigtest:#UUID#:#MONO_INCR#
done
Now changing the ejection method “Full Ejection” I could once again load data (just rerun the bash script above) - I ran the test 50M with no issues.
I do want to caution that Couchbase generally officially only supports a 10% residency ratio on buckets of type “Couchstore” our next release 7.2 will have a storage backend of “Magma” (the default ejection method here will be “Full Ejection” ) that will support very low residency ratios across all of our services.
Best
Jon Strabala
Principal Product Manager - Server