From owner-freebsd-hackers Mon May 10 14: 4:26 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from rembrandt.esys.ca (rembrandt.esys.ca [198.161.92.131]) by hub.freebsd.org (Postfix) with ESMTP id D7F4B14F11 for ; Mon, 10 May 1999 14:04:03 -0700 (PDT) (envelope-from lyndon@MessagingDirect.COM) Received: from MessagingDirect.COM (zappa.esys.ca [198.161.92.28]) by rembrandt.esys.ca (2.1/8.9.1/Execmail 2.1) with ESMTP id PAA13125; Mon, 10 May 1999 15:03:48 -0600 Message-Id: <199905102103.PAA13125@rembrandt.esys.ca> Date: Mon, 10 May 1999 15:03:45 -0600 From: Lyndon.Nerenberg@MessagingDirect.COM Subject: Re: Sockets and SYSTEM V message queue To: cyouse@cybersites.com Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: MIME-Version: 1.0 Content-Type: TEXT/plain; CHARSET=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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