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

When delayed_commits = true, keep updated btree nodes in memory until the commit

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 0.10
    • None
    • None
    • None
    • Committers Level (Medium to Hard)

    Description

      rnewson reported on IRC that the new batch=ok implementation results in significantly larger overhead in the .couch files. This makes sense; the old batch mode waited 1 second before saving, but the new implementation just updates the doc asynchronously. With fast hardware and moderate write rates it's likely that each document is being written separately.

      The overhead presumably arises from frequently updated btree inner nodes being written to disk many times over. I'm interested in exploring a modification of the delayed_commits mode whereby the updated btree nodes are not actually written to disk immediately, but are instead held in memory until the commit. I'd like to think that this will result in more compact files without any decrease in durability. New read requests would still be able to access these in-memory nodes.

      I realize the notion that updates go directly to disk is baked pretty deeply into couch_btree, but I still thought this was worth bringing up to a wider audience.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kocolosk Adam Kocoloski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: