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

Revisit memory layout for TenantId, DatabaseName, and NamespaceString to address performance regression

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0, 7.0.0-rc1
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • v7.0
    • Server Serverless 2023-04-17, Server Serverless 2023-05-01
    • 129

      NamespaceString is one of the core datatypes of the system. It is widely used for authorization checks, logging, resource locking, etc. Ongoing changes have led to the NamespaceString class to grow from 40 bytes to 88 bytes and based on this patch build it appears the performance is sensitive to changes only to the size of the data structure (e.g. 8-9% throughput drop for linkbench2).

      The addition of the DatabaseName class as a member variable to NamespaceString is what accounts for the additional 48 bytes. We should explore different memory layouts for TenantId, DatabaseName, and NamespaceString to have the system be more efficient.

            Assignee:
            matt.broadstone@mongodb.com Matt Broadstone
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: