-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.early-in-cycleA change that should be done early in the 3 month dev cycle.A change that should be done early in the 3 month dev cycle.
Milestone
Description
The writev syscall is supposed to act like a single write. The WriteTo method of net.Buffers will make a single write syscall on writers that have the unexported writeBuffers method. However, for writers that do not have such a method, it will call Write multiple times. This becomes significant if you are wrapping a *net.TCPConn without embedding, for instance, since it has different performance characteristics with respect to Nagle's algorithm. Frustratingly, since the writeBuffers method is unexported, there's no way for the application to know the behavior of Buffers.WriteTo in order to work around the issue.
Repro case: https://play.golang.org/p/rF0JRZs8z8
odeke-em, CAFxX, OneOfOne, spenczar, gobwas and 18 moretv42
Metadata
Metadata
Assignees
Labels
NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.early-in-cycleA change that should be done early in the 3 month dev cycle.A change that should be done early in the 3 month dev cycle.