Skip to content

[C++] Allow fine tuning of memory pool from environment variable(s) #27132

Closed as not planned

Description

@asfimport

Both jemalloc and mimalloc allow for some amount of fine tuning from environment variables.  However, in some cases, the settings entered into these environment variables are overridden by arrow.

For example, jemalloc docs describe MALLOC_CONF, an environment variable that can be used to tune any jemalloc parameter.  But, the global variable malloc_conf (which arrow uses) takes precedence.

Mimalloc also exposes some tuning parameters (https://microsoft.github.io/mimalloc/environment.html).  I have not tested which of these work and which do not work so it may be that all of them are accessible already.

Tuning may be useful in certain environments (for example, if someone wanted to use jemalloc over mimalloc in an environment where overcommit is disabled and so they wanted to set the retain:true option) and so it would be good to allow for these tuning parameters to be set at runtime.  One potential solution may be to expose our own environment variable (e.g. ARROW_MALLOC_CONF).

Reporter: Weston Pace / @westonpace

Related issues:

Note: This issue was originally created as ARROW-11228. Please see the migration documentation for further details.

Activity

  1. asfimport commented on Jan 12, 2021

    @asfimport
    Author

    Antoine Pitrou / @pitrou:
    We may want to expose backend-specific configuration options instead (ARROW_JEMALLOC_CONF, ARROW_MIMALLOC_CONF...) since one may select a different backend at runtime.

  2. github-actions commented on Jan 9, 2026

    @github-actions

    This issue has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label or comment below, or this issue will be closed in 14 days. If this improvement is still desired but has no current owner, please add the 'Status: needs champion' label.

  3. added
    Status: stale-warning
    on Jan 9, 2026
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

    Component: C++Status: stale-warningType: enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions