RFR: 8299234: JMX Repository.query performance [v3]

Alexey Bakhtin abakhtin at openjdk.org
Thu Feb 2 13:59:27 UTC 2023


On Mon, 23 Jan 2023 14:14:50 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> Alexey Bakhtin has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix parameters order for Util.wildmatch
>
> Hi Alexey - you have addressed most of my concerns but let me reinstate that the changes to ObjectName are observable by subclasses and thus will require a CSR. As such this fix may also not be a good candidate for backport (if that was your intention), as it comes with a potential regression risk. A possibility could be to implement the ObjectName changes as a separate PR.

@dfuch, I've returned ObjectName optimization for the instances of ObjectName class only.
JMH benchmark does not show much difference without these changes.
Benchmark results for original implementation:

Benchmark                                 (N)   Mode  Cnt    Score    Error  Units
JmxBenchmark.applyForMyObjectName        1000  thrpt   10  539.134 ± 11.643  ops/s
JmxBenchmark.applyForObjectName          1000  thrpt   10  495.961 ± 10.550  ops/s
JmxBenchmark.queryMBeansForMyObjectName  1000  thrpt   10   75.482 ±  0.302  ops/s
JmxBenchmark.queryMBeansForObjectName    1000  thrpt   10  111.721 ±  0.462  ops/s
JmxBenchmark.queryNamesForMyObjectName   1000  thrpt   10   79.004 ±  0.398  ops/s
JmxBenchmark.queryNamesForObjectName     1000  thrpt   10  125.877 ±  2.024  ops/s

Benchmark results for the proposed implementation:

Benchmark                                 (N)   Mode  Cnt    Score    Error  Units
JmxBenchmark.applyForMyObjectName        1000  thrpt   10  542.233 ±  4.137  ops/s
JmxBenchmark.applyForObjectName          1000  thrpt   10  668.710 ± 13.124  ops/s
JmxBenchmark.queryMBeansForMyObjectName  1000  thrpt   10  123.381 ±  4.254  ops/s
JmxBenchmark.queryMBeansForObjectName    1000  thrpt   10  237.607 ±  3.298  ops/s
JmxBenchmark.queryNamesForMyObjectName   1000  thrpt   10  122.576 ±  2.364  ops/s
JmxBenchmark.queryNamesForObjectName     1000  thrpt   10  238.275 ±  4.904  ops/s


JmxBenchmark.applyForMyObjectName - tests ObjectName.apply() for subclasses of ObjcetName instances
JmxBenchmark.applyForObjectName - tests ObjectName.apply() for ObjectName instances
JmxBenchmark.queryMBeansForMyObjectName - tests MBeanServer.queryMBeans() for subclasses of ObjcetName instances
JmxBenchmark.queryMBeansForObjectName - tests MBeanServer.queryMBeans() for ObjcetName instances
JmxBenchmark.queryNamesForMyObjectName - tests MBeanServer.queryNames() for subclasses of ObjcetName instances
JmxBenchmark.queryNamesForObjectName - tests MBeanServer.queryNames() for ObjcetName instances

JmxBenchmark is attached to the https://bugs.openjdk.org/browse/JDK-8299234

@sspitsyn, Could you please look at the proposed enhancement

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

PR: https://git.openjdk.org/jdk/pull/11758


More information about the serviceability-dev mailing list