Networking Forums

Networking Forums > Computer Networking > Linux Networking > Disable NAGLE algorithm in kernel

Reply
Thread Tools Display Modes

Disable NAGLE algorithm in kernel

 
 
Alexandros Gougousoudis
Guest
Posts: n/a

 
      10-28-2003, 07:36 AM
Hi,

I need to disable the nagle algorithm in the Kernel, we use 2.4.19 and
2.4.21. I googled the net but can't find an answer, because the option
DISABLE_NAGLE (or something) is not in the current kernels (seem like a 2.2
option). How can it be done? Is there a patch to do this? I need to disable
it globally because I want to make a performance test with our database. I
don't program a new application where setsockopts can be used. Do I need a
newer kernel?

If you guys could help me, it'll be nice

TIA
Alex

 
Reply With Quote
 
 
 
 
C3
Guest
Posts: n/a

 
      10-28-2003, 07:42 AM
In putty for Windows, there is an option to disable it, which leads me to
believe that it can be disabled in userland. I'm not sure how it's disabled
in the Linux kernel, though.


C3
"Alexandros Gougousoudis" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I need to disable the nagle algorithm in the Kernel, we use 2.4.19 and
> 2.4.21. I googled the net but can't find an answer, because the option
> DISABLE_NAGLE (or something) is not in the current kernels (seem like a

2.2
> option). How can it be done? Is there a patch to do this? I need to

disable
> it globally because I want to make a performance test with our database. I
> don't program a new application where setsockopts can be used. Do I need a
> newer kernel?
>
> If you guys could help me, it'll be nice
>
> TIA
> Alex
>



 
Reply With Quote
 
Alexandros Gougousoudis
Guest
Posts: n/a

 
      10-28-2003, 07:55 AM
Hi,

"C3" <(E-Mail Removed)> schrieb

> In putty for Windows, there is an option to disable it, which leads me to
> believe that it can be disabled in userland. I'm not sure how it's

disabled
> in the Linux kernel, though.


For now I think it can't.
I know some applications (like samba or putty) offer a TCP-Socket-Options
parameter, but SAP-DB hasn't this feature, so I need to disable it
generally.

cu
Alex

 
Reply With Quote
 
Leon The Peon
Guest
Posts: n/a

 
      10-28-2003, 10:52 AM

"Alexandros Gougousoudis" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I need to disable the nagle algorithm in the Kernel, we use 2.4.19 and
> 2.4.21. I googled the net but can't find an answer, because the option
> DISABLE_NAGLE (or something) is not in the current kernels (seem like a

2.2
> option). How can it be done? Is there a patch to do this? I need to

disable
> it globally because I want to make a performance test with our database. I
> don't program a new application where setsockopts can be used. Do I need a
> newer kernel?


I havent had to worry about the NAGLE option since I tried to use NSCA
telnet on a 286 in December 1996.



 
Reply With Quote
 
W Cardwell
Guest
Posts: n/a

 
      10-28-2003, 03:29 PM
Google for "tcp_delack_strategy" and "TCP_NODELAY"

--

wcardwell at nc dot rr dot com


"Leon The Peon" <(E-Mail Removed)> wrote in message
news:bnllap$eo4$(E-Mail Removed)...
>
> "Alexandros Gougousoudis" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi,
> >
> > I need to disable the nagle algorithm in the Kernel, we use 2.4.19 and
> > 2.4.21. I googled the net but can't find an answer, because the option
> > DISABLE_NAGLE (or something) is not in the current kernels (seem like a

> 2.2
> > option). How can it be done? Is there a patch to do this? I need to

> disable
> > it globally because I want to make a performance test with our database.

I
> > don't program a new application where setsockopts can be used. Do I need

a
> > newer kernel?

>
> I havent had to worry about the NAGLE option since I tried to use NSCA
> telnet on a 286 in December 1996.
>
>
>



 
Reply With Quote
 
Alexandros Gougousoudis
Guest
Posts: n/a

 
      10-29-2003, 08:40 AM
Hi,

"W Cardwell" <(E-Mail Removed)> schrieb

> Google for "tcp_delack_strategy" and "TCP_NODELAY"


This could be a solution, but Josip Loncaric seems to be vanished from the
net, I wasn't able to find a patch for the current kernels. If you've a
hint, let me know please.

cu
Alex

 
Reply With Quote
 
Rick Jones
Guest
Posts: n/a

 
      10-30-2003, 10:40 PM
I'm sure I'll manage to stumble across some
linux-specific-I-dont-understand here, but while disabling delayed
ACKs may mitigate the symptoms of an application written such that it
interacts badly with Nagle and delayed ACK, that is not _completely_
the same as disabling Nagle.

Original:

send1 ->
send2 -|
time - RTT+delack
<- delack2 (TCP ACK syntax - ie ACK send1)
-> send2
<- response (assuming it happens within the delayed ack interval)

Disable the delayed acks and you get

send1 ->
send2 -|
time - RTT
<- immack2
-> send2
<- immack3
<- response

disabling Nagle would be
send1 ->
send2 ->
<- response

whereas giving both sends at once is

send1+2 ->
<- response

(modulo some shotcuts on displaying all the time sequences.)

if there is no way to disable Nagle system wide, you might see if you
can write a small shim library to intercept calls to socket() that the
tacks-on a call to setsockopt(). After that, you should have the
ammunition to get the database re-written to provide logically
associated data at the same time and not need to worry about disabling
Nagle.

There have been instances where stacks have botched their
implementation of Nagle, such that applciations that should not have
encountered it, actually did. One way to find such stacks is to take
the netperf TCP_RR test, and run it with a request size of 1MSS, and
then run it with a request size of 1MSS+1byte. If there is a large
delta in the transaction rates between the two tests, it suggests the
stack has a broken implementation of Nagle and you could confirm it
with a packet trace. http://www.netperf.org/

hth,

rick jones
--
a wide gulf separates "what if" from "if only"
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to raj in cup.hp.com but NOT BOTH...
 
Reply With Quote
 
Clifford Kite
Guest
Posts: n/a

 
      11-02-2003, 01:49 PM
Rick Jones <(E-Mail Removed)> wrote:
> I'm sure I'll manage to stumble across some
> linux-specific-I-dont-understand here, but while disabling delayed
> ACKs may mitigate the symptoms of an application written such that it
> interacts badly with Nagle and delayed ACK, that is not _completely_
> the same as disabling Nagle.


Does this mean that Stevens was wrong in saying "The sockets API uses
the TCP_NODELAY socket option to disable the Nagel algorithm" at the
top of page 270 in TCP/IP Illustrated, Volume 1?

--
Clifford Kite Email: "echo xvgr_yvahk-(E-Mail Removed)|rot13"
PPP-Q&A links, downloads: http://ckite.no-ip.net/
/* Slogan appropriate for a certain well-known software company:
FAILURE IS NOT AN OPTION - it is built into the operating system
and comes bundled with the software. */
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: WEP algorithm Jack [MVP-Networking] Wireless Networks 0 01-04-2010 10:35 PM
Nagle's Algorithm disabling Lalatendu Das Linux Networking 4 10-19-2007 05:09 AM
scheduling algorithm? Choonho Son Linux Networking 1 05-19-2004 12:22 PM
Playing with the routing algorithm ziv Linux Networking 3 02-28-2004 12:27 PM
tuning TCP for dealing with packet loss, prolonging Nagle delay etc. Vaclav Dvorak Linux Networking 1 12-31-2003 09:16 AM



1 2 3 4 5 6 7 8 9 10 11