Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-16717

[C++] Enable Arrow to share an application's jemalloc instance

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 8.0.0
    • 9.0.0
    • C++

    Description

      Is there any good way for an application that uses Arrow to tell Arrow to share its own jemalloc instance?

      Normally when Arrow uses jemalloc, it creates its own instance of it. The only method that I think would work to get Arrow to use the same jemalloc instance as the application would be to do something hacky like this:

      • Patch cpp/src/arrow/memory_pool.cc to use the application's jemalloc header
      • Configure the application's jemalloc instance to use the same configuration that Arrow uses, as shown in je_arrow_malloc_conf
      • Patch ThirdpartyToolchain.cmake to use the application's jemalloc instance

      Is there any non-hacky way to achieve this? If not, would it be possible to add a feature to Arrow to enable the user to tell it to use a specific jemalloc instance at runtime?

      The benefit of this would be that a unified jemalloc instance could (at least hypothetically) allocate memory more efficiently than two separate ones running on the same machine.

      Attachments

        Issue Links

          Activity

            People

              kou Kouhei Sutou
              icook Ian Cook
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 10m
                  3h 10m