python-trio / python-trio/trio
TCP_NOTSENT_LOWAT umbrella issue
Open
Nobody has claimed this yet.
design discussion
performance
polish
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 431
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 6
Description
- write a blog post explaining what it is and the various issues around it
- on Linux,
sendallshould temporarily disableTCP_NOTSENT_LOWAT - can/should we do some sort of auto-tuning? This is very challenging because the ideal is that if we were waiting for the socket to become writable and then generated a message, we want the send buffer to be just in the process of draining out when our new message is queued... but otherwise not necessarily. Another approach might be, if we have some way to estimate the rate a which the queue is draining (does the OS provide bandwidth stats?), then set the buffer size to a fixed number of milliseconds rather than a fixed number of bytes. OTOH this is all a bit tricky and might be hard to have it work nicely while also allowing the user to override if they want to -- maybe it belongs in an optional higher layer?
We should also try to collect other folks' experience:
- can we track down more information on how Apple's using it?
- h2o does auto-tuning stuff – see https://h2o.examp1e.net/configure/http2_directives.html#latency-optimization
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Treat this as an umbrella rather than a single starter task. Begin with the sendall behavior on Linux and the linked H2O latency-optimization material, then review the Apple-use question and requested blog post. Done is not defined for the auto-tuning and design questions, so they need to be split into scoped tasks first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python
- Domain
- documentation, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100