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 2020/11/05 23:31:06 UTC
[GitHub] [kafka] hachikuji edited a comment on pull request #9563: KAFKA-10684; Avoid additional envelope copies during network transmission
hachikuji edited a comment on pull request #9563:
URL: https://github.com/apache/kafka/pull/9563#issuecomment-722690665
I got inspired to try and extend this to apply to all message types. I've updated the patch to remove the custom response logic in `FetchResponse` in favor of a general pattern using `SendBuilder`. We had an existing benchmark `FetchResponseBenchmark.testSerializeFetchResponse`, so I tried it out.
Here is the results before the patch (10 topics and 500 topics):
```
Result "org.apache.kafka.jmh.common.FetchResponseBenchmark.testSerializeFetchResponse":
6322.861 ±(99.9%) 310.785 ns/op [Average]
(min, avg, max) = (6057.758, 6322.861, 7090.658), stdev = 290.708
CI (99.9%): [6012.076, 6633.646] (assumes normal distribution)
Result "org.apache.kafka.jmh.common.FetchResponseBenchmark.testSerializeFetchResponse":
323310.283 ±(99.9%) 25947.515 ns/op [Average]
(min, avg, max) = (301370.273, 323310.283, 383716.556), stdev = 24271.322
CI (99.9%): [297362.768, 349257.799] (assumes normal distribution)
```
Here is the new benchmark (10 topics and 500 topics):
```
Result "org.apache.kafka.jmh.common.FetchResponseBenchmark.testSerializeFetchResponse":
5701.378 ±(99.9%) 100.848 ns/op [Average]
(min, avg, max) = (5601.838, 5701.378, 5925.943), stdev = 94.333
CI (99.9%): [5600.530, 5802.225] (assumes normal distribution)
Result "org.apache.kafka.jmh.common.FetchResponseBenchmark.testSerializeFetchResponse":
298221.825 ±(99.9%) 8173.945 ns/op [Average]
(min, avg, max) = (287615.891, 298221.825, 321499.618), stdev = 7645.913
CI (99.9%): [290047.880, 306395.770] (assumes normal distribution)
```
So looks like a modest overall improvement.
Note I still need to polish up a few things in the PR.
----------------------------------------------------------------
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