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
[D] Serverino debug/test #7409
[D] Serverino debug/test #7409
Conversation
Test other option for serverino
@waghanza it seems some error in running script.. |
object.Exception@/root/.dub/packages/serverino/0.7.2/serverino/source/serverino/config.d(231): Configuration error. Must be minWorkers <= maxWorkers |
Added MaxWorkers
Oh it seems it was this error. |
Unfortunately no @cyrusmsk . Could you enqble logging / debug mode ? @trikko server hang I mean I built the container, and run ito in. on an other terminal with
|
In my local test I received this:
|
Bumped version to 0.7.2
Is |
@waghanza if you start docker with -p 3000:3000 and then you execute |
What is serverino log saying? That could help a lot! |
where are logs produced by serverino ? |
On stderr, of course. Redirect with |
when using I have
on server side, I have nobody@493a850a94bd:/opt/web$ ./server
* [000008] [i] 2024-04-22 21:37 [daemon.d:0259] Daemon started.
* [000008] [i] 2024-04-22 21:37 [daemon.d:0283] Listening on http://0.0.0.0:3000/
[000010] [l] 2024-04-22 21:38 [worker.d:0123] Worker started. (user=nobody group=nogroup) I tried with |
Is that the complete log? It seems there's only one worker running. If you use -p, try localhost:3000 (or the ip of the machine where it is running) |
It is what I do. Using docker inspect for that |
-p 3000:3000 map the docker port 3000 on the server port 3000. |
Same @trikko |
Workers starts after a long time on server side. Maybe we can activate some verbose level |
What?! Is it the log lagging or the timestamps confirm that they start slowly? They should start in a fraction of second! |
Maybe this setting will work better
This is serverino running on a raspberry pi (not a really powerful machine). Check the startup times! Video.del.22-04-2024.22.32.15.webm |
@waghanza where are you running the whole thing? On your computer? On a server? (aws? digitalocean? which kind of instance) |
On a local machine (fedora Linux) with docker, will investigate on that |
I see @trikko . I have compiled on the docker container, copied it to my local machine and execute the binary, and the results are
|
but I have a lot of errors
|
Slow computer! rpi get 15k req/s :) How many times did you run the test? Typically those are not errors, but warnings. In fact wrk does not bother to close the connection at the end of the timeout but turns off the program suddenly and serverino detects an interrupted communication. So normally at the end of each test with wrk you will find a message like this for each worker. If you try other programs (for example: bombardier) that smoothly and correctly close the connection when they are finished, you will not see any errors. |
8 core (AMD FX-8320E Eight-Core Processor) qnd 16G of RAM and quit the same with bombardier
|
Nice, no errors with bombardier, right? I tested the version 0.7.2 on rpi4, right now:
On my laptop (i7-12700H) I get 140-150k with both bombardier and wrk (without scripts). |
I'm not joking! pibench.webm |
weird on the same workstation, some nim frameworks are aroun 200K rps ;-) but anyway, still not understand the docker layer troubles, because the problem here is not about performances, is about running or not, and why CI is OK ;-) |
There's a good chance all this things are related in some way, isn't it? |
some frameworks are cheating :) |
Yes, I'm sure this is located to my machine, on github action the container is up and running, https://github.com/the-benchmarker/web-frameworks/actions/runs/8790164134/job/24121594878?pr=7409#step:7:2091 I plan to run all thos benchmark on a brand new workstation, this server is old |
Yeah I know, but at least some of them I've tried are not real server. They are made just for win benchmarks, they don't even parse headers or request correctly. Not the point anyway. |
Btw maybe worth to add such tests and requests into benchmark. To make it more "real testing", rather than absolutely synthetic and our of the real business cases.
Agree. But I don't understand why Docker could be the problem.. |
A simple test you can try is uploading a file with curl, it's not handled correctly by many server including httpbeast, the fastest one. Uploading a big file (150MB!) on serverino:
Same request, on httpbeast:
|
Please notice that we use regulary serverino with docker in production without any performance issue! |
So there is 3 concerns here :
|
I have a lot of tests if you need them :) |
Be my guest @trikko. Maybe you could start a discussion on that. Having more tests could reduce heterogeneity of implementations here |
Could you please make a test? If they are slow to start on docker, try launch docker with an extra param Do you see any speedup? |
Workers starts instantely but still not reacheable PS : Not understood, since the default of open files is 1073741816 |
It's a bad default value. It's way too high, It degrades CPU performances. Now I set it to 4096 on Serverino startup if it's too high, if not set by user. About reachability: from last release I set a custom name for processes, does it mess your config scripts? |
I can run it now, but server seems to crash at some point PS : With number of open file to 4096 |
Pump up that number, it counts every fd |
I have use 10240 for next run |
In the meanwhile I've added a workaround to serverino (that set 16384 as value) and send a pull request (already accepted) to dlang to fix the problem that is in the standard library. |
Can you try to run this code for full test please?