View Single Post

  #2 (permalink)  
Old 05-02-2008
David Schwartz
 
Posts: n/a
Default Re: localhost optimization

On May 1, 2:46 pm, k...@pink-frog.com wrote:

> I seem to have read in numerous places, that using a form of IP based
> network connectivity to localhost on Linux is something especially
> optimized. So much so, that there would hardly have to be any
> difference between, for example, setting up a TCP/IP connection to
> localhost and setting up a connection through a UNIX socket. I worked
> with that assumption for a good while until I got to test it and I got
> the shock of my life. I know it's just a single test over a self-
> invented protocol using a self-written implementation, but a
> difference of a factor thousand in speed ? That seems like a lot. Am
> I doing something wrong ? Are there flags one has to set in ioctl or
> something ? I won't be posting any code just yet, since I'd really
> like a simple answer: has it or has it not been optimized, and if so,
> what is a reasonable difference to expect ? Thank you for your time.


My bet is that your code triggered Nagle in a bad way.

DS
Reply With Quote