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

Stop saving 5 chunks in each ChunkPool

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 21
    • hotspot
    • b12

      In the 4 pre-defined ChunkPools the pruner save 5 chunks for re-use later in the program. The pruner runs every 5 seconds and saves the first 5 chunks that were last freed and put into the pool. In other words: The lifetime of these 5 chunks are indeterminate, we don't know when these will be freed. This is a problem, because these chunks are allocated with os::malloc(). We might be clobbering our underlying malloc's capacity to shrink its own arena sizes because of the placement of these chunks, and it would be very difficult for us to know whether this is the case.

      I suggest that we simply remove the saving of these 4*5 chunks, and instead prune all free chunks. If these 4*5 chunks are considered essential for performance, then we should pre-allocate them using mmap and never free those.

            jsjolen Johan Sjölen
            jsjolen Johan Sjölen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: