Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 May 1999 15:03:45 -0600
From:      Lyndon.Nerenberg@MessagingDirect.COM
To:        cyouse@cybersites.com
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Sockets and SYSTEM V message queue
Message-ID:  <199905102103.PAA13125@rembrandt.esys.ca>
In-Reply-To: <Pine.BSF.4.05.9905101502230.58619-100000@ns1.cybersites.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10 May, Chuck Youse wrote:

> As the other respondent mentioned (my apologies to that other respondent,
> I've already deleted your reply and hence don't have your name handy),
> using UNIX domain sockets makes migration to separate machines more
> difficult. It might be better to bind an AF_INET socket to 127.0.0.1 (to
> prevent other machines from accessing the service, if that's your concern)
> .. the loopback interface is pretty quick about turning packets around,
> so there's little (if any) performance hit.

However an AF_INET loopback connection still means a trip through the
IP stack in the kernel, whereas AF_LOCAL basically does simple buffer
copies between the processes. Usually you can pick up quite a bit of
additional throughput on local connections by using AF_LOCAL. It's
worth your while to benchmark the difference between AF_INET/127.0.0.1
and AF_LOCAL *on the OS the application will run on* to see how much of
a speed-up AF_LOCAL will give you. (We've seen quite a bit of variance
in the amount speed up across different flavours of UNIXen.)

--lyndon



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905102103.PAA13125>