-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Run load testing benchmarks comparison for each commit via Github Actions #355
Conversation
Review changes with SemanticDiff. |
Enabling compression in other web servers moved their results closer to SWS:
The nginx directory listing is remarkably fast, I might check later to see whether compression really applies there. |
I actually found something better than gnuplot: graph-cli. Made things way simpler, the overview graphs now look like this: |
I like the idea. I assume that you will continue improving it.
I wonder if it is worth it to enable sendfile and memory caching for the other web servers in the comparison because SWS does not support them yet. Maybe we could add that once SWS gets them. Also, it would be great to consider a benchmark graph that shows the resources used by each server. And, this other server could be added to the list static-web-server/benchmarks#2 |
Sendfile is no use with dynamic compression, so it’s effectively disabled already. As to memory caching, I didn’t enable it explicitly but maybe it’s enabled by default somewhere. Frankly, I’m not sure that this is any good for comparing performance of web servers. It’s very hard to produce configurations that would be in any way comparable while also being realistic. For example, how do you compare SWS with
Sure, as soon as I have an idea how one would measure that. 😅
So far I focused on software that can be installed via the Ubuntu package manager. I’m definitely not going to compile lwan in this Github Action, yet I’m not even sure there is a third-party Ubuntu repositories for the pre-compiled binary (not that I am very keen on using it if it exists). Also keep in mind: benchmarking another piece of software adds at least half of minute runtime to this action, so it will delay the checks for pull requests even further. |
Ok. About memory cache. As far as I did learn, some servers like Nginx use a hybrid approach. See Nignx's hybrid disk‑and‑memory cache strategy. I do not know about the others. But in any case, we can keep the feature if be found as the default for those servers.
Ok, my point was more in the direction of if SWS does not support features like let's say memory cache then at least keeping the benchmark closer to what SWS offers so the benchmark may approximate itself to something more fair in the overall comparison.
I just mentioned it due to a request. But I get it. If there is no official binary available and only source then we could skip it for now. |
Looking at the graph #355 (comment), SWS has a decent performance (file) compared to for example nginx. Anyway, it would be great to have this new graph also generated for the current v2.28.0 to compare the differences. And about the directory listing. As you said, there is definitely room for improvement. |
BTW, In case you wonder. The CI FreeBSD tests run every time there is a change which is not nice. So I will take care of it. |
Sure, this is v2.28.0 release: Also for comparison v2.27.0 release, the times are remarkably close: I think I will now make the test run on an actual test directory rather than SWS source directory/README. Then I can use matrix to split it up into five separate tests:
Each of these tests will produce their own overview. This should make it easier to read given how much directory listing and file times diverge. Tests 3 and 5 are where SWS should be at a disadvantage due to sendfile. |
Job summary will now display tables with the benchmarking results, so one no longer needs to dig into logs or download artifacts to get an idea. Unfortunately, this only allows Markdown. I cannot see any way to upload images to embed them here. |
I think this is good enough now. For reference, here is a run based on v2.28.0: https://github.com/palant/static-web-server/actions/runs/8790531711. Comparing it to a run on current development branch, significant differences always affect all web servers in pretty much the same way. So if there were performance regressions since the release, these aren’t significant enough to be measurable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big step overall! we will get useful insights on the way.
I just left a few minor comments to address. Let me know if something is not clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good enough for now.
Thanks!
Description
This is rather crude but it works. The benchmarking results are remarkably consistent, I didn’t expect that. The downside: someone has to go and check/compare them manually. There are textual results in the action output, and there is a downloadable plot and binary data as the action artifact, but there is no overview of how it develops over time. This action also takes a while despite the caching, somewhere between 3 and 4 minutes. That’s despite only testing two things: producing a static file and listing a directory.
Vegeta’s choice of colors could be better. In the image below, the lower yellow dots belong to SWS (static file), the upper ones to Apache (directory listing).
The benchmarks clearly show SWS as being the slowest web server tested. In part this may be due to lack of sendfile and memory caching capabilities. I doubt that Apache has the latter by default however, and their directory listings are still almost twice as fast. So there is clearly work ahead.
Related Issue
#352
How Has This Been Tested?
I tried it out in my repository fork.
Screenshots (if appropriate):