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.