Memory usage and High water mark
Hi again,
Couchbase 1.8 with 4 nodes in AWS
So I've noticed on one my buckets that holds 8 million keys has a memory usage (4.8G) above that of the High water mark (4.2G) I've read the documentation here http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-bestpractic... which says that the high water mark is set by default to 70% of the memory available to the node (6.4GB)
The documentation here http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-bestpractic... that implies that memory usage above the high water mark is a bad thing, because some keys will be evicted to disk rather than kept in memory.
I know I can use cbflushctl to set a higher high water mark, but I'm concerned about the effect this will have on the rest of the buckets / overall cluster health. Is there any reason I shouldn't (for example) set the high water mark at 5G? Each node has 7.5G of RAM.
Any guidance would be appreciated.
Geo.
Hi,
I just want some more information before we get to a conclusion,
may i know the number of nodes & RAM on each of them
How many buckets and Replicas per bucket, and RAM allocated for each bucket.\
May i know how you initially calculated the number of nodes & RAM per node allocation. Because best practise guide not only helps you understand the maintenance but also will help you with the set up. Awaiting your reply.
Thanks
Neo
Hi Neo, and thanks again for your input.
4 Nodes 7.5GB per node of physical RAM
5 buckets with 1280M allocated per bucket
3 replicas per bucket
In terms of the calculations, Im afraid I didnt set the cluster up, so I haven't performed them. The inital set of buckets was configured with 3 replicas, so the 4 nodes, which exist in different availability zones are primarily to ensure we get the required number of replicas.
Here's what numbers I've managed to gather for the bucket in question:
documents_num - There are 7988367 documents in the bucket
ID_Size - Average size of document IDs is 20 bytes
value_size - Average size of 750 bytes
number_of_replicas - 3
working_set_percentage - 25%
Per_node_ram_quota - 6.4GB
Thanks
Geo
Hi,
per_node_ram_quota = 6.4GB --> could you please help me with the command that fetched you this info.
And also say 6.4GB usable by that bucket, in our case memory filled with 4.8GB, then its exactly 75% and it has went passed the high water mark.
And if my assumption is incorrect, please let me. then may i know why really 3 replicas, any specific reason.
Thanks,
Neo
Hi Neo,
per_node_ram_quota = 6.4GB --> could you please help me with the command that fetched you this info.
Actually I got this slightly wrong, the per node quota is actually 6.25GB (6400MB) its shown in the server details under Manage->server nodes in the web interface.
And also say 6.4GB usable by that bucket, in our case memory filled with 4.8GB, then its exactly 75% and it has went passed the high water mark.
Yes, I read that the default High water mark is set at 75% of the per node quota. Im really just wondering if having "memory used" above the "high water mark" is a problem, and if so, is it just a matter of raising the high water mark?
And if my assumption is incorrect, please let me. then may i know why really 3 replicas, any specific reason
Again, the 3 replicas were chosen before I joined. The thinking was "more resilience" even though they only had two nodes at the time I started
I hope this helps
Geo
Hi Geo,
Thanks for the appropriate answers. It helped
just to provide more information on the High watermark, its where the memory starts eviction. It will start removing items from the memory to free up space. And its benn designed in such a way to prevent the performace issues fom happening. Because we know that couchbase is more dependent on RAM. So mysuggestion would be, not to increase the High water mark level, instead we add more hardware. In other words, we can add nodes to keep things under control.
I hope it helped you. If not, please let me know
Thanks,
Neo
As i understand, problems will occur not when the cluster is running healthy, but during a problem, think of a disk problem or rebalance etc. There are currently problems in those areas already, reducing available ram for system and couchbase will make them even worse