Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-3307

Limit calls to maybe_add_sys_db_callbacks to once per db open

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Database Core
    • Labels:
      None

      Description

      As part of performance regression testing we found out that there was a code change in
      couch_server:open/2,
      Options = maybe_add_sys_db_callbacks(DbName, Options0)
      and as a result of that change, we are basically calling maybe_add_sys_db_callbacks for each request instead of once per db open.

      We have tested a fix to ensure that we call maybe_add_sys_db_callbacks only once per db open. And executed a GET performance benchmark and found the following improvements.

      • Throughput: Up to ~5% improvement.
      • Up to ~22% improvement in p90 and p99 latencies

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user brkolla opened a pull request:

          https://github.com/apache/couchdb-couch/pull/230

          Add sys db callbacks only once per db open

          Currently we are adding the sys db callbacks for every request instead once
          while opening the db. This fix will ensure that we will only add the sys
          db calls backs once while opening the db.

          COUCHDB-3307

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/cloudant/couchdb-couch add_sysdb_callback_once_per_db

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/couchdb-couch/pull/230.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #230


          commit e046427283961be73e2077ac990f3f0428cb8d2d
          Author: brkolla <bkolla@cloudant.com>
          Date: 2017-02-19T21:33:39Z

          Add sys db callbacks only once per db open

          Currently we are adding the sys db callbacks for every request instead once
          while opening the db. This fix will ensure that we will only add the sys
          db calls backs once while opening the db.

          COUCHDB-3307


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user brkolla opened a pull request: https://github.com/apache/couchdb-couch/pull/230 Add sys db callbacks only once per db open Currently we are adding the sys db callbacks for every request instead once while opening the db. This fix will ensure that we will only add the sys db calls backs once while opening the db. COUCHDB-3307 You can merge this pull request into a Git repository by running: $ git pull https://github.com/cloudant/couchdb-couch add_sysdb_callback_once_per_db Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-couch/pull/230.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #230 commit e046427283961be73e2077ac990f3f0428cb8d2d Author: brkolla <bkolla@cloudant.com> Date: 2017-02-19T21:33:39Z Add sys db callbacks only once per db open Currently we are adding the sys db callbacks for every request instead once while opening the db. This fix will ensure that we will only add the sys db calls backs once while opening the db. COUCHDB-3307
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 8fc85c8653dcec640717d8a51ea29a28194cbe4a in couchdb-couch's branch refs/heads/master from brkolla
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=8fc85c8 ]

          Add sys db callbacks only once per db open

          Currently we are adding the sys db callbacks for every request instead of
          once while opening the db. This fix will ensure that we will only add the
          sys db call backs once while opening the db.

          COUCHDB-3307

          Show
          jira-bot ASF subversion and git services added a comment - Commit 8fc85c8653dcec640717d8a51ea29a28194cbe4a in couchdb-couch's branch refs/heads/master from brkolla [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=8fc85c8 ] Add sys db callbacks only once per db open Currently we are adding the sys db callbacks for every request instead of once while opening the db. This fix will ensure that we will only add the sys db call backs once while opening the db. COUCHDB-3307
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/couchdb-couch/pull/230

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/couchdb-couch/pull/230
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 8fc85c8653dcec640717d8a51ea29a28194cbe4a in couchdb-couch's branch refs/heads/2971-count-distinct from brkolla
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=8fc85c8 ]

          Add sys db callbacks only once per db open

          Currently we are adding the sys db callbacks for every request instead of
          once while opening the db. This fix will ensure that we will only add the
          sys db call backs once while opening the db.

          COUCHDB-3307

          Show
          jira-bot ASF subversion and git services added a comment - Commit 8fc85c8653dcec640717d8a51ea29a28194cbe4a in couchdb-couch's branch refs/heads/2971-count-distinct from brkolla [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=8fc85c8 ] Add sys db callbacks only once per db open Currently we are adding the sys db callbacks for every request instead of once while opening the db. This fix will ensure that we will only add the sys db call backs once while opening the db. COUCHDB-3307

            People

            • Assignee:
              Unassigned
              Reporter:
              kbkreddy Bala Kolla
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development