-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Using custom memory allocator (sn_malloc or mimalloc) in FrameworkBenchmark for Drogon #419
Comments
@rohitjoshi thanks for your information. I haven't tried including custom allocator for it. actually I'm glad to give it a try. but I'm not very familiar with this, do you have any suggestions to achieve it? |
Let me submit a PR. It can be included either in a make file or even as a startup parameter |
Thank you so much. |
See oatpp |
@rohitjoshi I've submitted a PR to tfb, thanks a lot. |
Great, did you update other docker file as well? I am not sure which one is getting used. |
Yes, I updated docker files. Unfortunately, it cannot be installed in ubuntu with apt command, I had to installed it by source code. thanks. |
Any measurable performance improvement? It would be good to compare snmalloc vs mimalloc. Also I see many other frameworks are cheating to improve performance. E.g. using hardcoded content length |
On my local computer, it can introduce 10% -15% QPS improvement, which is exciting. |
Cool, it's pretty exciting to see the next tbf results. |
If you do get a comparison between |
@mjp41 , thank you very much. I have done some tests on the memory allocator. The test results are as follows:
I can say that in this test, snmalloc and mimalloc have similar performance improvements. |
Interesting. The thread stats for snmalloc look fractionally better, but the overall stats for mimalloc look fractionally better. I could well imagine the noise in the benchmark is greater than the differences. Thanks for sharing the results. |
Yes, I agree with you, thanks for your excellent work. |
These preliminary benchmarks look really great. Thanks for the contributions and the awesome work which made the framework even better. |
I don't want to open a new issue so I'll post it here. Drogon has won the first place in the Composite framework score section of the Round 19 of TechEmpower benchmarks posted two days ago. Congratulations! |
That’s some awesome news! 🎉 Thanks for sharing @vedranmiletic. Thanks to @an-tao and all other contributors for the great work and reaching this awesome milestone 🙂 |
Out of curiosity, @an-tao do you have any interest in writing a blogpost or something about how you achieved this performance? Seems like it could be very helpful for people. Great work! |
@deklanw Thanks for your attention.
Basically the techniques mentioned above are used in almost all the top TFB frameworks. I think the gap between the top frameworks is the result of the accumulation of many implementation details, and of course the differences between the programing languages. |
I see Rust based frameworks actix and may_minhttp both using
sn_malloc
andmimalloc
allocator which shows significant improvement. Have you tried including custom allocator for Drogon benchmarks?The text was updated successfully, but these errors were encountered: