RFR: JDK-8319314: NMT detail report slow or hangs for large number of mappings [v2]

Thomas Stuefe stuefe at openjdk.org
Thu Nov 9 06:33:59 UTC 2023


On Sat, 4 Nov 2023 06:35:57 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> If a lot of mappings have been registered with NMT, NMT detail report may get so slow as to hang seemingly. 
>> 
>> 100 k mappings will take > 1 minute
>> 1 million mappings never returns (I canceled the test after 90 minutes)
>> 
>> We burn all the time doing a sorted insert into the target array of the MemBaseline object. That sorted insert is pointless since the source array is already sorted by region base address.
>> 
>> Omitting the pointless sort drops the runtime for 1 million mappings from > 90 minutes to 48 seconds.
>> 
>> Tests: Tested locally. GHAs (Windows error unrelated).
>
> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix builds

Hi Gerard,

thanks for looking into this. Answers below.

> I have a couple small questions/feedback - see below.
> 
> Also, you said:
> 
> ```
> 100 k mappings will take > 1 minute
> 1 million mappings never returns (I canceled the test after 90 minutes)
> ```
> 
> What are those times now with this change?

1 million mappings finished with my patch in 48 seconds.
100k mappings finished in 19 seconds I believe? The growth was exponential before my patch, now it seems linear.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/16480#issuecomment-1803237870


More information about the hotspot-runtime-dev mailing list