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

Optimize incremental update performance of ChunkManager and CollectionMetadata

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.7, 3.5.11
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
    • Fully Compatible
    • v3.4

      The ChunkManager and CollectionMetadata types are effectively in-memory routing tables used by map shard key values to chunks and shards. These data structures are read only, and updated copies must be made after chunk migrations. Because the data structures are updated by copy, their update time is proportional to the total number of chunks in a given collection. When the number of chunks in a collection is large (10s of thousands), the update time is significant, and increases the latency of chunk migration commit.

      This ticket tracks improvements to the constant factors affecting update time. Prototyping indicates that a speedup of >4x is possible by replacing woCompare with KeyString comparison, and by replacing all but one instance of std::map with instances of std::vector that are constructed in sorted order.

            schwerin@mongodb.com Andy Schwerin
            schwerin@mongodb.com Andy Schwerin
            3 Vote for this issue
            21 Start watching this issue