Beam smp use too much CPU, couchbase server version 5.0.1

The process beam.smp uses too much CPU. I am running couchbase server 5.0.1 on Ubuntu 16.04 of a 56 threads CPU machine, only one node.

The couchbase only contains a the sample dataset. Event in the situation without any data, beam.smp still uses up to 30% CPU.

  PID USER      PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command
 7451 couchbase  20   0 2958M  378M  5632 S 105.  0.6 16:26.45 /opt/couchbase/lib/erlang/erts-5.10.4.0.0.1/bin/beam.smp -A 16 -sbt u -P 327680 -K true -swt low -MMmcs 30 -e102400 -- -root /opt/couchbase
 7480 couchbase  20   0 2958M  378M  5632 S  3.4  0.6  0:22.92 /opt/couchbase/lib/erlang/erts-5.10.4.0.0.1/bin/beam.smp -A 16 -sbt u -P 327680 -K true -swt low -MMmcs 30 -e102400 -- -root /opt/couchbase
 8720 couchbase  20   0 7008M  541M 17784 S  6.5  0.8  1:08.35 /opt/couchbase/bin/indexer -vbuckets=1024 -cluster=127.0.0.1:8091 -adminPort=9100 -scanPort=9101 -httpPort=9102 -streamInitPort=9103 -strea
 7478 couchbase  20   0 2958M  378M  5632 S  4.4  0.6  0:26.12 /opt/couchbase/lib/erlang/erts-5.10.4.0.0.1/bin/beam.smp -A 16 -sbt u -P 327680 -K true -swt low -MMmcs 30 -e102400 -- -root /opt/couchbase
 7479 couchbase  20   0 2958M  378M  5632 S  5.2  0.6  0:22.26 /opt/couchbase/lib/erlang/erts-5.10.4.0.0.1/bin/beam.smp -A 16 -sbt u -P 327680 -K true -swt low -MMmcs 30 -e102400 -- -root /opt/couchbase
 7474 couchbase  20   0 2958M  378M  5632 S  6.0  0.6  0:40.55 /opt/couchbase/lib/erlang/erts-5.10.4.0.0.1/bin/beam.smp -A 16 -sbt u -P 327680 -K true -swt low -MMmcs 30 -e102400 -- -root /opt/couchbase
1 Like

What the full process thats running?

example on my mac running Couchbase I did.

#ps -f -p PID

OUTPUT.

Users-MacBook-Air:~ user$ ps -f -p 8830
  UID   PID  PPID   C STIME   TTY           TIME CMD
  501  8830  8814   0 10:58PM ??         0:04.26 /Applications/Couchbase Server.app/Contents/Resources/couchbase-core/lib/erlang/erts-5.10.4.0.0.1/bin/beam.smp -A 16 -- -root /Applications/Couchbase Server.app/Contents/Resources/couchbase-core/lib/erlang -progname erl -- -home /Users/user -- -kernel inet_dist_listen_min 21100 inet_dist_listen_max 21299 -sasl sasl_error_logger false -hidden -name babysitter_of_ns_1@127.0.0.1 -setcookie nocookie -run ns_babysitter_bootstrap -- -couch_ini /Applications/Couchbase Server.app/Contents/Resources/couchbase-core/etc/couchdb/default.ini /Applications/Couchbase Server.app/Contents/Resources/couchbase-core/etc/couchdb/default.d/capi.ini /Applications/Couchbase Server.app/Contents/Resources/couchbase-core/etc/couchdb/default.d/geocouch.ini /Applications/Couchbase Server.app/Contents/Resources/couchbase-core/etc/couchdb/local.ini /Users/user/Library/Preferences/couchbase-server.ini /Users/user/Library/Application Support/Couchbase/etc/couch-platform.ini /Users/user/Library/Application Support/Couchbase/etc/couch-custom.ini -ns_babysitter cookiefile "/Users/user/Library/Application Support/Couchbase/var/lib/couchbase/couchbase-server.cookie" -ns_server config_path "/Users/user/Library/Application Support/Couchbase/etc/couchbase/static_config" -ns_server pidfile "/Users/user/Library/Application Support/Couchbase/couchbase-server.pid" -ns_server cookiefile "/Users/user/Library/Application Support/Couchbase/var/lib/couchbase/couchbase-server.cookie-ns-server" -ns_server dont_suppress_stderr_logger true -ns_server loglevel_stderr info

if you scroll alllllll the way to the right you’ll see that the Couchbase’s babysitter is running.

Looks like you already know your PID.

Hi househippo

I restart the couchbase-server and pid has changed. However the cpu usage is still high.
It is as following:

UID        PID  PPID  C STIME TTY          TIME CMD
couchba+ 24589 24386 99 11:32 ?        05:06:54 /opt/couchbase/lib/erlang/erts-5.10.4.0.0.1/bin/beam.smp -A 16 -sbt u -P 327680 -K true -swt low -MMmcs 30 -e102400 -- -root /opt/couchbase/lib/erlang -progname erl -- -home /opt/couchbase -- -smp enable -setcookie nocookie -kernel inet_dist_listen_min 21100 inet_dist_listen_max 21299 error_logger false -sasl sasl_error_logger false -user user_io -run child_erlang child_start ns_bootstrap -- -smp enable -couch_ini /opt/couchbase/etc/couchdb/default.ini /opt/couchbase/etc/couchdb/default.d/capi.ini /opt/couchbase/etc/couchdb/default.d/geocouch.ini /opt/couchbase/etc/couchdb/local.ini

Sounds like you seeing the same thing as below.
https://issues.couchbase.com/browse/MB-27274

While the performance work done for production is probably ideal, being able to run this on developer laptops without slaughtering the battery is also important. We need a way to throttle these processes. As a developer, I don’t replication running, or fast indexing, or any of that. I just need to put data in buckets and get data out.

I’m up-voting this issue as it’s a blocker for us.

Thanks!

P.S. The old (and I mean old) Windows service version works for us. It would be nice to get updated and to use the Couchbase community docker image, but having the container take 5%-12% constantly while nothing is happening is unacceptable.

1 Like