[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <491CB27C.3090606@nortel.com>
Date: Thu, 13 Nov 2008 17:04:28 -0600
From: "Chris Friesen" <cfriesen@...tel.com>
To: Olaf van der Spek <olafvdspek@...il.com>
CC: Arnaldo Carvalho de Melo <acme@...hat.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Unix sockets via TCP on localhost: is TCP slower?
Olaf van der Spek wrote:
> On Thu, Nov 13, 2008 at 12:24 PM, Arnaldo Carvalho de Melo
> <acme@...hat.com> wrote:
>> Em Thu, Nov 13, 2008 at 12:20:44AM +0100, Olaf van der Spek escreveu:
>>> Hi,
>>>
>>> Quite often in discussions, I see people claiming Unix sockets are
>>> faster then TCP sockets on a connection that stays inside localhost.
>>> Let's say from app A to app B.
>>> Is this indeed the case and if so, how much and why?
>>> My assumption is that the kernel can optimize the 'connection' and let
>>> any performance differences disappear.
>> How much? Please measure.
Lmbench shows local tcp as noticeably slower than unix sockets on a Mac
G5 running 2.6.27.
*Local* Communication latencies in microseconds - smaller is better
---------------------------------------------------------------
Host OS 2p/0K Pipe AF UDP RPC/ TCP RPC/ TCP
ctxsw UNIX UDP TCP conn
--------- ------- ----- ----- ---- ----- ----- ----- ----- ----
localhost 2.6.27 2.270 10.5 12.6 19.9 31.5 22.7 35.5 68.
*Local* Communication bandwidths in MB/s - bigger is better
-----------------------------------------------------------------------
Host OS Pipe AF TCP File Mmap Bcopy Bcopy Mem Mem
UNIX reread reread (libc) (hand) read write
--------- ------- ---- ---- ---- ------ ------ ------ ------ ---- -----
localhost 2.6.27 1368 1564 334. 1111.8 2068.8 930.3 947.0 2072 1269.
Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists