Re: Unix sockets via TCP on localhost: is TCP slower?

From: Olaf van der Spek
Date: Fri Nov 14 2008 - 17:40:22 EST


On Fri, Nov 14, 2008 at 10:07 PM, Willy Tarreau <w@xxxxxx> wrote:
> I'm already wondering what problems you encounter with TCP performance
> on the loopback. I'm used to stress-test network proxies on the loopback

None. It's just a theoretical question.

> for quick tests when I don't want to boot 3 machines, and seeing that it's
> easy to connect/accept 100k sessions/s and forward about 20-30 Gbps between
> two processes on consumer-grade machines, I'm really doubting that your
> applications needs that much out of your database.

Hmm, those numbers look a lot better than the ones Chris Friesen
posted. He posted 334 mbyte/s for TCP and 1564 for Unix. That's a 4.7x
difference.

> If you're really so sensible to local traffic tunning, you can already
> set a very large MTU on your loopback, you can have very large windows
> between your applications so that very few ACKs are sent, etc... And
> BTW checksums are already not even computed. Loopback *is* fast, there's

That was my initial question. If the performance difference is
insignificant, that's fine with me.

> no need to crapify the whole stack with your "switch" to gain 5% more out
> of it.
>
> Anyway, if you can come up with patches which proves all of us wrong
> without weakening the code, I'm sure they could be accepted.

I'm sure too, but I won't.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/