You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/04/01 16:58:18 UTC

[GitHub] [kafka] jolshan opened a new pull request #10461: KAFKA-12603: Add benchmarks for handleFetchRequest and FetchContext

jolshan opened a new pull request #10461:
URL: https://github.com/apache/kafka/pull/10461


   Added benchmarks to help test https://github.com/apache/kafka/pull/9944.
   These benchmarks can be used to compare the handleFetchRequest path, FullFetchContext and IncrementalFetchContext.
   Results below and flame graphs attached:
   [handleFetchRequest.zip](https://github.com/apache/kafka/files/6245114/handleFetchRequestV2.zip)
   [full fetch context.zip](https://github.com/apache/kafka/files/6245147/full.fetch.context.zip)
   [incremental fetch context.zip](https://github.com/apache/kafka/files/6245150/incremental.fetch.context.zip)
   
   
   KafkaApisFetchBenchmark:
   ```
   Benchmark                                              (partitionCount)  (topicCount)  Mode  Cnt        Score        Error  Units
   KafkaApisFetchBenchmark.testHandleFetchRequest                       10            10  avgt   15    76151.108 ±   1698.553  ns/op
   KafkaApisFetchBenchmark.testHandleFetchRequest                       10            20  avgt   15   151563.934 ±  14878.129  ns/op
   KafkaApisFetchBenchmark.testHandleFetchRequest                       10           100  avgt   15   842045.197 ±  57441.665  ns/op
   KafkaApisFetchBenchmark.testHandleFetchRequest                       20            10  avgt   15   135365.804 ±   1712.248  ns/op
   KafkaApisFetchBenchmark.testHandleFetchRequest                       20            20  avgt   15   310606.837 ±  11142.315  ns/op
   KafkaApisFetchBenchmark.testHandleFetchRequest                       20           100  avgt   15  1720758.062 ±  22100.551  ns/op
   KafkaApisFetchBenchmark.testHandleFetchRequest                       50            10  avgt   15   365479.697 ±  24847.736  ns/op
   KafkaApisFetchBenchmark.testHandleFetchRequest                       50            20  avgt   15   907928.955 ±  48930.482  ns/op
   KafkaApisFetchBenchmark.testHandleFetchRequest                       50           100  avgt   15  7684542.128 ± 387865.069  ns/op
   ```
   
   FullFetchContextBenchmark:
   ```
   Benchmark                                                                     (partitionCount)  (topicCount)  Mode  Cnt            Score           Error  Units
   FullFetchContextBenchmark.newFullContext                                                    10            10  avgt   15            9.400 ±         0.642  ns/op
   FullFetchContextBenchmark.newFullContext                                                    10            20  avgt   15            9.163 ±         0.177  ns/op
   FullFetchContextBenchmark.newFullContext                                                    10           100  avgt   15            9.014 ±         0.281  ns/op
   FullFetchContextBenchmark.newFullContext                                                    20            10  avgt   15            8.935 ±         0.334  ns/op
   FullFetchContextBenchmark.newFullContext                                                    20            20  avgt   15            8.769 ±         0.102  ns/op
   FullFetchContextBenchmark.newFullContext                                                    20           100  avgt   15            8.729 ±         0.291  ns/op
   FullFetchContextBenchmark.newFullContext                                                    50            10  avgt   15            9.032 ±         0.447  ns/op
   FullFetchContextBenchmark.newFullContext                                                    50            20  avgt   15            9.074 ±         0.422  ns/op
   FullFetchContextBenchmark.newFullContext                                                    50           100  avgt   15            9.122 ±         0.283  ns/op
   FullFetchContextBenchmark.updateAndGenerateResponseDataForFullContext                       10            10  avgt   15          920.954 ±        12.131  ns/op
   FullFetchContextBenchmark.updateAndGenerateResponseDataForFullContext                       10            20  avgt   15         1825.846 ±        26.501  ns/op
   FullFetchContextBenchmark.updateAndGenerateResponseDataForFullContext                       10           100  avgt   15    271718890.632 ±  12225638.258  ns/op
   FullFetchContextBenchmark.updateAndGenerateResponseDataForFullContext                       20            10  avgt   15         2282.090 ±        98.191  ns/op
   FullFetchContextBenchmark.updateAndGenerateResponseDataForFullContext                       20            20  avgt   15         4424.841 ±       159.225  ns/op
   FullFetchContextBenchmark.updateAndGenerateResponseDataForFullContext                       20           100  avgt   15   2496876236.183 ±  87972780.491  ns/op
   FullFetchContextBenchmark.updateAndGenerateResponseDataForFullContext                       50            10  avgt   15         5646.134 ±       457.860  ns/op
   FullFetchContextBenchmark.updateAndGenerateResponseDataForFullContext                       50            20  avgt   15        10576.038 ±       173.532  ns/op
   FullFetchContextBenchmark.updateAndGenerateResponseDataForFullContext                       50           100  avgt   15  52923741093.333 ± 302811682.429  ns/op
   ```
   
   IncrementalFetchContextBenchmark
   ```
   Benchmark                                                                                   (partitionCount)  (toForgetPercentage)  (topicCount)  Mode  Cnt   Score   Error  Units
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    10                     5            10  avgt   15  39.852 ± 1.183  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    10                     5            20  avgt   15  39.944 ± 0.372  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    10                     5           100  avgt   15  39.999 ± 0.460  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    10                    10            10  avgt   15  39.698 ± 1.053  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    10                    10            20  avgt   15  39.984 ± 0.496  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    10                    10           100  avgt   15  40.703 ± 0.533  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    10                    50            10  avgt   15  39.363 ± 0.653  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    10                    50            20  avgt   15  40.280 ± 0.439  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    10                    50           100  avgt   15  40.583 ± 0.382  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    20                     5            10  avgt   15  39.930 ± 0.405  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    20                     5            20  avgt   15  41.369 ± 0.835  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    20                     5           100  avgt   15  39.827 ± 0.349  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    20                    10            10  avgt   15  40.673 ± 1.005  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    20                    10            20  avgt   15  41.538 ± 0.932  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    20                    10           100  avgt   15  39.944 ± 0.544  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    20                    50            10  avgt   15  39.897 ± 0.382  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    20                    50            20  avgt   15  39.915 ± 0.278  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    20                    50           100  avgt   15  39.993 ± 0.589  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    50                     5            10  avgt   15  38.314 ± 0.463  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    50                     5            20  avgt   15  40.034 ± 0.656  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    50                     5           100  avgt   15  28.644 ± 0.245  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    50                    10            10  avgt   15  38.993 ± 1.536  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    50                    10            20  avgt   15  43.296 ± 3.798  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    50                    10           100  avgt   15  28.662 ± 0.355  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    50                    50            10  avgt   15  42.087 ± 0.419  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    50                    50            20  avgt   15  40.390 ± 0.455  ns/op
   IncrementalFetchContextBenchmark.newIncrementalContext                                                    50                    50           100  avgt   15  28.651 ± 0.352  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       10                     5            10  avgt   15  28.556 ± 0.273  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       10                     5            20  avgt   15  28.612 ± 0.510  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       10                     5           100  avgt   15  30.313 ± 0.562  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       10                    10            10  avgt   15  28.594 ± 0.413  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       10                    10            20  avgt   15  28.473 ± 0.202  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       10                    10           100  avgt   15  28.493 ± 0.268  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       10                    50            10  avgt   15  28.741 ± 0.656  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       10                    50            20  avgt   15  28.610 ± 0.391  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       10                    50           100  avgt   15  28.622 ± 0.447  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       20                     5            10  avgt   15  30.786 ± 2.332  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       20                     5            20  avgt   15  28.925 ± 0.407  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       20                     5           100  avgt   15  30.827 ± 0.277  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       20                    10            10  avgt   15  30.429 ± 1.262  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       20                    10            20  avgt   15  28.711 ± 0.219  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       20                    10           100  avgt   15  29.798 ± 0.377  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       20                    50            10  avgt   15  30.566 ± 1.613  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       20                    50            20  avgt   15  29.315 ± 0.953  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       20                    50           100  avgt   15  29.774 ± 0.145  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       50                     5            10  avgt   15  28.767 ± 0.401  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       50                     5            20  avgt   15  30.138 ± 0.337  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       50                     5           100  avgt   15  19.186 ± 0.374  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       50                    10            10  avgt   15  28.799 ± 0.287  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       50                    10            20  avgt   15  28.774 ± 0.230  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       50                    10           100  avgt   15  19.873 ± 0.544  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       50                    50            10  avgt   15  28.844 ± 0.478  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       50                    50            20  avgt   15  28.592 ± 0.294  ns/op
   IncrementalFetchContextBenchmark.updateAndGenerateResponseDataForIncrementalContext                       50                    50           100  avgt   15  19.057 ± 0.184  ns/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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] jolshan edited a comment on pull request #10461: KAFKA-12603: Add benchmarks for handleFetchRequest and FetchContext

Posted by GitBox <gi...@apache.org>.
jolshan edited a comment on pull request #10461:
URL: https://github.com/apache/kafka/pull/10461#issuecomment-812901187


   ~Need to fix the incremental benchmark.~ FIXED


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] dajac commented on pull request #10461: KAFKA-12603: Add benchmarks for handleFetchRequest and FetchContext

Posted by GitBox <gi...@apache.org>.
dajac commented on pull request #10461:
URL: https://github.com/apache/kafka/pull/10461#issuecomment-1065675071


   @jolshan Is it still something that we want to merge?


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] jolshan commented on pull request #10461: KAFKA-12603: Add benchmarks for handleFetchRequest and FetchContext

Posted by GitBox <gi...@apache.org>.
jolshan commented on pull request #10461:
URL: https://github.com/apache/kafka/pull/10461#issuecomment-812901187


   Need to fix the incremental benchmark.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] jolshan commented on pull request #10461: KAFKA-12603: Add benchmarks for handleFetchRequest and FetchContext

Posted by GitBox <gi...@apache.org>.
jolshan commented on pull request #10461:
URL: https://github.com/apache/kafka/pull/10461#issuecomment-1065683832


   Let me take a look. I'll get back to you by the end of next week.


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org