Skip to content

Not getting a high performance compared to gunicorn #241

Answered by gi0baro
ZeyadMoustafaKamal asked this question in Q&A
Discussion options

You must be logged in to vote

So, in general the final performance is really dependant on your application code, as Granian can only affect the network part of that: there's no dark magic to apply here, Granian is still subject to GIL and blocking code whenever it interacts with your application.

Given that, I have a few considerations:

  • from you numbers, looks like Granian is ~6% faster
  • whenever you do benchmarks, I would use a time-based strategy to run at least for 15 seconds (or increase the requests number to higher values), as running for less than a second might increase standard deviation and produce unstable results (maybe you can try with 100k requests)
  • I'm not sure why you want 16*16=256 threads running, as…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ZeyadMoustafaKamal
Comment options

@gi0baro
Comment options

Answer selected by ZeyadMoustafaKamal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #239 on March 11, 2024 08:53.