Erlang is used internally to manage and monitor all the persistence. So Couchbase Server is monitoring data files in order to see whether data fles are compacted and compact files when necessary; same with the view/indexes.
So this explains some CPU cycles of the erlang engine.
Remember that if you have installed the samples buckets (beer-sample, game-sample) contain some views.
My laptop is a retina macbook with an ivy bridge quad core in it. There is only 1 data bucket, with no documents in it and no indexes and views. I disabled everything that does anything with couchbase.
Still erl.exe takes up 5 - 10% of the CPU (after a fresh reboot of my laptop) and takes a whopping 334 MB for what? Also memcached.exe takes up 162 mb. That is around 500MB without any documents.
I’m sorry, I have no experience with couchbase but I can’t believe this is normal?
Couchbase is a great product, got it up and running and working nicely. I also tried out the balancing/replication thing and this works like a charm.
The only thing that sets me back is the idle cpu usage. Even when I restart my laptop (on which I got it running), as soon as the couchbase service starts running I can see erl.exe taking up 10% - 30% of my cpu with intervals (some seconds 0% some seconds between 15 and 30%)
I have no buckets but the default installed, no indexes/views, just a clean install.
I can confirm this. On a clean installation with one empty couchbase bucket, after idling for 7 days, the erl.exe process has accumulated more than 50 hours of CPU time, which is equivalent to 30% of one CPU. For comparison, my own python.exe process has accumulated 10 seconds of CPU time.
In our newest 7.X releases the CPU usage in what is considered an idle system is much lower. Although he processing overhead is still not zero the recurring CPU used for coordination between processes and monitoring is greatly reduced. In past release the CPU overhead was associated with the number of buckets, however the introduction of collections allows the equivalent of a 1,000 lightweight buckets (in a bucket.scope.collection organization) refer to What’s New in Version 7.0? | Couchbase Docs.
To give some concrete information on the improvements for a tiny three node cluster (3x AWS t3.small which is not even recommended for couchbase) loading 6 buckets with 50K docs each and creating an index in each bucket the idle CPU utilization has dropped from 19% down to 8%. But better yet using collections in a single bucket you can support 40+ collections in the same bucket with an idle CPU utilization of just 8%.
Note that statistics are now processed by prometheus as such the prior advice on changing static_config is no longer applicable in 7.X (and most like no necessary). Thus different parameters control the frequency of collection in prometheus DM me directly is you need directions using the REST API to alter the prometheus scrape intervals.