My couchbase installation (on BSD) reserves 15G RAM while the machine only has 4GB RAM available.
PID USERNAME PRI NICE SIZE RES STATE WAIT TIME CPU COMMAND
33106 root 2 0 15G 285M onproc/1 select 42:48 40.38% beam.smp
Couchbase runs fine for a month or so, but then the actual amount of used memore becomes bigger than memory available and as a consequence the machine starts swapping.
Where can I configure how much Couchbase shall reserve?
Memory usage over time, can be caused by a whole range of activities. Something as simple as adding more documents into your cluster over time will add additional memory requirements. Other things to look for include checking the resources used by the built-in stats collection and any looking for issues with memory fragmentation. Couchbase has used the open source JEMalloc dynamic memory allocator since version 4.0 to manage memory usage, if your system is having issues with JEMalloc it may not be freeing memory correctly. If you are using an older version, I would suggest using a later release.
Memory usage is controlled by setting quotas in Couchbase Server. There’s a Server Quota and a per bucket Quota that can be configured for the data service, and individual quotas for other services deployed.
Running on BSD is something we rarely see as you’d need to make your own custom build. Given we do not build or test this platform, if possible I’d suggest using a pre-built package on another platform such as Linux, just in case this issue you are seeing is being caused by something in your build or environment.
Ian McCloy (Principal Product Manager, Couchbase)