-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
performance issue: (*HTTP2Response).detect cost too much memory #700
Comments
would you describe how you optimization this function? |
I just simply removed the https2 Register function and tested it to confirm the impact of http2 detect on performance. The ecapture memory consumption was significantly reduced without http2.detect on same testcase. As our application scenario has limited resources, we will pay more attention to the performance consumption of the introduced components.
add compile option to get symbol info when using perf tool
|
the h2 response detect is much complicated than h2 request, maybe we can find a new way to optimize it. could you try Register the h2 request and without Register h2 response? |
please assign it to me, I will try to fix it. |
Register the h2 request has no noticeable impact on performance. As you would expect, the performance bottleneck should mainly be caused by h2 response |
Can you tell me your solution? |
Run ecapture -m text cost unexcepted cpu/memory resource. After using the tool perfto analyze,(*HTTP2Response).detect consumed a lot of resources. After removing this function (*HTTP2Response).detect and **(HTTP2Request).detect and recompiling the ecapture to run testcase, the performance was significantly improved.
Small files access https server with high concurrency, construct 50Mbps traffic, average memory 550M, maximum memory 677.66M. After optimization (*HTTP2Response).detect and *(HTTP2Request).detect , memory is reduced to 293.016M
Linux Server:
Device: VM
OS: [ctyunos 2.0.1]
Arch: 4.19.90-2102.2.0.0062.ctl2.x86_64 #1 SMP Thu Mar 10 03:34:36 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Kernel Version: 4.19
The text was updated successfully, but these errors were encountered: