armeria
armeria copied to clipboard
gRPC performance improvement
Motivation: Armeria's the gRPC request (de)serialization is in IO thread. If the deserialization process takes too long, the IO task may experience significant delays. Move the deserialization from the IO thread to BlockingExecutor thread will improve performance significantly.
Modifications:
- Move the execution of gRPC (de)serialization in
com.linecorp.armeria.internal.server.grpc.AbstractServerCall#onRequestMessagefrom the IO thread to the BlockingExecutor.
Result:
- Closes #5152
- Large and complex gRPC request processing performance will improve significantly.
🔍 Build Scan® (commit: b4219be4851cff276a1137e76c5aef2758a4a48d)
| Job name | Status | Build Scan® |
|---|---|---|
| build-windows-latest-jdk-19 | ✅ | https://ge.armeria.dev/s/7bib2eb34wke2 |
| build-self-hosted-jdk-8 | ✅ | https://ge.armeria.dev/s/qrgjjlxdbk35s |
| build-self-hosted-jdk-19-snapshot-blockhound | ✅ | https://ge.armeria.dev/s/d3ejp7n7jktas |
| build-self-hosted-jdk-17-min-java-17-coverage | ✅ | https://ge.armeria.dev/s/yf77hg3knx3wa |
| build-self-hosted-jdk-17-min-java-11 | ✅ | https://ge.armeria.dev/s/2rco3tciidqss |
| build-self-hosted-jdk-17-leak | ✅ | https://ge.armeria.dev/s/opvaqdx2uwn3w |
| build-self-hosted-jdk-11 | ✅ | https://ge.armeria.dev/s/nrycqwzo4icni |
| build-macos-12-jdk-19 | ❌ (failure) | https://ge.armeria.dev/s/nu7ee4yvh4onk |
command:
./gradlew --no-daemon :benchmarks:jmh:clean :benchmarks:jmh:jmh -Pjmh.includes=grpc.downstream.DownstreamSimpleBenchmark.simple$ -Pjmh.params="clientType=NORMAL;useBlockingTaskExecutor=true,false"
Note: main branch: https://ge.armeria.dev/s/wrjaj3csesbe6
Benchmark (clientType) (useBlockingTaskExecutor) Mode Cnt Score Error Units
DownstreamSimpleBenchmark.simple NORMAL true thrpt 5 1425.960 ± 3.838 ops/s
DownstreamSimpleBenchmark.simple NORMAL false thrpt 5 1504.965 ± 41.929 ops/s
grpc-performance-improv: https://ge.armeria.dev/s/4gsvjzwljnaee
Benchmark (clientType) (useBlockingTaskExecutor) Mode Cnt Score Error Units
DownstreamSimpleBenchmark.simple NORMAL true thrpt 5 1391.880 ± 34.705 ops/s
DownstreamSimpleBenchmark.simple NORMAL false thrpt 5 1496.237 ± 55.994 ops/s