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

Remove WiredTiger scratch buffer support

    • Type: Icon: Technical Debt Technical Debt
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Not Applicable

      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).

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: