Improve the cache locality of QueryKnobSnapshot

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently each QueryKnobSnapshots point to a shared threadlocal clone in attempt to minimize the ref counter contention. This has two undesired effects:

      • Increased memory usage scaled linearly to the thread count.
      • Increased likelihood of being evicted from the LLC.

       

      The proposed fix to address both issues is to use the shared_ptr aliasing constructor to separate the control and data blocks of QueryKnobSnapshots:

      • The data pointer should point towards a shared global region
      • The control pointer should point to a thread local instance.

            Assignee:
            Catalin Sumanaru
            Reporter:
            Catalin Sumanaru
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: