RFR: 8299234: JMX Repository.query performance [v5]
Alexey Bakhtin
abakhtin at openjdk.org
Wed Feb 15 13:48:46 UTC 2023
On Thu, 2 Feb 2023 13:42:51 GMT, Alexey Bakhtin <abakhtin at openjdk.org> wrote:
>> Please find a patch to improve JMX Repository.query performance
>>
>> Using ObjectName.apply() allows significantly decrease memory usage and the number of GC cycles:
>> Before:
>>
>> $ java test 1000000 1000000
>> Test PASSED in 8943169791 ns.
>> GC: G1 Young Generation getCollectionCount()=177 getCollectionTime()=118
>>
>>
>> After:
>>
>> $ java test 1000000 1000000
>> Test PASSED in 4808213917 ns.
>> GC: G1 Young Generation getCollectionCount()=88 getCollectionTime()=53
>>
>> Private ObjectName.matchDomains() method is also updated to minimize unnecessary memory allocation.
>>
>> All javax/management jtreg tests passed successfully.
>
> Alexey Bakhtin has updated the pull request incrementally with one additional commit since the last revision:
>
> Optimize ObjectName.matchDomains
@AlanBateman, Could you please take a look at the proposed performance improvement? It is required to reduce high CPU utilization caused by unnecessary HashTable cloning in the [ObjectName::getKeyPropertyList()](https://github.com/openjdk/jdk/blob/master/src/java.management/share/classes/javax/management/ObjectName.java#L1685). I also would like to backport it to 17, 11 and 8 if the changes are acceptable.
Thank you in advance
-------------
PR: https://git.openjdk.org/jdk/pull/11758
More information about the serviceability-dev
mailing list