Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

What happened to CONFIG_TCP_NAGLE_OFF?

 
   Soft32 Home -> Linux -> Kernel RSS
Next:  [PATCH 1/2] lib + ntfs: let modules force HWEIGHT  
Author Message
Matt Garman

External


Since: Nov 28, 2006
Posts: 2



(Msg. 1) Posted: Tue Nov 28, 2006 5:10 pm
Post subject: What happened to CONFIG_TCP_NAGLE_OFF?
Archived from groups: linux>kernel (more info?)

I would like to globally disable nagling on my (2.6.9) system. There
are several references on the web to the CONFIG_TCP_NAGLE_OFF kernel
config option. However, it appears as though this no longer exists.

How might I achieve having TCP_NODELAY effectively set for all sockets
(by default)? Is there a new/different kernel config option, a patch,
a sysctl or proc setting? Or can I "fake" this behavior by, e.g.
setting a send buffer sufficiently small?

Thank you,
Matt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.TakeThisOut@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Phillip Susi

External


Since: Dec 13, 2006
Posts: 91



(Msg. 2) Posted: Wed Nov 29, 2006 3:10 pm
Post subject: Re: What happened to CONFIG_TCP_NAGLE_OFF? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Matt Garman wrote:
> I would like to globally disable nagling on my (2.6.9) system. There
> are several references on the web to the CONFIG_TCP_NAGLE_OFF kernel
> config option. However, it appears as though this no longer exists.
>
> How might I achieve having TCP_NODELAY effectively set for all sockets
> (by default)? Is there a new/different kernel config option, a patch,
> a sysctl or proc setting? Or can I "fake" this behavior by, e.g.
> setting a send buffer sufficiently small?

This is a bad idea and breaks api compatibility. Nagle is very
important for sockets being used for things like telnet. Other
applications, like ftp, should already disable nagle themselves.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Matt Garman

External


Since: Nov 28, 2006
Posts: 2



(Msg. 3) Posted: Thu Nov 30, 2006 12:30 pm
Post subject: Re: What happened to CONFIG_TCP_NAGLE_OFF? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 11/29/06, Phillip Susi <psusi DeleteThis @cfl.rr.com> wrote:
> > How might I achieve having TCP_NODELAY effectively set for all sockets
> > (by default)? Is there a new/different kernel config option, a patch,
> > a sysctl or proc setting? Or can I "fake" this behavior by, e.g.
> > setting a send buffer sufficiently small?
>
> This is a bad idea and breaks api compatibility. Nagle is very
> important for sockets being used for things like telnet. Other
> applications, like ftp, should already disable nagle themselves.

I don't want to change the API at all. I'm using a closed-source, 3rd
party library. Using strace, I can see that the library does *not* do
a setsockopt(...TCP_NODELAY...) on opened sockets. Since I can't
change the library, I would like to patch and/or configure my kernel
so that all TCP/IP sockets default to TCP_NODELAY.

Also, if my understanding of Nagle is correct, I think you have that
backwards: Nagle should be disabled (i.e. TCP_NODELAY) for telnet,
mouse movements, etc: we always want to send our packets, regardless
of size or previous packet ACK.

Thanks,
Matt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo DeleteThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
John Stoffel

External


Since: Nov 28, 2006
Posts: 43



(Msg. 4) Posted: Thu Nov 30, 2006 2:20 pm
Post subject: Re: What happened to CONFIG_TCP_NAGLE_OFF? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

>>>>> "Matt" == Matt Garman <matthew.garman.RemoveThis@gmail.com> writes:

Matt> On 11/29/06, Phillip Susi <psusi.RemoveThis@cfl.rr.com> wrote:
>> > How might I achieve having TCP_NODELAY effectively set for all sockets
>> > (by default)? Is there a new/different kernel config option, a patch,
>> > a sysctl or proc setting? Or can I "fake" this behavior by, e.g.
>> > setting a send buffer sufficiently small?
>>
>> This is a bad idea and breaks api compatibility. Nagle is very
>> important for sockets being used for things like telnet. Other
>> applications, like ftp, should already disable nagle themselves.

Matt> I don't want to change the API at all. I'm using a
Matt> closed-source, 3rd party library. Using strace, I can see that
Matt> the library does *not* do a setsockopt(...TCP_NODELAY...) on
Matt> opened sockets. Since I can't change the library, I would like
Matt> to patch and/or configure my kernel so that all TCP/IP sockets
Matt> default to TCP_NODELAY.

Can't you use the LD_PRELOAD trick to force your own custom library to
override the closed library, so that you can change the socket options
to be how you want them?

Wouldn't that be easier, and be less likely to screw up the whole
system?

You could override the socket() call, so that you just pass through
all the parameters your library sets, and then you just put in your
own setsockopt() call on the socket, and return it as normal to the
library? Hacky, but should do the trick if you're careful.

John
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Phillip Susi

External


Since: Dec 13, 2006
Posts: 91



(Msg. 5) Posted: Thu Nov 30, 2006 2:50 pm
Post subject: Re: What happened to CONFIG_TCP_NAGLE_OFF? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Matt Garman wrote:
> I don't want to change the API at all. I'm using a closed-source, 3rd
> party library. Using strace, I can see that the library does *not* do
> a setsockopt(...TCP_NODELAY...) on opened sockets. Since I can't
> change the library, I would like to patch and/or configure my kernel
> so that all TCP/IP sockets default to TCP_NODELAY.

