Messages in this thread | | | Date | Wed, 30 Jan 2002 13:34:16 -0500 (EST) | From | "Richard B. Johnson" <> | Subject | Re: TCP/IP Speed |
| |
On Wed, 30 Jan 2002, Dan Maas wrote:
> > When I ping two linux machines on a private link, I get 0.1 ms delay. > > When I send large TCP/IP stream data between them, I get almost > > 10 megabytes per second on a 100-base link. Wonderful. > > > > However, if I send 64 bytes from one machine and send it back, simple > > TCP/IP strean connection, it takes 1 millisecond to get it back? There > > seems to be some artifical delay somewhere. How do I turn this OFF? > > Stupid question - did you turn Nagle off? > > int one = 1; > setsockopt(fd, SOL_TCP, TCP_NDELAY, &one); > > (I think; typing from memory...) > > Regards, > Dan >
I did, but I thought it was a TCP option, not a socket option. I will change it and see if it does anything. Currently, it seems like a no-op, no errors, but does nothing.
Early in code:
int on = 1;
#define ON &on
Where accept is called. Returned socket value is set to nodelay.
len = sizeof(addr); if((hs = accept(s, SSAP &addr, &len))) == FAIL) ERRORS(Accept); if(setsockopt(hs, IPPROTO_TCP, TCP_NODELAY, ON, sizeof(on)) == FAIL) ERRORS(Setsockopt);
So, maybe it's supposed to be SOL_TCP? I'll look for it.
Cheers, Dick Johnson
Penguin : Linux version 2.4.1 on an i686 machine (797.90 BogoMips).
I was going to compile a list of innovations that could be attributed to Microsoft. Once I realized that Ctrl-Alt-Del was handled in the BIOS, I found that there aren't any.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |