GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Severe throughput regression after upgrading Netty from 4.1.124.Final to 4.1.125.Final · Issue #15852 · netty/netty

Severe throughput regression after upgrading Netty from 4.1.124.Final to 4.1.125.Final #15852

New issue
Copy link
New issue
Copy link
Closed
Closed
Severe throughput regression after upgrading Netty from 4.1.124.Final to 4.1.125.Final#15852
Copy link
Assignees
franz1981
Milestone
4.1.132.Final

Description

@wbabyte
wbabyte
opened on Nov 13, 2025
Issue body actions

I'm a developer of the Gravitee API Management platform and we recently observed that after upgrading Netty to version 4.1.125.Final throughput dropped to about 1,000 RPS, whereas with version 4.1.124.Final we achieved around 2,500 RPS. No other code was changed in our stack during the test

Metric Netty 4.1.125.Final Netty 4.1.124.Final
Mean requests per second ~1000 req/s ~2 500 req/s
Response time (avg / p95 / p99) 54.3 / 94.0 / 107 ms 23.9 / 26.2 / 28.6 ms
Container CPU usage 0.788 cores 0.502 cores
CPU throttling 0.796 0.00846
Responses / errors 100 % HTTP 200, no errors  100 % HTTP 200, no errors

Environment

  • Application: Gravitee APIM Gateway
  • Deployment: Kubernetes
  • Test scenario: 150 backend connections, GET requests, 62 virtual users
  • Netty versions compared:
    • 4.1.124.Final (no issue)
    • 4.1.125.Final (regression)

we investigated a bit and found two commits that could potentially cause this problem.
4.1.125.Final Diff 4.1.124.Final: netty-4.1.124.Final...netty-4.1.125.Final

  • Prevent HTTP request/response smuggling via chunk encoding 39d3ecf
  • fix for zip bomb style attack 34894ac

We suspect the second one causing issues.

Could you help us understand what might cause such a large throughput drop in 4.1.125.Final? Any suggestions on further instrumentation or configuration to pinpoint the issue would be appreciated. I can share more details if needed

Activity

