The letter S in a light blue, stylized speech bubble followed by SpeakBits
SpeakBitsThe letter S in a light blue, stylized speech bubble followed by SpeakBits
Trending
Top
New
Controversial
Search
Groups

Enjoying SpeakBits?

Support the development of it by donating to Patreon or Ko-Fi.
About
Rules
Terms
Privacy
EULA
Cookies
Blog
Have feedback? We'd love to hear it!

Golang is evil on shitty networks

withinboredom.info
submitted
a year ago
byboredgamertoprogramming

Summary

Git-lfs was barely sending any packets at all, like it was eternally stuck in TCP slow-start. After some investigations with WireShark and other tools, I learned that my wifi channels have a shitload of interference. It turns out there are random 50-100ms delays all over the place.

TCP_NODELAY is turned off by default in Go. This means that each of those 50 bytes are sent out as one packet instead of just a few bigger packets. This increases the network load, and when there’s a probability that a packet will need to be retransmitted, you’ll see a lot more retransmissions.

TCP_NODELAY is a terrible default for trying to do anything with more than one round trip. This ‘default’ has some significant knock-on-effects throughout the Go ecosystem. This obviously affects git-lfs, much to my annoyance. I hope they fix it.

17

2 Comments

2
joseph
a year ago
Seems like this is old enough to ask is this still the case?
1
throwschen
a year ago
Based on the comments in the article, sounds like it is