Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8318007

Reduce hotspot arena fragmentation

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • tbd
    • tbd
    • hotspot

    Description

      We waste memory because:
      - we abandon chunk remainders when creating a new chunk
      - we often abandon old storage when we reallocate an array within the arena

      I attempted to measure how much memory is wasted and got, for C2, to about 5-10%. Would be nice to reduce fragmentation.

      One way to go about it would be to reuse the memory via freelist or some blocktree. Metaspace does that. The problem is that, unlike Metaspace, these arenas get rolled back (HandleArea, ResourceArea) and an efficient way must be found to cut those blocks that are part of the rolled-back portion from the freelist, and to do that very quickly since we use ResourceMarks often.

      Attachments

        Activity

          People

            stuefe Thomas Stuefe
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: