We have set up some environments using Couchbase 4.0.0-4051 Community Edition (build-4051) on AWS Linux. From what we observe, it uses CPU constantly even though there is a minimal load.
In one environment, we have 2 Couchbase nodes running on m3.large (2 vCPU, 7.5GB RAM) using one replication. There is only one bucket being used with 6.3M items in it. All the data was migrated, and after the migration, there is little to no writes to the data, with only a few occasional reads.
Since the time of the migration (which is a week ago), both servers are showing up as 80% CPU usage constantly in AWS Monitoring. When I checked using top command in the node, it shows that indexer process is the one using CPU most of the time. The Index settings are set to only use 2 Indexer Threads, and Indexer RAM Quota is set to 512MB.
Actually, this is not the only environment that we find Couchbase constantly using CPU. Some other environments have much smaller bucket size, with very few usage, but the CPU is constantly being used 15-30% all the time. When I restarted the nodes, it normally goes away, but comes back whenever there are some operations done, and then stays at that CPU range forever.
May I know if this is a known issue with Couchbase 4.0 Community Edition? Or something possibly wrong with the setup of the Couchbase servers?
I’ve seen a similar problem with couchbase-server-enterprise_4.5.0-beta-ubuntu14.04_amd64.deb. My server has almost zero load, yet when left alone for a week or so the CPU and swap usage starts to creep up until eventually I have to reboot the server.
Thank you all for your input. Here is what I’ve found so far.
I have upgraded to 4.1 Community Edition. The CPU usage is still there. After trying with different indices and views, I have found the following.
There is one index that I’m using which uses around 2.5GB of disk size (others have 35MB most). After this index is built, the node containing this index has increased constant CPU usage even after the index building is finished.
When I restarted the node, its CPU usage goes back to normal (average 15%). It seems like whenever a big GSI index is built, there is some lingering operation that never stops until the server (or probably the service) is stopped.
My server needs rebooting every 7 days, regular as clockwork it seems. It’s under almost no load (my app isn’t even live yet). CPU and disk access massively spike after about 6 days and on the 7th I need to restart the server:
We are having the same issue (high cpu usage) with 4.1 CE even when system is idle and we end up rebooting the servers . I am hearing from couchbase that in 4.5 the issue is resolved. Has anyone experienced this with 4.5 as well?