-
Notifications
You must be signed in to change notification settings - Fork 566
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
4.0 webserver extremely slow on linux #7983
Comments
For reference, here is the Helidon running on OSX:
and the baseline running on the same OSX machine:
Note that the OSX version requires the |
Did you try to run the Linux version with higher sendBufferSize as you did on OSX? |
I don't see any issue with ➜ helidon_test git:(main) ✗ uname -a
Linux defiant 6.5.0-10-generic #10-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 13 13:49:38 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
➜ helidon_test git:(main) ✗ h2load -n100000 -c50 -m10 --h1 http://localhost:8888/devnull\?size\=1000000
starting benchmark...
spawning thread #0: 50 total client(s). 100000 total requests
Application protocol: http/1.1
progress: 10% done
...
progress: 100% done
finished in 17.83s, 5609.77 req/s, 5.23GB/s
requests: 100000 total, 100000 started, 100000 done, 100000 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 100000 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 93.15GB (100014700000) total, 10.68MB (11200000) headers (space savings 0.00%), 93.13GB (100000000000) data
min max mean sd +/- sd
time for request: 3.70ms 14.92s 62.52ms 575.16ms 99.70%
time for connect: 43us 568us 275us 138us 60.00%
time to 1st byte: 61.47ms 14.89s 6.00s 5.58s 40.00%
req/s : 112.20 271.49 182.39 68.82 42.00% |
Can you share the benchmark with robaho httpserver? What is the |
Sure. You can runSimpleFileServer gradle task in github.com/robaho/httpserver. In the baseline, you can comment out the setSendBufferSize() - that is only there for OSX which has a bug. On Linux if you let the kernel buffer size float/default there is no issue it sounds like Helidon sets a default kernel buffer size of 32k (from loom dev) - I was not aware of this. Usually you don’t want to set this and you let the os float this for maximum performance. (But OS X has a bug with this) I will add a similar config option to the robaho httpserver and try to sync up. If Helidon forces a buffer size of 32k as a default that could easily explain it. |
I see we are turning off the TCP auto-tuning by setting the JDK default explicitly |
The auto tuning is very valuable when you have a mixture of requests types (typical data loads vs file uploads/downloads). Otherwise you either get slow performance or you need lots of wasted memory for every connection. |
It is also interesting that doing this on OSX doesn’t degrade the performance so drastically. |
Nice quick work. Glad to see it was trivial. Thanks for responding. |
Thx for reporting the issue! |
Running Helidon 4.0 on Linux shows really slow performance. The exact code runs on OSX as expected.
The startup shows:
The Linux environment is:
5.15.0-88-generic #98~20.04.1-Ubuntu SMP Mon Oct 9 16:43:45 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
You can open the Helidon test project here
There are instructions on using h2load in the readme.
The "baseline" for the test is available here.
Running against the enobufs baseline:
I can't even run the same the test against Helidon since it takes too long. Lowering the number of requests from 100k to 1k (it seems to be an O(N^2) increase, I get:
The code that prompted this investigation is here which uses a similar design as Helidon and runs the same on Linux and OSX and achieves the same performance as the baseline.
Like I started with, the Helidon code runs as expected when running the test on OSX.
The text was updated successfully, but these errors were encountered: