Is gunicorn worker really slower than bare aiohttp runner?

There’s a statement in documentation:

But nothing is for free: running aiohttp application under gunicorn is slightly slower.

It was documented 4 years ago according git blame. I have read lots of code in attempt to understand the reason behind this statement and couldn’t find anything convincing: it’s basically all the same, it creates SockSite, AppRunner and runs them similarly.

Simple benchmark on helloworld app demonstrated almost equal performance (<2% difference in RPS). I had to disable logging in bare aiohttp case, otherwise it’s visibly slower.

Even if it’s slower for some reason, is it worth to have such statement in docs? May be it should clarify what order of magnitude “slightly slower” is? I had significant doubts regarding using gunicorn deployment scheme due to this small remark in docs.

I recall up to 5% overhead in the deployment with Gunicorn when checked 4 years ago.
I can agree that even 5% is nothing; if you run the real app instead of test synthetic example the diff falls down to <1% quickly.
That’s why docs says: “slightly slower”.

If you want to improve the text – please feel free to create a pull request.