kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: ckkashyap@gmail.com (C K Kashyap)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Disabling nagle algorithm
Date: Mon, 30 May 2011 13:37:11 +0530	[thread overview]
Message-ID: <BANLkTikd-9F-46pROrGQfYOdFdEO-BCa0A@mail.gmail.com> (raw)
In-Reply-To: <BANLkTimvRaQy0k702DWO-DHB9X5GWNn+rA@mail.gmail.com>

>
> Yes, TCP_NODELAY is a socket option:
>
> Going back to the kernel source:
>
> include/linux/tcp.h:
>
> #define TCP_NODELAY             1       /* Turn off Nagle's algorithm. */
>
> and this:
>
>       u8      nonagle     : 4,/* Disable Nagle algorithm?             */
>
> and looking into the kernel source code:
>
> ./fs/ocfs2/cluster/tcp.c:
>        ret = sock->ops->setsockopt(sock, SOL_TCP, TCP_NODELAY,
>
> ./net/rds/tcp.c:
>        sock->ops->setsockopt(sock, SOL_TCP, TCP_NODELAY, (char __user
> *)&val,
> the above are just two of the examples of how to set TCP_NODELAY in the
> kernel.
>
> At the userspace level:
>
>
> http://www.linuxquestions.org/questions/other-*nix-55/how-do-i-disable-the-nagle-algorithm-in-enterprise-linux-3-kernel-ver-2-4-21-4-a-556170/
>
> should be the correct way, except that the poster is attempting to do
> it in a kernel that does not support it.
>
> As documented in http://linux.die.net/man/7/tcp, the supported kernel
> is 2.5.71 and onwards.
>
>
 Okay ... so, the situation I have at hand is that there is this app I
cannot modify. I'd like to see its performance with nagle disabled. Is this
possible?

While at it, is there a way to see the socket options of the socket
descriptors in a running app?

Regards,
Kashyap
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110530/15b44221/attachment.html 

  reply	other threads:[~2011-05-30  8:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-29 17:34 Disabling nagle algorithm C K Kashyap
2011-05-30  3:48 ` Anupam Kapoor
2011-05-30  3:51   ` C K Kashyap
2011-05-30  4:23     ` Anupam Kapoor
2011-05-30  4:47       ` C K Kashyap
2011-05-30  7:39         ` Peter Teoh
2011-05-30  8:07           ` C K Kashyap [this message]
2011-05-30  8:34             ` Peter Teoh
2011-05-30 13:48               ` C K Kashyap
2011-05-31  0:33                 ` Peter Teoh
2011-05-31  2:41                   ` Anupam Kapoor
2011-05-31  2:54                     ` Mulyadi Santosa
2011-06-01  5:31                     ` Anupam Kapoor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTikd-9F-46pROrGQfYOdFdEO-BCa0A@mail.gmail.com \
    --to=ckkashyap@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).