Next
  1. normanmaurer commented on Nov 13, 2025

    @normanmaurer
    normanmaurer
    on Nov 13, 2025
    Member
    More actions

    Can you share flame graph before and after the upgrade ? This should give some ideas.

    Reacted by Francesco Nigro
  2. wbabyte commented on Nov 14, 2025

    @wbabyte
    wbabyte
    on Nov 14, 2025
    Author
    More actions

    here are the flame graphs

    java-gravitee-apim-gateway_process_after.pb.gz
    java-gravitee-apim-gateway_process_before.pb.gz

  3. franz1981 commented on Nov 14, 2025

    @franz1981
    franz1981
    on Nov 14, 2025
    Contributor
    More actions

    @wbabyte how to read the pb files?

  4. normanmaurer commented on Nov 14, 2025

    @normanmaurer
    normanmaurer
    on Nov 14, 2025
    Member
    More actions

    @wbabyte please provide flame graphs as html files so we can easily open them

    Reacted by Francesco Nigro
  5. wbabyte commented on Nov 14, 2025

    @wbabyte
    wbabyte
    on Nov 14, 2025
    Author
    More actions

    you can use https://github.com/google/pprof or go tool pprof java-gravitee-apim-gateway_process_after.pb and you will find a lot of other tools if needed
    I converted pprof to svg and top table for you

    after-top.txt
    before-top.txt
    Image
    Image

    if you need web page do this go tool pprof -http=localhost:8080 java-gravitee-apim-gateway_process_after.pb

  6. wbabyte commented on Nov 14, 2025

    @wbabyte
    wbabyte
    on Nov 14, 2025
    Author
    More actions

    JSON format if needed

    java-gravitee-before.json
    java-gravitee-after.json

  7. franz1981 commented on Nov 24, 2025

    @franz1981
    franz1981
    on Nov 24, 2025
    Contributor
    More actions

    @wbabyte

    I can see JdkZlibDecoder.decode is nearly not present in the before one

    (left: before right: after)

    Image
  8. franz1981 commented on Nov 24, 2025

    @franz1981
    franz1981
    on Nov 24, 2025
    Contributor
    More actions

    In any case FYI @vietj

    Please open this on Vertx side @wbabyte as well

  9. franz1981 commented on Nov 24, 2025

    @franz1981
    franz1981
    on Nov 24, 2025
    Contributor
    More actions

    I agree w @wbabyte

    FYI @normanmaurer

    Looks like we don't batch/buffer decoding anymore and that 34894ac has introduced (especially visible when so few cores are used) this effect

  10. franz1981 commented on Nov 24, 2025

    @franz1981
    franz1981
    on Nov 24, 2025
    Contributor
    More actions

    I see, regardless, another problem @wbabyte which is more related vertx

    netty/codec-compression/src/main/java/io/netty/handler/codec/compression/ZlibDecoder.java

    Line 62 in 2eadf3e

    protected ByteBuf prepareDecompressBuffer(ChannelHandlerContext ctx, ByteBuf buffer, int preferredSize) {

    is asking vertx to allocate the big byte[] arrays required for decoding, but sadly, Vertx allocator is disabling using heap pooled buffers (Vertx 5 has changed that default) - try what's introduced by eclipse-vertx/vert.x#5262

    • https://github.com/eclipse-vertx/vert.x/pull/5262/files#diff-09a3a4138f8589060ce3bea3e3f04bca263412e72538544a14e943e7bcbe72ecR97 configure Vertx to use pooled buffers for SSL (see Reuse existing allocators, enable experimental adaptive one and enable SSL heap pooling (Fixes #5168) eclipse-vertx/vert.x#5262 (comment) to understand what it does)
    • [OPTIONAL] -Dvertx.reuseNettyAllocators=true: don't let vertx have its own allocators, but reuse the existing ones

    Since we batch less, we clearly have more networking activity, but you have an increased (likely) allocation activity which I cannot spot on the flamegraphs.

    Next time, please, use async profiler as it is, raw, because I can see from the profiling data that is enabled, including allocation profiling, but since I cannot access its produced data, I cannot help there

  11. franz1981 commented on Nov 24, 2025

    @franz1981
    franz1981
    on Nov 24, 2025
    Contributor
    More actions

    In addition @wbabyte any change can you provide a Netty only reproducer? this will make much easier to spot if is something which need to be addressed here on on Vertx; I'm not very used to JDK SSL decoding so I cannot tell for sure

  12. franz1981 commented on Nov 25, 2025

    @franz1981
    franz1981
    on Nov 25, 2025
    Contributor
    More actions

    ping @wbabyte

  13. wbabyte commented on Nov 25, 2025

    @wbabyte
    wbabyte
    on Nov 25, 2025
    Author
    More actions

    Thank you @franz1981 for review it, really appreciate it
    I will check whether enabling pooled buffers or adding -Dvertx.reuseNettyAllocators=true can fix this issue and next time I will try using async profiler. I’ll get back to you with the results later this week

    Reacted by Francesco Nigro
  14. franz1981 commented on Dec 2, 2025

    @franz1981
    franz1981
    on Dec 2, 2025
    Contributor
    More actions

    Any news @wbabyte ?

  15. wbabyte commented on Dec 4, 2025

    @wbabyte
    wbabyte
    on Dec 4, 2025
    Author
    More actions

    @franz1981 sorry for delay. We enabled heap pooled buffers and added -Dvertx.reuseNettyAllocators=true but it shows the same results with degraded throughput

  16. 3 remaining items

  17. remibaptistegio commented on Feb 20, 2026

    @remibaptistegio
    remibaptistegio
    on Feb 20, 2026
    More actions

    Have you had a chance to look at my test results yet @franz1981 ?

  18. franz1981 commented on Feb 20, 2026

    @franz1981
    franz1981
    on Feb 20, 2026
    Contributor
    More actions

    Not yet! This is the last netty version? I remember others complained about something the zip changes re Vertx

  19. franz1981
    added 2 commits that reference this issue on Mar 17, 2026

    Batch decompressed buffers in HttpContentDecoder to reduce channelRea…

    This issue will close once commit 648028b is merged into the '4.1' branch.
    648028b

    Batch decompressed buffers in HttpContentDecoder to reduce channelRea…

    This issue will close once commit 6b9a45f is merged into the '4.1' branch.
    6b9a45f
  20. franz1981 commented on Mar 17, 2026

    @franz1981
    franz1981
    on Mar 17, 2026
    Contributor
    More actions

    FYI @remibaptistegio #16510

    Reacted by remibaptistegio
  21. franz1981
    added 6 commits that reference this issue on Mar 18, 2026

    Batch decompressed buffers in HttpContentDecoder to reduce channelRea…

    This issue will close once commit 6a2e2ee is merged into the '4.1' branch.
    6a2e2ee

    Batch decompressed buffers in HttpContentDecoder to reduce channelRea…

    This issue will close once commit c596333 is merged into the '4.1' branch.
    c596333

    Batch decompressed buffers in HttpContentDecoder to reduce channelRea…

    This issue will close once commit 3193a1b is merged into the '4.1' branch.
    3193a1b

    Batch decompressed buffers in HttpContentDecoder to reduce channelRea…

    This issue will close once commit 6b96bc1 is merged into the '4.1' branch.
    6b96bc1

    Batch decompressed buffers in HttpContentDecoder to reduce channelRea…

    This issue will close once commit dc3b872 is merged into the '4.1' branch.
    dc3b872

    Batch decompressed buffers in HttpContentDecoder to reduce channelRea…

    This issue will close once commit e978307 is merged into the '4.1' branch.
    e978307
  22. franz1981 commented on Mar 25, 2026

    @franz1981
    franz1981
    on Mar 25, 2026
    Contributor
    More actions

    @remibaptistegio can we go ahead and close it via #16510?

    Let me know if apart from the actual test you can see an improvement in some staging of production please

    Reacted by remibaptistegio
  23. franz1981
    self-assigned this
    on Mar 25, 2026
  24. normanmaurer
    added this to the 4.1.132.Final milestone on Mar 25, 2026
  25. normanmaurer
    closed this as completedon Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @franz1981
    franz1981

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    • 4.1.132.Final

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.