-
Notifications
You must be signed in to change notification settings - Fork 26
document transport read/write pause, buffer sizes, low/high water marks, etc. #17
Comments
Maybe we can do deeper and mention kernel parameters, Linux tcp sysctls:
|
Ah, another useful information for performance: since Python 3.6, asyncio now sets the TCP_NODELAY option on newly created sockets. "TCP_NODELAY is intended to disable/enable segment buffering so data can be sent out to peer as quickly as possible, so this is typically used to improve network utilisation." (Windows doc) "Disables the Nagle algorithm for send coalescing. This socket option is included for backward compatibility with Windows Sockets 1.1" Ah, I also found "TCP_QUICKACK is used to send out acknowledgements as early as possible than delayed under some protocol level exchanging, and it's not stable/permanent, subsequent TCP transactions (which may happen under the hood) can disregard this option depending on actual protocol level processing or any actual disagreements between user setting and stack behaviour." on the Internet. I never saw this option before. |
It seems like aiohttp uses set_writer_buffer_limits(0), see:
And https://vorpus.org/blog/some-thoughts-on-asynchronous-api-design-in-a-post-asyncawait-world/
|
For me, it's a try-error approach to find the right parameters for the kernel. |
|
Perhaps the projects need a new page for information about performance tuning. |
I added a new performance page: commit d91afb3. |
Asyncio performance and concurrency depends on parameters which are badly documented in the reference documentation:
The text was updated successfully, but these errors were encountered: