Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-12818

couchdb beam process doesn't start dir_size, gives very poor performance when scaling buckets up.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.0.0
    • 4.0.0
    • ns_server
    • Security Level: Public
    • For extreme CPU burning, requires a patch to remove the 10 bucket limit.

      However 10 buckets and CPU is a little hungry.
    • Triaged
    • No

    Description

      Issue found when running with 60 buckets and profiling all CPU intensive processes.

      fprof showed the per bucket couchdb_stats_reader code was spending a lot of time doing "dir_size:get", and with > 10 buckets this cost grows into a very CPU hungry beam. Note 10 buckets and things aren't too bad.

      Some analysis showed we were going down the dir_size:get_slow path because the dir_size module was not running in the couchdb beam process.

      53 get(Dir) ->
      54 case erlang:whereis(?MODULE) of <--- returning undefined
      55 undefined ->
      56 get_slow(Dir); <- yes this is SLOW!
      57 _Pid ->
      58 gen_server:call(?MODULE,

      {dir_size, Dir}

      , infinity)
      59 end.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jwalker Jim Walker
            jwalker Jim Walker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty