* Loopback and Nagle's algorithm
@ 2011-04-12 2:37 Adam McLaurin
2011-04-12 9:42 ` Alejandro Riveira Fernández
2011-04-12 9:45 ` Will Newton
0 siblings, 2 replies; 6+ messages in thread
From: Adam McLaurin @ 2011-04-12 2:37 UTC (permalink / raw)
To: linux-kernel
I understand that disabling Nagle's algorithm via TCP_NODELAY will
generally degrade throughput. However, in my scenario (150 byte
messages, sending as fast as possible), the actual throughput penalty
over the network is marginal (maybe 10% at most).
However, when I disable Nagle's algorithm when connecting over loopback,
the performance hit is *huge* - 10x reduction in throughput.
The question is, why is disabling Nagle's algorithm on loopback so much
worse w.r.t. throughput? Is there anything I can do to reduce the
incurred throughput penalty?
Thanks,
Adam
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Loopback and Nagle's algorithm
2011-04-12 2:37 Loopback and Nagle's algorithm Adam McLaurin
@ 2011-04-12 9:42 ` Alejandro Riveira Fernández
2011-04-12 9:45 ` Will Newton
1 sibling, 0 replies; 6+ messages in thread
From: Alejandro Riveira Fernández @ 2011-04-12 9:42 UTC (permalink / raw)
To: Adam McLaurin; +Cc: linux-kernel, netdev
El Mon, 11 Apr 2011 22:37:49 -0400
"Adam McLaurin" <lkml@irotas.net> escribió:
Just CCing netdev
> I understand that disabling Nagle's algorithm via TCP_NODELAY will
> generally degrade throughput. However, in my scenario (150 byte
> messages, sending as fast as possible), the actual throughput penalty
> over the network is marginal (maybe 10% at most).
>
> However, when I disable Nagle's algorithm when connecting over loopback,
> the performance hit is *huge* - 10x reduction in throughput.
>
> The question is, why is disabling Nagle's algorithm on loopback so much
> worse w.r.t. throughput? Is there anything I can do to reduce the
> incurred throughput penalty?
>
> Thanks,
> Adam
> --
> 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/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Loopback and Nagle's algorithm
2011-04-12 2:37 Loopback and Nagle's algorithm Adam McLaurin
2011-04-12 9:42 ` Alejandro Riveira Fernández
@ 2011-04-12 9:45 ` Will Newton
2011-04-12 11:04 ` Adam McLaurin
1 sibling, 1 reply; 6+ messages in thread
From: Will Newton @ 2011-04-12 9:45 UTC (permalink / raw)
To: Adam McLaurin; +Cc: linux-kernel
On Tue, Apr 12, 2011 at 3:37 AM, Adam McLaurin <lkml@irotas.net> wrote:
> I understand that disabling Nagle's algorithm via TCP_NODELAY will
> generally degrade throughput. However, in my scenario (150 byte
> messages, sending as fast as possible), the actual throughput penalty
> over the network is marginal (maybe 10% at most).
>
> However, when I disable Nagle's algorithm when connecting over loopback,
> the performance hit is *huge* - 10x reduction in throughput.
>
> The question is, why is disabling Nagle's algorithm on loopback so much
> worse w.r.t. throughput? Is there anything I can do to reduce the
> incurred throughput penalty?
It may be caused by an increase in context switch rate, as both sender
and receiver are on the same machine.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Loopback and Nagle's algorithm
2011-04-12 9:45 ` Will Newton
@ 2011-04-12 11:04 ` Adam McLaurin
2011-04-12 11:54 ` Jiri Kosina
0 siblings, 1 reply; 6+ messages in thread
From: Adam McLaurin @ 2011-04-12 11:04 UTC (permalink / raw)
To: Will Newton; +Cc: linux-kernel
On Tue, 12 Apr 2011 10:45 +0100, "Will Newton" <will.newton@gmail.com>
wrote:
> It may be caused by an increase in context switch rate, as both sender
> and receiver are on the same machine.
I'm not sure that's what's happening, since the box where I'm running
this test has 8 physical CPU's and 32 cores in total.
Thanks,
Adam
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Loopback and Nagle's algorithm
2011-04-12 11:04 ` Adam McLaurin
@ 2011-04-12 11:54 ` Jiri Kosina
2011-04-12 13:08 ` Eric Dumazet
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Kosina @ 2011-04-12 11:54 UTC (permalink / raw)
To: Adam McLaurin; +Cc: Will Newton, linux-kernel
On Tue, 12 Apr 2011, Adam McLaurin wrote:
> > It may be caused by an increase in context switch rate, as both sender
> > and receiver are on the same machine.
>
> I'm not sure that's what's happening, since the box where I'm running
> this test has 8 physical CPU's and 32 cores in total.
Have you tried firing up the testcase under perf, to see what it reveals
as the bottleneck?
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Loopback and Nagle's algorithm
2011-04-12 11:54 ` Jiri Kosina
@ 2011-04-12 13:08 ` Eric Dumazet
0 siblings, 0 replies; 6+ messages in thread
From: Eric Dumazet @ 2011-04-12 13:08 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Adam McLaurin, Will Newton, linux-kernel, netdev
Le mardi 12 avril 2011 à 13:54 +0200, Jiri Kosina a écrit :
> On Tue, 12 Apr 2011, Adam McLaurin wrote:
>
> > > It may be caused by an increase in context switch rate, as both sender
> > > and receiver are on the same machine.
> >
> > I'm not sure that's what's happening, since the box where I'm running
> > this test has 8 physical CPU's and 32 cores in total.
>
> Have you tried firing up the testcase under perf, to see what it reveals
> as the bottleneck?
>
CC netdev
This rings a bell here.
I suspect we hit mod_timer() / lock_timer_base() because of delack
timer constantly changing.
I remember raising this point last year :
http://kerneltrap.org/mailarchive/linux-netdev/2010/5/20/6277741
David answer :
http://kerneltrap.org/mailarchive/linux-netdev/2010/6/2/6278430
I am afraid no change was done...
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-04-12 13:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-12 2:37 Loopback and Nagle's algorithm Adam McLaurin
2011-04-12 9:42 ` Alejandro Riveira Fernández
2011-04-12 9:45 ` Will Newton
2011-04-12 11:04 ` Adam McLaurin
2011-04-12 11:54 ` Jiri Kosina
2011-04-12 13:08 ` Eric Dumazet
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.