Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-4876

Remove WiredTiger scratch buffer support

    XMLWordPrintable

    Details

    • Type: Technical Debt
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: None
    • Labels:

      Description

      The standard allocators, jemalloc and tcmalloc have per-thread (tcmalloc), and per-core (jemalloc) caches, which means they reasonably expect to allocate memory without locking, which is the purpose of WiredTiger's scratch buffer support.

      If MongoDB is reasonably limited to those allocators in production systems, we should measure if they are at least as fast as WiredTiger's code. If they are, we should remove the WiredTiger scratch buffer code in favor of simply calling the standard memory allocation functions.

      This will simplify some WiredTiger code paths and stop WiredTiger from tying down memory in idle WT_SESSION handles.

      Alternatively, if MongoDB isn't limited to allocators that support lock-free allocation, we could set session_scratch_max=0 to not cache buffers, or use some other mechanism to avoid caching buffers (assuming we can figure out when we're using a lock-free allocator).

        Attachments

          Activity

            People

            Assignee:
            backlog-server-storage-engines Backlog - Storage Engines Team
            Reporter:
            keith.bostic Keith Bostic
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated: