Comment by Jenda_
3 years ago
I don't know Golang, but how does the function in git-lfs that writes to the socket look like? Is it writing in 50-byte chunks? Why?
Because I guess even with TCP_NODELAY, if I submit reasonably huge chunks of data (e.g. 4K, 64K...) to the socket, they will get split into reasonably-sized packets.
The code in question seems to be this portion of SendMessageWithData in ssh/protocol.go [1]:
The write packet size seems to be determined by how much data the reader returns at a time. That could backfire if the reader were e.g. something like line at a time (no idea if something like that exists in Golang), but that does not seem to be the case here.
[1] https://github.com/git-lfs/git-lfs/blob/d3716c9024083a45771c...