DiegoEliasCosta opened a new pull request #6459: Reducing the usage of Jmh 
Invocation level on setup
URL: https://github.com/apache/incubator-druid/pull/6459
 
 
   **Motivation:**
   
   We are conducting a scientific study to investigate bad 
practices/anti-patterns on creating micro-benchmarks using JMH, and we found an 
instance of harmfull usage of Invocation level in `LoadStatusBenchmark`.
   
   The usage of Invocation level for JMH fixture methods (setup/teardown) 
inccurs in a significant impact in
   in the benchmark time (see [JMH 
Documentation](http://hg.openjdk.java.net/code-tools/jmh/file/66fb723292d4/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_07_FixtureLevelInvocation.java)).
 
   
   When benchmark and setup/teardown is too small (less than a milisecond) the 
Invocation level might saturate the system with timestamp requests and 
iteration synchronizations which introduce artificial latency, throughput, and 
scalability bottlenecks.
   
   **Modification:**
   I moved the code that doesn't need to be created on every invocation into a 
setup with Trial level.
   
   **Results**
   In all our tests, benchmarks run faster now (from 30-50%), without the high 
JMH Overhead.  
   I am reporting the result of 5 full executions with default parameters 
(iterations, forks, warmups, etc..)
   
   
[druid-fixed-antipatters-invo.zip](https://github.com/apache/incubator-druid/files/2474082/druid-fixed-antipatters-invo.zip)
   
   Environment:
   Tests run on a Computational server with CPU: E5-1660-3.3GHZ  (6 cores + 
HT), 64 GB RAM.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to