Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-44192

Introduce metrics to measure the usefulness of the Top Chunk Optimisation

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Sharding EMEA

      The so called "Top Chunk Optimisation" in Sharding operates by checking whether writes are happening to the highest (or lowest) chunk of a collection and pre-splitting and possibly moving that chunk to a different shard. This is done in order to ensure that the "top chunks" are moved while empty (or as small as possible), rather than when they are full of data.

      Given that it only looks at the extreme chunks of the collection, the top chunk optimisation appears to only be useful for the cases where the collection is bulk-loaded, on a single thread, using data sorted on the shard key.

      Without this pattern, the top chunk optimisation is largely unused and in certain cases causes issues, because it would block the threads performing inserts to the extreme chunks. The blocking issue was mostly fixed in 4.2 by moving the auto-splitter to the shard servers and making it asynchronous, but in older versions it still persists.

      This ticket is to design and introduce metrics, which would validate the usefulness of the TCO. If it is determined that it is not useful, we will remove it.

            Assignee:
            backlog-server-sharding-emea [DO NOT USE] Backlog - Sharding EMEA
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: