Skip to content
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 Eio server benchmark #1009

Merged
merged 2 commits into from
Feb 1, 2024
Merged

Add Eio server benchmark #1009

merged 2 commits into from
Feb 1, 2024

Conversation

Sudha247
Copy link
Contributor

Adds a eio_server benchmark that I wrote for measuring the performance of cohttp-eio, similar to the async_server and lwt_unix_server_new benchmarks. Results obtained on a server machine (Intel Xeon Gold 5120) are below:

eio_server

141829 requests in 5.00s, 283.23MB read
Requests/sec:  28361.57
Transfer/sec:     56.64MB

async_server

105063 requests in 5.00s, 212.22MB read
Requests/sec:  21011.74
Transfer/sec:     42.44MB

lwt_unix_server_new

166961 requests in 5.00s, 333.42MB read
Requests/sec:  33393.19
Transfer/sec:     66.69MB

@talex5
Copy link
Contributor

talex5 commented Nov 24, 2023

Thanks! This will be useful for anyone wanting to optimise it.

Note: ocaml-ci is failing with No solution found for any supported platform. This is because async requires OCaml < 5.1 and Eio requires OCaml >= 5.1. It is possible to work around this by putting an explicit constraint of the version of OCaml in the opam files (e.g.
if ocaml-ci sees that cohttp-eio requires OCaml 5.1 then it won't try to include cohttp-eio in the set for older versions).

@Sudha247
Copy link
Contributor Author

Thank you, I'll take a stab at setting the constraints right.

@mseri
Copy link
Collaborator

mseri commented Jan 5, 2024

I think it should be enough to add cohttp-eio and eio to the dependencies of cohttp-bench in the dune-project file and regenerate https://github.com/mirage/ocaml-cohttp/blob/master/cohttp-bench.opam

@mseri
Copy link
Collaborator

mseri commented Feb 1, 2024

The remaining failures are CI errors related to homebrew and apt-get. I am merging

@mseri mseri merged commit c3537be into mirage:master Feb 1, 2024
14 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants