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

Adding an example of a dedicated ST EC dispatching to a MT EC #31

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

beta-ziliani
Copy link

Benchmarks (all of them with 30s and 40 connections):

  • wrk running 2 threads, default workers (4), 1000 bytes request
preview_mt:
  Requests/sec:  79505.69
  Transfer/sec:     82.72M
ec:
  Requests/sec:  64983.74
  Transfer/sec:     67.61MB
  • wrk running 2 threads, 8 workers, 1000 bytes request
preview_mt:
  Requests/sec:  73082.06
  Transfer/sec:     76.04MB
ec:
  Requests/sec:  86116.64
  Transfer/sec:     89.60MB 
  • wrk running 4 threads, 6 workers, 4000 bytes request
preview_mt:
  Requests/sec:  44979.04
  Transfer/sec:    175.48MB
ec:
  Requests/sec:  45267.99
  Transfer/sec:    176.61MB

Copy link
Owner

@ysbaddaden ysbaddaden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@ysbaddaden
Copy link
Owner

ysbaddaden commented Sep 6, 2024

I recall an attempt to isolate the http server to its own thread didn't fare well with preview_mt, but it's apparently working a little better with EC.

Now, wrk keeps the connections alive, so the dispatch only happens at the beginning, then everything happens in the MT context while the ST context sleeps. It could be interesting to have another client that regularly closes & reconnects the connections (e.g. every dozen ones).

…ultithreaded environments, the original and EC one. -Dpreview_mt -Dec utilizes the main thread for handling connections, and another MTEC to handle responses
@beta-ziliani
Copy link
Author

In the last commit I separated the main thread only when running -Dec (no -Dmt).

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.

2 participants