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

Mark Robert Miller commented on SOLR-15428:
-------------------------------------------

some notes
 * For quick-play, you can use an IDE plugin to run these benchmarks, but 
configuration from build.gradle will not be set. I use JMHack for IntelliJ.
 * The standard way to run is via gradle. Various std options can be referenced 
in the solr/test-framework/build.gradle

{noformat}
./gradlew jmh -Pinclude=CloudIndexing{noformat}
include takes a classname match like the above, or a regex for matching class 
name and benchmark method name. You could run all the ByteBuffer benchmarks 
with:

{noformat}
./gradlew jmh -Pinclude=.*Buffer.*{noformat}
See the corresponding jmh command line parameters: 
[https://openjdk.java.net/projects/code-tools/jmh/]
 * Also check out the samples 
[https://github.com/openjdk/jmh/tree/master/jmh-samples]
 * You can find a similar example of starting up a heavier service with JMH and 
testing a method in Java EE 8 High Performance: JMH - the OpenJDK tool.
 * When run via gradle, a json results.json file is written to the 
solr/test-framework/build/reports/jmh directory.
 * I like to visualize these results by loading them into 
[https://jmh.morethan.io,|https://jmh.morethan.io,/] which can be done via drag 
and drop.
 * You can also put them in something like a gist and reference their raw link 
to share. For example, here are the results of using 6 threads to index small 
or large documents to a 9 shard, 5 node cluster using 1 replica per shard, 3 
and 9: 
[https://jmh.morethan.io/?source=https://gist.githubusercontent.com/markrmiller/8f4d1c38c0400f45c2b2ce43e8fc0a57/raw/8805ed2fed113a73cf7cf9d3a4cf38c5d92d90dc/result1.json]
 * Now let's say I make some great changes. That run was on a laptop running on 
battery. For no good reason, lets plug it in and also add a 100ms delay to the 
document indexing pipeline. You can make a sharable before and after change 
comparison by giving two result links to JMH Visualizer: 
https://jmh.morethan.io/?sources=https://gist.githubusercontent.com/markrmiller/8f4d1c38c0400f45c2b2ce43e8fc0a57/raw/8805ed2fed113a73cf7cf9d3a4cf38c5d92d90dc/result1.json,https://gist.githubusercontent.com/markrmiller/20a7cb5ab736a244121666445e943b2d/raw/8d08048211c2bcd9a1e0508f712426873f76e5b7/result2.json

 

> 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
>
>
> 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-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to