yuanlihan commented on pull request #11257:
URL: https://github.com/apache/druid/pull/11257#issuecomment-873776301


   > It would be useful to add a benchmark for this code if possible to show 
the difference of the new implementation, maybe here: 
https://github.com/apache/druid/tree/master/benchmarks/src/test/java/org/apache/druid/server/coordinator
   
   Here's the benchmark data(or see [JMH result 
graph](https://jmh.morethan.io/?gist=577d9e192ca1f191309a82520d1d50e6))
   ```
   Benchmark                                     (maxSegmentsToMove)            
                    (mode)  (numberOfSegments)  Mode  Cnt      Score      Error 
 Units
   BalancerStrategyBenchmark.pickSegmentsToMove                   10            
                   default               10000  avgt   10      2.402 ±    0.019 
 ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                   10            
                   default              100000  avgt   10     41.890 ±    2.326 
 ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                   10            
                   default             1000000  avgt   10    620.377 ±   14.541 
 ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                   10  
50percentOfSegmentsToConsiderPerMove               10000  avgt   10      1.475 
±    0.008  ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                   10  
50percentOfSegmentsToConsiderPerMove              100000  avgt   10     15.383 
±    0.342  ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                   10  
50percentOfSegmentsToConsiderPerMove             1000000  avgt   10    310.409 
±   18.073  ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                   10            
  useBatchedSegmentSampler               10000  avgt   10      0.234 ±    0.003 
 ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                   10            
  useBatchedSegmentSampler              100000  avgt   10      3.944 ±    0.199 
 ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                   10            
  useBatchedSegmentSampler             1000000  avgt   10     59.548 ±    2.327 
 ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                  100            
                   default               10000  avgt   10     22.205 ±    0.105 
 ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                  100            
                   default              100000  avgt   10    392.765 ±   23.001 
 ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                  100            
                   default             1000000  avgt   10   5759.416 ±  171.515 
 ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                  100  
50percentOfSegmentsToConsiderPerMove               10000  avgt   10     13.925 
±    0.026  ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                  100  
50percentOfSegmentsToConsiderPerMove              100000  avgt   10    181.052 
±    2.517  ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                  100  
50percentOfSegmentsToConsiderPerMove             1000000  avgt   10   2900.901 
±   81.967  ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                  100            
  useBatchedSegmentSampler               10000  avgt   10      0.276 ±    0.001 
 ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                  100            
  useBatchedSegmentSampler              100000  avgt   10      4.330 ±    0.037 
 ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                  100            
  useBatchedSegmentSampler             1000000  avgt   10     56.426 ±    1.235 
 ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                 1000            
                   default               10000  avgt   10    222.513 ±    0.559 
 ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                 1000            
                   default              100000  avgt   10   4369.863 ±   62.496 
 ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                 1000            
                   default             1000000  avgt   10  57107.843 ± 1082.160 
 ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                 1000  
50percentOfSegmentsToConsiderPerMove               10000  avgt   10    136.567 
±    0.301  ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                 1000  
50percentOfSegmentsToConsiderPerMove              100000  avgt   10   1766.142 
±   12.927  ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                 1000  
50percentOfSegmentsToConsiderPerMove             1000000  avgt   10  28437.935 
±  257.949  ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                 1000            
  useBatchedSegmentSampler               10000  avgt   10      0.303 ±    0.002 
 ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                 1000            
  useBatchedSegmentSampler              100000  avgt   10      4.247 ±    0.057 
 ms/op
   BalancerStrategyBenchmark.pickSegmentsToMove                 1000            
  useBatchedSegmentSampler             1000000  avgt   10     59.161 ±    1.597 
 ms/op
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to