Skip to content

THP usage regression after aligned metadata optimization for faster frees #1502

Open

Description

@PerFuchs

It looks like THP usage regressed after optimizing free with aligned page metadata. The second commit of this work effort introduces an fallback to allocate from the OS directly with allow_large=false. In version 3, allow_large=false disables the THP page hint. So, these pages don't get a THP hint. This leads to a major regression in one of our workloads (a TPC-DS benchmark query regresses from 13.5s to 18s) due to more page faults.

This PR against version 2 of mimalloc reasons why allow_large=false should not be involved in deciding the THP hint. Could you check if the same fix should be applied to version 3 now?

Activity

  1. daanx commented on Nov 18, 2026

    @daanx
    Collaborator

    Thanks Per -- good catch; not sure how this regressed back :-( Fixed now, and also improved the eligibility check.

  2. PerFuchs commented on Nov 19, 2026

    @PerFuchs
    Author

    Thanks for the fast fix! Out of interest when do you expect to release this? It's not urgent from our site. I'm more wondering what's the general rule for a new patch release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions