[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Spiped + Mysql over a LAN, high latency?
- To: email@example.com
- Subject: Re: Spiped + Mysql over a LAN, high latency?
- From: Colin Percival <firstname.lastname@example.org>
- Date: Mon, 26 Jan 2015 01:24:23 -0800
- In-reply-to: <CAAZJfZwJDWraepvQrPd7W=yMFQLuEU0fOWZuKtyksogib8qC3w@mail.gmail.com>
- References: <CAAZJfZwJDWraepvQrPd7W=yMFQLuEU0fOWZuKtyksogib8qC3w@mail.gmail.com>
Bringing this back to the list after some off-list tcpdumps...
On 01/21/15 04:28, Mauro Ciancio wrote:
> The problem I'm having is that spiped is adding latency (I guess so).
Turns out that this was caused by the interaction of nagling and TCP
delayed ACK. I'm not sure why the Linux network stack wants to use
these bandwidth-saving techniques when communicating over the loopback
interface, but I'm sure someone had a very good reason.
I've set TCP_NODELAY to disable nagling; the potential bandwidth waste
due to TCP/IP overhead is minimal since spiped is sending 1060 bytes of
TCP/IP payload at a time over the encrypted connection (1024 bytes of
spiped payload + 4 byte payload length + 32 byte hmac).
I'll release spiped 1.5.0 at some point with this included. If anyone
else has anything which they want to see in 1.5.0, make sure you speak
up in the next few weeks.
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid