CouchDB
  1. CouchDB
  2. COUCHDB-976

Improve database read and write performance using 2 couch_files

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Right now we use a single couch_file server for both updating a database and reading from a database.
      This is a contention point, as concurrent read/write access to a database implies having processes waiting for access to the couch_file server.

      The following patches add a couch_file server that is used only by the DB updater process and another couch_file meant to be used by anyone else only for read operations:

      https://github.com/fdmanana/couchdb/compare/updater_dedicated_fd

      Some performance measurements:

      1. updater_fd vs trunk (small docs, 1Kb each)

      $ node tests/compare_write_and_read.js --wclients 50 --rclients 200 \
      -name1 updater_fd_small_docs -name2 trunk \
      -url1 http://localhost:5984/ -url2 http://localhost:5985/ \
      --duration 300

      http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe271104a616

      1. updater_fd vs trunk (large docs, 100Kb each)

      $ node tests/compare_write_and_read.js --wclients 50 --rclients 200 \
      -name1 updater_fd_large_docs -name2 trunk \
      -url1 http://localhost:5984/ -url2 http://localhost:5985/ \
      --duration 300 --doc large

      http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe271104a7a7

      We can see that both the response time and throughput gets significantly better for both read and writes.

      If no objections I'll commit it to trunk.

        Activity

          People

          • Assignee:
            Filipe Manana
            Reporter:
            Filipe Manana
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development