That _IS_ changing the api. Applications that wish to use nagle will no
longer be able to because you will have changed the api to always
disable nagle.

> Also, if my understanding of Nagle is correct, I think you have that
> backwards: Nagle should be disabled (i.e. TCP_NODELAY) for telnet,
> mouse movements, etc: we always want to send our packets, regardless
> of size or previous packet ACK.

No, nagle was invented specifically for telnet. Without nagle, every
character you type is sent in its own packet, which gives around 50,000%
overhead. Nagle was created to compact most of your keystrokes into a
single packet.

Things like mouse movements should not be sent over TCP at all. UDP
makes a much better protocol for that kind of data since if a packet is
lost, there is no need to retransmit the same data; instead you just get
the next position update and don't care about where the mouse was during
the dropped packet.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.TakeThisOut@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Alan

External


Since: Nov 11, 2006
Posts: 338



(Msg. 6) Posted: Fri Dec 01, 2006 3:42 am
Post subject: Re: What happened to CONFIG_TCP_NAGLE_OFF? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> No, nagle was invented specifically for telnet. Without nagle, every

No it was general purpose. It fixes some extremely bad behaviour in TCP
with congestion well beyond the "telnet" behaviour.

> Things like mouse movements should not be sent over TCP at all. UDP
> makes a much better protocol for that kind of data since if a packet is

UDP is rarely appropriate because it has no congestion control. There are
more appropriate protocols but they are rarely implemented so TCP
generally gets used.

> lost, there is no need to retransmit the same data; instead you just get
> the next position update and don't care about where the mouse was during
> the dropped packet.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Phillip Susi

External


Since: Dec 13, 2006
Posts: 91



(Msg. 7) Posted: Fri Dec 01, 2006 3:50 pm
Post subject: Re: What happened to CONFIG_TCP_NAGLE_OFF? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Alan wrote:
> No it was general purpose. It fixes some extremely bad behaviour in TCP
> with congestion well beyond the "telnet" behaviour.

Saying it is general purpose demeans it. Nagle was created specifically
to deal with the bad behavior that results from IO patterns like those
created by telnet. Obviously other applications can exhibit those same
patterns. Those that do not, have no need for nagle, so they can
benefit from turning it off.

> UDP is rarely appropriate because it has no congestion control. There are
> more appropriate protocols but they are rarely implemented so TCP
> generally gets used.

UDP is highly appropriate because the congestion controls and other
features of TCP are not required for this type of data, and in fact,
tend to muck things up. That is why the application needs to implement
its own congestion, sequencing, retransmit and connect/disconnect
controls; because the way TCP handles them is not good for this
application.

People often use TCP because it is easier, but not optimal.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo DeleteThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Herbert Xu

External


Since: Sep 05, 2003
Posts: 213



(Msg. 8) Posted: Fri Dec 01, 2006 10:40 pm
Post subject: Re: What happened to CONFIG_TCP_NAGLE_OFF? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Phillip Susi <psusi.TakeThisOut@cfl.rr.com> wrote:
>
> UDP is highly appropriate because the congestion controls and other
> features of TCP are not required for this type of data, and in fact,
> tend to muck things up. That is why the application needs to implement
> its own congestion, sequencing, retransmit and connect/disconnect
> controls; because the way TCP handles them is not good for this
> application.

Congestion control is always appropriate in a shared network. Please
note that congestion control does not conflict with the objectives of
UDP. For UDP, congestion control can simply mean dropping packets at
the source. DCCP is a good replacement for UDP that has congestion
control.

In general it's much better to much better to drop packets at the
source rather than half-way through.

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert.TakeThisOut@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.TakeThisOut@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Phillip Susi

External


Since: Dec 13, 2006
Posts: 91



(Msg. 9) Posted: Mon Dec 04, 2006 10:40 am
Post subject: Re: What happened to CONFIG_TCP_NAGLE_OFF? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Herbert Xu wrote:
> Congestion control is always appropriate in a shared network. Please
> note that congestion control does not conflict with the objectives of
> UDP. For UDP, congestion control can simply mean dropping packets at
> the source. DCCP is a good replacement for UDP that has congestion
> control.

That is why I said that the application should implement its own
congestion control, just in a different way than TCP does that is more
appropriate to the specific needs of the application.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Display posts from previous:   
Related Topics:
whatever happened to down_timeout()? - There has been some discussion on lkml about a function that would either down a semaphore or else abort if it couldn'...

whatever happened with "CONFIG_FORCED_INLINING"? - a while back, i submitted a patch to remove the config option of FORCED_INLINING, since it was allegedly scheduled for....

What ever happened to the new flush mount option? - What ever happened to the patch proposed last year in this thread: ..

[PATCH 5/8] resend cciss: disable DMA prefetch on P600 - PATCH 5 of 8 resend This patch unconditionally disables DMA prefetch on the P600 controller. A bug in the ASIC may..

[PATCH 2.6.19-rc4 1/3] ehea: Nullpointer dereferencation fix - Fix: Must check for nullpointer before dereferencing it - not afterwards. Signed-off-by: Thomas Klein..

[PATCH 2.6.19-rc4 3/3] ehea: 64K page support fix - This patch fixes 64k page support by using PAGE_MASK and appropriate pagesize defines in several places. Signed-off-by...
       Soft32 Home -> Linux -> Kernel All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]