You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Mark Robert Miller (Jira)" <ji...@apache.org> on 2021/07/22 04:07:00 UTC

[jira] [Comment Edited] (SOLR-15428) Integrate the OpenJDK JMH micro benchmark framework for micro benchmarks and performance comparisons and investigation.

    [ https://issues.apache.org/jira/browse/SOLR-15428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17385240#comment-17385240 ] 

Mark Robert Miller edited comment on SOLR-15428 at 7/22/21, 4:06 AM:
---------------------------------------------------------------------

Some pointers for anyone interested in and maybe not so familiar with jmh. I didn’t really know much of it myself for the longest time. And then I saw that it was everywhere. I can’t turn around without running into jmh benchmarks since I finally gave it a little look.

First I’ll note, it pairs wonderfully with jfr and mission control. Here someone is using those two to get up to speed with one of my favorites - unintended auto boxing patterns. I make sure my IDE whines about that one: https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Performance-cost-of-Java-autoboxing-and-unboxing-of-primitive-types

What about the primitive collection libraries? You can find lots of comparisons. They may not always agree depending on date and quality and tests, so best not to just latch onto a first find, but here is one of many: https://www.programmersought.com/article/49941717802/

Does it mater if I iterate via key set or entry set? Plenty of jmh code out there that will get you going: https://bl.ocks.org/AFulgens/42ef34d625dd5b00f62d9ed77e727ccb

Same if you want to understand how the various concurrent and non blocking collections fair against each other. Some light googling will churn up plenty of results and backing jmh code that is useful to be exposed to.

The mechanical sympathy problems around false sharing? I’ve seen more than one great jmh deep dive. Randomly, https://dzone.com/articles/what-false-sharing-is-and-how-jvm-prevents-it

Executor queues? Gray explorations out there. Random vs SplittableRandom and ThreadLocalRandom? Yup.

Of course the focus here is not so much on reproducing all these benchmarks - though some are still valuable to have available for specific development exploration and additional comparisons of potential alternatives. Shared and reusable development tooling. But the exposure and plentiful sample material out there is still valuable for both the more integration style benchmarks and especially very similar benchmarks that target some of our interval classes and utilities.

Beyond the large number of articles and graphs and I sights swimming around google, a large number of projects (just look around, shouldn’t have to look far) have a solid stack of jmh benchmarks as part of their code base. 


was (Author: markrmiller):
Some pointers for anyone interested in and maybe not so familiar with jmh. I didn’t really know much of it myself for the longest time. And then I saw that it was everywhere. I can’t turn around without running into jmh benchmarks since I finally gave it a little look.

First I’ll note, it pairs wonderfully with jfc and mission control. Here someone is using those two to get up to speed with one of my favorites - unintended auto boxing patterns. I make sure my IDE whines about that one: https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Performance-cost-of-Java-autoboxing-and-unboxing-of-primitive-types

What about the primitive collection libraries? You can find lots of comparisons. They may not always agree depending on date and quality and tests, so best not to just latch onto a first find, but here is one of many: https://www.programmersought.com/article/49941717802/

Does it mater if I iterate via key set or entry set? Plenty of jmh code out there that will get you going: https://bl.ocks.org/AFulgens/42ef34d625dd5b00f62d9ed77e727ccb

Same if you want to understand how the various concurrent and non blocking collections fair against each other. Some light googling will churn up plenty of results and backing jmh code that is useful to be exposed to.

The mechanical sympathy problems around false sharing? I’ve seen more than one great jmh deep dive. Randomly, https://dzone.com/articles/what-false-sharing-is-and-how-jvm-prevents-it

Executor queues? Gray explorations out there. Random vs SplittableRandom and ThreadLocalRandom? Yup.

Of course the focus here is not so much on reproducing all these benchmarks - though some are still valuable to have available for specific development exploration and additional comparisons of potential alternatives. Shared and reusable development tooling. But the exposure and plentiful sample material out there is still valuable for both the more integration style benchmarks and especially very similar benchmarks that target some of our interval classes and utilities.

Beyond the large number of articles and graphs and I sights swimming around google, a large number of projects (just look around, shouldn’t have to look far) have a solid stack of jmh benchmarks as part of their code base. 

> Integrate the OpenJDK JMH micro benchmark framework for micro benchmarks and performance comparisons and investigation.
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-15428
>                 URL: https://issues.apache.org/jira/browse/SOLR-15428
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Mark Robert Miller
>            Priority: Major
>         Attachments: bench.patch
>
>          Time Spent: 4h 50m
>  Remaining Estimate: 0h
>
> I’ve spent a fair amount of time over the years on work around integrating Lucene’s benchmark framework into Solr and while I’ve used this with additional local work off and on, JMH has become somewhat of a standard for micro benchmarks on the JVM. I have some work that provides an initial integration, allowing for more targeted micro benchmarks as well as more integration type benchmarking using JettySolrRunner. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org