Remove fragmentation from secure alloc

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Security
    • Server Security 2025-07-20, Server Security 2025-08-01, Server Security 2025-08-15, Server Security 2025-10-10, Server Security 2025-10-24
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The secure allocator manages memory regions with OS-level protections for sensitive data like AES keys, using mlock to prevent swapping. However, it suffers from fragmentation: freed memory isn't reused, and old pages are only released when all their allocations are freed. This causes partially used pages to accumulate over time.

      Fragmentation increases MongoDB's unswappable memory footprint, reducing OS flexibility during memory pressure. This may lead to performance degradation or unexpected OOM kills. Allowing the secure allocator to re-use freed memory will improve memory efficiency and system stability.

            Assignee:
            Unassigned
            Reporter:
            Niaz Pavel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: