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

Make map/reduce complexity visible to users

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • feature-backlog
    • 2.2.0
    • UI, view-engine
    • Security Level: Public
    • None

    Description

      Background / Issue:

      It is currently hard to convey to the user how complex / costly an index is to build. This cost is both in terms of computation (i.e. time) and data emitted (i.e. space). We often end up telling customers "this map function is too complex", or "it emits too much data", but this assessment currently needs to be made by a (Couchbase) expert; and other than trying to follow the high-level guidelines in the dev guide we don't provide anything in the UI / REST api to assist developers.

      While the same could be said for non-view CRUD operations, these have only a handful of factors which can affect their performance (key/value size, op/s, replica count, XDCR) whereas map / reduce functions can have arbitrarily complexity and output an arbitrary amount of data.

      Ideas:

      • Measure the execution time of the map and reduce functions, and expose this to the user. Perhaps give them a 'traffic' light summary of the cost (although this may be difficult to calibrate).
      • Average per-document processed, total across view?
      • Initial index creation vs. incremental updates.
      • Development subset vs. Production full view.
      • Display minimum, median, max for above execution time.
      • Similarly for space, output the size of the view. Note we already have the total view size (view stats: data size, disk size) but knowing the size before reduce would be useful.
      • Look into V8's profiling support - could we show a per-line profile of execution time?

      Attachments

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

        Activity

          People

            srinivasan.raman Srinivasan Raman
            drigby Dave Rigby (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty