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

Switch Quart ASGI server to Uvicorn and disable logging #387

Closed
wants to merge 1 commit into from

Conversation

pgjones
Copy link

@pgjones pgjones commented Sep 22, 2018

As this is a HTTP/1 benchmarking exercise Uvicorn is sufficient and
faster than Hypercorn. Note that Uvicorn does not, as yet, support
multiple workers.

As logging seems to be disabled in other projects, it should be here
as it makes a large difference to the performance.

As this is a HTTP/1 benchmarking exercise Uvicorn is sufficient and
faster than Hypercorn. Note that Uvicorn does not, as yet, support
multiple workers.

As logging seems to be disabled in other projects, it should be here
as it makes a large difference to the performance.
@waghanza
Copy link
Collaborator

Thanks for your contribution @pgjones

uvicorn seems to support --workers option now, @tomchristie made it on encode/uvicorn#136

@pgjones
Copy link
Author

pgjones commented Sep 22, 2018

I don't think the workers option is in a released uvicorn yet, for me 0.3.5 gives Error: no such option: --workers.

@waghanza
Copy link
Collaborator

waghanza commented Sep 22, 2018

ok

I was running on 0.2.12 not latest

@waghanza
Copy link
Collaborator

I have those results

Average 50th percentile 90th percentile 99th percentile 99.9th percentile Standard deviation
uvicorn 393.51 ms 331.76 ms 467.43 ms 2398.67 ms 3538.11 ms 385923.00
hypercorn 183.65 ms 156.16 ms 229.90 ms 839.22 ms 2086.86 ms 148894.00

but I can explain the ratio by workers usage (I am on a 4x core)

@tomchristie I have seen encode/uvicorn#141, but will multi-worker feature will be planed ?

@waghanza
Copy link
Collaborator

@pgjones using uvicorn with multi-core seems to be possible through gunicorn, @see benoitc/gunicorn#1380 (comment)

@waghanza
Copy link
Collaborator

waghanza commented Sep 22, 2018

Comparing hypercorn to uvicorn, I have :

Average 50th percentile 90th percentile 99th percentile 99.9th percentile Standard deviation
uvicorn (uvloop) 130.10 ms 119.55 ms 221.25 ms 297.03 ms 632.84 ms 70348.67
uvicorn (asyncio) 254.94 ms 220.86 ms 310.65 ms 1566.48 ms 4158.92 ms 248798.00
hypercorn 173.71 ms 153.57 ms 204.29 ms 782.77 ms 2438.01 ms 138289.33

@pgjones Thanks for your suggestion 🎉 I think uvicorn is indeed a best option for us; do you mind git me write rights to your fork (I'll made the changes);

@pgjones
Copy link
Author

pgjones commented Sep 22, 2018

Sure, go ahead.

@waghanza
Copy link
Collaborator

@pgjones I can not push on master ;-)

@tomchristie
Copy link

Yeah at the moment the story for multiple workers is “use a process manager”, eg gunicorn/supervisor/circus. We’re recommending that because they’re all super mature and handle monitoring processes & restarting etc. However for convienience I think we will add multiple workers back in at some point soonish.

@pgjones
Copy link
Author

pgjones commented Sep 23, 2018

@waghanza Ah, I thought you were going to cherry-pick and edit the commit (which I'd prefer rather than pushing to my fork). Feel free to close this and take the commit and do whatever...

@waghanza waghanza mentioned this pull request Sep 23, 2018
@waghanza
Copy link
Collaborator

Close for #387

@waghanza waghanza closed this Sep 23, 2018
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