-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add more stress tests and benchmarks #450
Comments
Hello @patricoferris @talex5 I'm an outreachy december 2024 cohort appplicant. I'm interested in contributing to this issue please with your assistance. Attached is a screenshot of my terminal running the Eio "Hello World" example in utop.[ |
@RichardChukwu please you can go ahead you'll be assigned the issue. |
@RichardChukwu that screenshot doesn't show running the Eio hello world (https://github.com/ocaml-multicore/eio/blob/main/examples/hello/main.ml). It's just using |
For finding performance problems in Eio, there's lots of information about available tools at https://roscidus.com/blog/blog/2024/07/22/performance/ (though many of them are Linux-only). It would also be good to run statmemprof on some of the benchmarks to see if there are places where too much allocation is happening (this requires using OCaml 5.3 or the backport to 5.2). |
Ok I'll resend another running the exact Eio hello world |
@talex5 oh my bad that was my mistake @RichardChukwu when you have Eio running it should look like this |
Thank you for the correction @oyenuga17 I'll resend immediately with correct setup screenshot |
Hello @talex5 @oyenuga17 took the feedback and ran the Eio hello world program again, here is a screenshot attached. I'm ready to be assigned this issue now. |
@RichardChukwu please go ahead with the task you'll be assigned. |
Aright, on it @oyenuga17 thanks for the response |
Awesome @RichardChukwu ! This issue is pretty generic. Do you have a concrete idea of the kinds of benchmarks you think we can add? Perhaps focusing on the open FD test that @talex5 mentioned above would be a good idea? Note that this issue has nothing directly to do with Windows, so feel free to give it a go in the environment you are most comfortable with. |
Hello @patricoferris yeah, here's an idea I'd like to work on: Stress Test for FD Leaks: stress_fd_leak.ml This test will ensure that the number of open file descriptors (FDs) remains the same at the beginning and end of the test, indicating no FD leaks. I think this will help me get started working on the Eio library before delving into more windows specific Eio tasks. |
The only stress test we have is
stress_semaphore.ml
and the benchmarks mostly test the synchronisation primitives but not the OS integration (except forbench_fd.ml
, which tests reading from/dev/zero
). We need more.In particular, we have found several resource leaks and races when e.g. spawning and joining domains in a tight loop (e.g. #421). The https://github.com/ocaml-multicore/retro-httpaf-bench/tree/master/cohttp-eio benchmark is useful; more like that (or simpler) would be good. (update: we now have
bench_http.ml
for this)Testing for FD leaks would also be worth doing. e.g. checking that we have the same number of open FDs at the end of running the tests.
It would be very interesting to look at the benchmarks with e.g. https://magic-trace.org/ to see if there are obvious inefficiencies left.
The benchmarks could go in this repository (if simple) or we could create a new project just for that (if they have lots of dependencies).
Stress testing https://github.com/ocaml-multicore/lwt_eio would be useful too.
The text was updated successfully, but these errors were encountered: