Skip to content

perf(eio): remove Fiber.first from read loop - #86

Open
anmonteiro wants to merge 1 commit into
masterfrom
perf/eio-read-loop-no-fiber-first
Open

perf(eio): remove Fiber.first from read loop#86
anmonteiro wants to merge 1 commit into
masterfrom
perf/eio-read-loop-no-fiber-first

Conversation

@anmonteiro

Copy link
Copy Markdown
Owner

Summary

Remove Fiber.first from the Eio read hot path and unblock client shutdown by explicitly shutting down the socket receive side.

Why

Fiber.first was running inside the inner read loop, which adds avoidable fiber scheduling and allocation overhead on every read operation.

On a local 1.5 GiB upload benchmark using the existing curl --http2-prior-knowledge harness against a small Eio H2 server, this changed the upload time from roughly:

  • before: 6.52s (235.64 MiB/s)
  • after: 3.73s (411.40 MiB/s)

Validation

  • dune build @all
  • local 1.5 GiB upload benchmark against a local Eio server

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.

1 participant