Good performance of ocaml 5's domain and effect

Hello,

Working on a small web server library : simple_httpd I tested both domains and effects.

The result are relatively impressive: faster than apache, not too far from nginx for small static file. The performance on big file is not too bad and I am using relatively small chunk.

I run 6 domains (1 only to accept connection) and the client is wrk running 5 threads and the indicated number of connections, all this on my 6 cores laptop.

small
big

I hope to release simple_httpd in a few weeks, do not hesitate to have a look and comment.

Cheers,
Christophe

5 Likes

Would you mind submitting a PR to GitHub - ocaml-multicore/retro-httpaf-bench: Benchmarking environment for http servers adding your http server as a benchmark? Then it can be compared with the other OCaml http server implementations.

1 Like

OK, I will do that soon.

I am trying to do a pr dor retro-httpaf-bench … but opam on docket does not bind bisect_ppx.2.8.1 while 2.8.0 is not compatible with ocaml 5.0.0. I do an opam update so I do not understand why opam does not find the latest version.

Are you using the ocaml/opam image? You might just need to do a docker pull, as the weekly run finished at some point yesterday afternoon. For those images, you have to update the local git clone and then opam update (see Make opam.ocaml.org the default repo · Issue #99 · ocurrent/docker-base-images · GitHub)

Are you basing your version of one of the existing Dockerfiles there? Typically, they fix a particular commit in opam-repository. e.g.

You’ll want to update that to a suitably recent Git commit.

There is no image using the latest opam-repository ?

Updated the charts … Good improvement using eventfd …