You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Rajesh Khan <ra...@gmail.com> on 2013/06/14 09:04:32 UTC

What exactly is tcp-nodelay ?

While going through the manual the only information I got was

For C++
"For latency sensitive applications, setting tcp-nodelay on qpidd and on
client connections can help reduce the latency".

I have two questions
1- What tcp-nodelay do ?
2- Do we set it up on both the sender and the receiver ?

Thanks in advance

Re: What exactly is tcp-nodelay ?

Posted by Andrew Stitcher <as...@redhat.com>.
On Fri, 2013-06-14 at 08:45 +0100, Jason Barto wrote:
> You would set it on any Tcp speaking library you do not wish to have
> buffered so yes, set it on both server and client.

You should note that for the forthcoming 0.24 release and forward
tcp-nodelay is the default for both C++ client and broker.

See https://issues.apache.org/jira/browse/QPID-3689

It turned out that for nearly every case tcp-nodelay gives as good or
better throughput as well as latency. Obviously you should benchmark as
you would in any case.

You can turn tcp-nodelay OFF for the broker by using a config file - the
line there would be "tcp-nodelay=false" OR by setting QPID_TCP_NODELAY=0
in the environment of the running broker.

At the client end tcp-nodelay is a connection option in the messaging
API.

Andrew



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: What exactly is tcp-nodelay ?

Posted by Jason Barto <ja...@gmail.com>.
You would set it on any Tcp speaking library you do not wish to have
buffered so yes, set it on both server and client.

Sincerely,
Jason
On Jun 14, 2013 8:37 AM, "Rajesh Khan" <ra...@gmail.com> wrote:

> Thanks for your reply do we set this option in both the sender and the
> receiver
>
>
> On Fri, Jun 14, 2013 at 1:27 AM, Jason Barto <jason.p.barto@gmail.com
> >wrote:
>
> > Tcp no delay disables a part of the Tcp stack which essentially buffers
> Tcp
> > packets until there are enough to basically make the sending worthwhile.
> >
> > http://en.m.wikipedia.org/wiki/Nagle's_algorithm
> >
> > Effectively this keeps the small Tcp messages going from client to server
> > or vice versa from getting there as quickly as possible as they are being
> > buffered. If latency is a concern with your deployment it's best to
> disable
> > Nagle by setting Tcp no delay to true.
> >
> > Sincerely,
> > Jason
> > While going through the manual the only information I got was
> >
> > For C++
> > "For latency sensitive applications, setting tcp-nodelay on qpidd and on
> > client connections can help reduce the latency".
> >
> > I have two questions
> > 1- What tcp-nodelay do ?
> > 2- Do we set it up on both the sender and the receiver ?
> >
> > Thanks in advance
> >
>

Re: What exactly is tcp-nodelay ?

Posted by Rajesh Khan <ra...@gmail.com>.
Thanks for your reply do we set this option in both the sender and the
receiver


On Fri, Jun 14, 2013 at 1:27 AM, Jason Barto <ja...@gmail.com>wrote:

> Tcp no delay disables a part of the Tcp stack which essentially buffers Tcp
> packets until there are enough to basically make the sending worthwhile.
>
> http://en.m.wikipedia.org/wiki/Nagle's_algorithm
>
> Effectively this keeps the small Tcp messages going from client to server
> or vice versa from getting there as quickly as possible as they are being
> buffered. If latency is a concern with your deployment it's best to disable
> Nagle by setting Tcp no delay to true.
>
> Sincerely,
> Jason
> While going through the manual the only information I got was
>
> For C++
> "For latency sensitive applications, setting tcp-nodelay on qpidd and on
> client connections can help reduce the latency".
>
> I have two questions
> 1- What tcp-nodelay do ?
> 2- Do we set it up on both the sender and the receiver ?
>
> Thanks in advance
>

Re: What exactly is tcp-nodelay ?

Posted by Jason Barto <ja...@gmail.com>.
Tcp no delay disables a part of the Tcp stack which essentially buffers Tcp
packets until there are enough to basically make the sending worthwhile.

http://en.m.wikipedia.org/wiki/Nagle's_algorithm

Effectively this keeps the small Tcp messages going from client to server
or vice versa from getting there as quickly as possible as they are being
buffered. If latency is a concern with your deployment it's best to disable
Nagle by setting Tcp no delay to true.

Sincerely,
Jason
While going through the manual the only information I got was

For C++
"For latency sensitive applications, setting tcp-nodelay on qpidd and on
client connections can help reduce the latency".

I have two questions
1- What tcp-nodelay do ?
2- Do we set it up on both the sender and the receiver ?

Thanks in advance