Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-4216

Call out limitations of channel count per-doc

    XMLWordPrintable

Details

    Description

      We should probably have somewhere with general guidance on what we consider to be an 'excessive' number of channels for a single document, and suggestions for grouping these channels up into roles to reduce the overhead on a single document.

       

      Currently when using convergence, we have a hard limit of 1MB of metadata.

      A very rough estimate can be calculated with the following formula:

       

      Convergence channels per doc calculation:

      max channels per doc = 1MB xattrs limit / ( average channel name size * revs_limit )**

       

      Given an average channel name size of 25 bytes, and 1MB of xattrs... we get:
      revs_limit=1000: ~40 channels
      revs_limit=100: ~400 channels

       

      With non-convergence, the limit is more lax, but it eats into the 20MB doc size instead. Larger documents have less room for large numbers of channels.

       

      Non-convergence channels per doc calculation:

      max channels per doc = (20MB doc limit - doc size) / ( average channel name size * revs_limit )

      Given the same criteria, but also a 5MB doc body, we'll get:

      revs_limit=1000: ~600 channels
      revs_limit=100: ~6,000 channels

       

      There is definitely scope for optimizing how we store channel data in a document's metadata, especially for the case of xattrs where space is a premium, but I think it's still good to get a rough guide up somewhere.

       

      Attachments

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

        Activity

          People

            ben.brooks Ben Brooks
            ben.brooks Ben Brooks
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty