netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: 2.6.19-rc1: Volanomark slowdown
       [not found] <1162924354.10806.172.camel@localhost.localdomain>
@ 2006-11-07 20:45 ` David Miller
  2006-11-07 21:50   ` John Heffner
  2006-11-08 10:07   ` Alexey Kuznetsov
  2006-11-08 15:55 ` Arjan van de Ven
  1 sibling, 2 replies; 16+ messages in thread
From: David Miller @ 2006-11-07 20:45 UTC (permalink / raw)
  To: tim.c.chen; +Cc: netdev, davem, kuznet

From: Tim Chen <tim.c.chen@linux.intel.com>
Date: Tue, 07 Nov 2006 10:32:34 -0800

[ Please bring up networking questions on "netdev@vger.kernel.org"
  as that is the place where networking developers read bug reports
  and questions, they by-in-large do not read linux-kernel at all. ]

> [TCP]: Send ACKs each 2nd received segment
> commit: 1ef9696c909060ccdae3ade245ca88692b49285b
> http://kernel.org/git/?
> p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1ef9696c909060ccdae3ade245ca88692b49285b
> 
> reduced Volanomark benchmark throughput by 10%.  
> This is because Volanomark sends 
> short message (<100 bytes) on its TCP
> connections.  This patch increases the number of ACKs 
> traffic by 3.5 times.  
> 
> By adopting this patch, we assume that with
> small segment, having short delay is important 
> enough that we are willing to reduce bandwidth 
> with more ACKs.  
> 
> Is there any real application out there
> that this new behavior could be a concern?

That's unfortunate, because without that patch connections can hang
which is more important to fix than your performance test.  :-)

If we don't ACK every two segments, stacks which grow the congestion
window based upon packet counting will not grow the congestion window
properly when they are sending smaller than MSS sized segments.

This topic has been discussed quite a bit, you may want to do some
searching in the netdev archives to read some of that.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: 2.6.19-rc1: Volanomark slowdown
  2006-11-07 20:45 ` 2.6.19-rc1: Volanomark slowdown David Miller
@ 2006-11-07 21:50   ` John Heffner
  2006-11-07 22:22     ` David Miller
  2006-11-08 10:07   ` Alexey Kuznetsov
  1 sibling, 1 reply; 16+ messages in thread
From: John Heffner @ 2006-11-07 21:50 UTC (permalink / raw)
  To: David Miller; +Cc: tim.c.chen, netdev, kuznet

David Miller wrote:
> If we don't ACK every two segments, stacks which grow the congestion
> window based upon packet counting will not grow the congestion window
> properly when they are sending smaller than MSS sized segments.

The only stack I know of that does this currently is linux, and in doing 
so does not conform to the spec. ;)  Sending to a BSD receiver will 
result in the same behavior, so the "right place" to fix this is on the 
sending side.  (I know the issue of packet vs. byte counting has come up 
many times over the last 10 years or so, and many arguments have been 
made on either side... I don't mean this to be flame bait but it's clear 
what will happen in this scenario.)

One way of viewing the current situation is that linux's packet counting 
plus ABC is more conservative than byte counting -- sometimes much more 
so.  Packet counting without ABC may be more or less conservative than 
byte counting, depending on segment sizes and receiver ACK strategy. 
Without ABC, linux is vulnerable to aggressive ACKing to inflate the 
cwnd.  This is a kind of ugly state of affairs.

Unfortunately I see no clear way to reconcile these issues short of 
switching to byte counting.  Obviously this would be a big change as 
packet counting is deeply ingrained in not only the congestion control 
but also the recovery code.

   -John

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: 2.6.19-rc1: Volanomark slowdown
  2006-11-07 21:50   ` John Heffner
@ 2006-11-07 22:22     ` David Miller
  2006-11-07 22:29       ` John Heffner
  0 siblings, 1 reply; 16+ messages in thread
From: David Miller @ 2006-11-07 22:22 UTC (permalink / raw)
  To: jheffner; +Cc: tim.c.chen, netdev, kuznet

From: John Heffner <jheffner@psc.edu>
Date: Tue, 07 Nov 2006 16:50:33 -0500

> The only stack I know of that does this currently is linux, and in doing 
> so does not conform to the spec. ;)  Sending to a BSD receiver will 
> result in the same behavior, so the "right place" to fix this is on the 
> sending side.  (I know the issue of packet vs. byte counting has come up 
> many times over the last 10 years or so, and many arguments have been 
> made on either side... I don't mean this to be flame bait but it's clear 
> what will happen in this scenario.)

John, you cannot change the N-million existing Linux systems
out there doing congestion control via byte counting.  You
cannot do this no matter how much you wish it so :-)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: 2.6.19-rc1: Volanomark slowdown
  2006-11-07 22:22     ` David Miller
@ 2006-11-07 22:29       ` John Heffner
  0 siblings, 0 replies; 16+ messages in thread
From: John Heffner @ 2006-11-07 22:29 UTC (permalink / raw)
  To: David Miller; +Cc: tim.c.chen, netdev, kuznet

David Miller wrote:
> From: John Heffner <jheffner@psc.edu>
> Date: Tue, 07 Nov 2006 16:50:33 -0500
> 
>> The only stack I know of that does this currently is linux, and in doing 
>> so does not conform to the spec. ;)  Sending to a BSD receiver will 
>> result in the same behavior, so the "right place" to fix this is on the 
>> sending side.  (I know the issue of packet vs. byte counting has come up 
>> many times over the last 10 years or so, and many arguments have been 
>> made on either side... I don't mean this to be flame bait but it's clear 
>> what will happen in this scenario.)
> 
> John, you cannot change the N-million existing Linux systems
> out there doing congestion control via byte counting.  You
> cannot do this no matter how much you wish it so :-)

That would make our lives easier, wouldn't it? ;)  Clearly there are 
some combinations of TCP stacks out there that won't interoperate well 
under certain workloads.  Making new versions of the stack work well is 
the best we can hope for...

Fixing the sending side does not mean we have to back out the 
work-around on the receiving side.

   -John

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: 2.6.19-rc1: Volanomark slowdown
  2006-11-07 20:45 ` 2.6.19-rc1: Volanomark slowdown David Miller
  2006-11-07 21:50   ` John Heffner
@ 2006-11-08 10:07   ` Alexey Kuznetsov
  1 sibling, 0 replies; 16+ messages in thread
From: Alexey Kuznetsov @ 2006-11-08 10:07 UTC (permalink / raw)
  To: David Miller; +Cc: tim.c.chen, netdev

Hell]!

> > reduced Volanomark benchmark throughput by 10%.  

The irony of it is that java vm used to be one of victims
of over-delayed acks.

I will look, there is a little chance that it is possible
to detect the situation and to stretch ACKs.

There is one little question though. If you see a visible
difference in performance, does it mean that you see Volaconomark
used to show much better numbers comparing to another OSes? :-)

Alexey

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: 2.6.19-rc1: Volanomark slowdown
       [not found] <1162924354.10806.172.camel@localhost.localdomain>
  2006-11-07 20:45 ` 2.6.19-rc1: Volanomark slowdown David Miller
@ 2006-11-08 15:55 ` Arjan van de Ven
  2006-11-08 16:29   ` Olaf Kirch
  1 sibling, 1 reply; 16+ messages in thread
From: Arjan van de Ven @ 2006-11-08 15:55 UTC (permalink / raw)
  To: tim.c.chen; +Cc: linux-kernel, davem, kuznet, netdev

On Tue, 2006-11-07 at 10:32 -0800, Tim Chen wrote:
> The patch
> 
> [TCP]: Send ACKs each 2nd received segment
> commit: 1ef9696c909060ccdae3ade245ca88692b49285b
> http://kernel.org/git/?
> p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1ef9696c909060ccdae3ade245ca88692b49285b
> 
> reduced Volanomark benchmark throughput by 10%.  
> This is because Volanomark sends 
> short message (<100 bytes) on its TCP
> connections.  This patch increases the number of ACKs 
> traffic by 3.5 times.  
> 
> By adopting this patch, we assume that with
> small segment, having short delay is important 
> enough that we are willing to reduce bandwidth 
> with more ACKs.  

I wonder if it's an option to use low priority QoS fields for these acks
(heck I don't even know if ACKs have such fields in their packet) so
that they can get dropped if there are more packets then there is
bandwidth ....


-- 
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: 2.6.19-rc1: Volanomark slowdown
  2006-11-08 15:55 ` Arjan van de Ven
@ 2006-11-08 16:29   ` Olaf Kirch
  2006-11-08 18:38     ` Tim Chen
  0 siblings, 1 reply; 16+ messages in thread
From: Olaf Kirch @ 2006-11-08 16:29 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: tim.c.chen, linux-kernel, davem, kuznet, netdev

On Wed, Nov 08, 2006 at 04:55:18PM +0100, Arjan van de Ven wrote:
> I wonder if it's an option to use low priority QoS fields for these acks
> (heck I don't even know if ACKs have such fields in their packet) so
> that they can get dropped if there are more packets then there is
> bandwidth ....

Is it proven that the number of ACKs actually cause bandwidth problems?
I found Volanomark to exercise the scheduler more than anything else,
so maybe the slowdown, while triggered by an increased number of ACKs,
is caused by something else entirely.

Olaf
-- 
Walks like a duck. Quacks like a duck. Must be a chicken.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: 2.6.19-rc1: Volanomark slowdown
  2006-11-08 16:29   ` Olaf Kirch
@ 2006-11-08 18:38     ` Tim Chen
  2006-11-08 19:44       ` Arjan van de Ven
  2006-11-08 22:10       ` Olaf Kirch
  0 siblings, 2 replies; 16+ messages in thread
From: Tim Chen @ 2006-11-08 18:38 UTC (permalink / raw)
  To: Olaf Kirch; +Cc: Arjan van de Ven, linux-kernel, davem, kuznet, netdev

On Wed, 2006-11-08 at 17:29 +0100, Olaf Kirch wrote:

> Is it proven that the number of ACKs actually cause bandwidth problems?
> I found Volanomark to exercise the scheduler more than anything else,
> so maybe the slowdown, while triggered by an increased number of ACKs,
> is caused by something else entirely.
> 

The patch in question affects purely TCP and not the scheduler.  I don't
think the scheduler has anything to do with the slowdown seen after
the patch is applied.

The total number of messages being exchanged around the chatrooms in 
Volanomark remain unchanged.  But ACKS increase by 3.5 times and
segments received increase by 38% from netstat.  

ACK is comparable in size to the actual Volanomark messages as 
those are  pretty small (<100 byte).

So I think it is reasonable to conclude that the increase in TCP traffic
reduce the bandwidth and throughput in Volanomark.

However, Volanomark is just a benchmark to alert us to changes.  
If in real applications with small segment, this patch is 
needed to fix congestion window adjustment as Dave pointed 
out, and impact on bandwidth not as important, so be it.

Tim

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: 2.6.19-rc1: Volanomark slowdown
  2006-11-08 18:38     ` Tim Chen
@ 2006-11-08 19:44       ` Arjan van de Ven
  2006-11-08 22:10       ` Olaf Kirch
  1 sibling, 0 replies; 16+ messages in thread
From: Arjan van de Ven @ 2006-11-08 19:44 UTC (permalink / raw)
  To: tim.c.chen; +Cc: Olaf Kirch, linux-kernel, davem, kuznet, netdev


> However, Volanomark is just a benchmark to alert us to changes.  
> If in real applications with small segment, this patch is 
> needed to fix congestion window adjustment as Dave pointed 
> out, and impact on bandwidth not as important, so be it.
> 
> Tim

if we can get the best of both worlds (by having the extra acks drop on
congestion) it's of course nicer ;)

-- 
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: 2.6.19-rc1: Volanomark slowdown
  2006-11-08 22:10       ` Olaf Kirch
@ 2006-11-08 22:07         ` Tim Chen
  2006-11-08 23:00           ` Stephen Hemminger
  2006-11-09  9:21           ` Olaf Kirch
  2006-11-08 22:58         ` Stephen Hemminger
  2006-11-09  1:08         ` Rick Jones
  2 siblings, 2 replies; 16+ messages in thread
From: Tim Chen @ 2006-11-08 22:07 UTC (permalink / raw)
  To: Olaf Kirch; +Cc: Arjan van de Ven, linux-kernel, davem, kuznet, netdev

On Wed, 2006-11-08 at 23:10 +0100, Olaf Kirch wrote:

> 
> In fixing performance issues, the most obvious explanation isn't always
> the right one. It's quite possible you're right, sure.
> 
> What I'm saying though is that it doesn't rhyme with what I've seen of
> Volanomark - we ran 2.6.16 on a 4p Intel box for instance and it didn't
> come close to saturating a Gigabit pipe before it maxed out on CPU load.
> 

I am running Volanomark in a loopback mode on a 2P woodcrest box 
(4 cores).  So the configuration is a bit different.  

In my testing, the CPU utilization is at 100%.  So
increase in ACKs will cost CPU to devote more
time to process those ACKs and reduce throughput.

> 
> You could count the number of outbound packets dropped on the server.
> 

As I'm running in loopback mode, there are no dropped packets.

Thanks.

Tim


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: 2.6.19-rc1: Volanomark slowdown
  2006-11-08 18:38     ` Tim Chen
  2006-11-08 19:44       ` Arjan van de Ven
@ 2006-11-08 22:10       ` Olaf Kirch
  2006-11-08 22:07         ` Tim Chen
                           ` (2 more replies)
  1 sibling, 3 replies; 16+ messages in thread
From: Olaf Kirch @ 2006-11-08 22:10 UTC (permalink / raw)
  To: Tim Chen; +Cc: Arjan van de Ven, linux-kernel, davem, kuznet, netdev

On Wed, Nov 08, 2006 at 10:38:52AM -0800, Tim Chen wrote:
> The patch in question affects purely TCP and not the scheduler.  I don't

I know.

> think the scheduler has anything to do with the slowdown seen after
> the patch is applied.

In fixing performance issues, the most obvious explanation isn't always
the right one. It's quite possible you're right, sure.

What I'm saying though is that it doesn't rhyme with what I've seen of
Volanomark - we ran 2.6.16 on a 4p Intel box for instance and it didn't
come close to saturating a Gigabit pipe before it maxed out on CPU load.

> The total number of messages being exchanged around the chatrooms in 
> Volanomark remain unchanged.  But ACKS increase by 3.5 times and
> segments received increase by 38% from netstat.  

> So I think it is reasonable to conclude that the increase in TCP traffic
> reduce the bandwidth and throughput in Volanomark.

You could count the number of outbound packets dropped on the server.

Olaf
-- 
Walks like a duck. Quacks like a duck. Must be a chicken.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: 2.6.19-rc1: Volanomark slowdown
  2006-11-08 23:00           ` Stephen Hemminger
@ 2006-11-08 22:32             ` Tim Chen
  0 siblings, 0 replies; 16+ messages in thread
From: Tim Chen @ 2006-11-08 22:32 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Olaf Kirch, Arjan van de Ven, linux-kernel, davem, kuznet, netdev

On Wed, 2006-11-08 at 15:00 -0800, Stephen Hemminger wrote:

> 
> Optimizing for loopback is perversion; perversion can be fun but it gets
> to be a obsession then it's sick.
> 

It is not my intention to optimize for this case, but rather to
detect change in kernel behavior.

That's why in my original mail I ask if increase in ACKs could
cause problem for any real application.  

Tim

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: 2.6.19-rc1: Volanomark slowdown
  2006-11-08 22:10       ` Olaf Kirch
  2006-11-08 22:07         ` Tim Chen
@ 2006-11-08 22:58         ` Stephen Hemminger
  2006-11-09  1:08         ` Rick Jones
  2 siblings, 0 replies; 16+ messages in thread
From: Stephen Hemminger @ 2006-11-08 22:58 UTC (permalink / raw)
  To: Olaf Kirch
  Cc: Tim Chen, Arjan van de Ven, linux-kernel, davem, kuznet, netdev

On Wed, 8 Nov 2006 23:10:28 +0100
Olaf Kirch <okir@suse.de> wrote:

> On Wed, Nov 08, 2006 at 10:38:52AM -0800, Tim Chen wrote:
> > The patch in question affects purely TCP and not the scheduler.  I don't
> 
> I know.
> 
> > think the scheduler has anything to do with the slowdown seen after
> > the patch is applied.
> 
> In fixing performance issues, the most obvious explanation isn't always
> the right one. It's quite possible you're right, sure.
> 
> What I'm saying though is that it doesn't rhyme with what I've seen of
> Volanomark - we ran 2.6.16 on a 4p Intel box for instance and it didn't
> come close to saturating a Gigabit pipe before it maxed out on CPU load.
> 
> > The total number of messages being exchanged around the chatrooms in 
> > Volanomark remain unchanged.  But ACKS increase by 3.5 times and
> > segments received increase by 38% from netstat.  
> 
> > So I think it is reasonable to conclude that the increase in TCP traffic
> > reduce the bandwidth and throughput in Volanomark.
> 
> You could count the number of outbound packets dropped on the server.
> 
> Olaf

Also under benchmark stress, the load can get so high that timers go
off that normally don't. For example, I have seen delayed ack timer
cause extra ack's when at lower loads the response happened quick enough
that the ACK was piggybacked.


-- 
Stephen Hemminger <shemminger@osdl.org>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: 2.6.19-rc1: Volanomark slowdown
  2006-11-08 22:07         ` Tim Chen
@ 2006-11-08 23:00           ` Stephen Hemminger
  2006-11-08 22:32             ` Tim Chen
  2006-11-09  9:21           ` Olaf Kirch
  1 sibling, 1 reply; 16+ messages in thread
From: Stephen Hemminger @ 2006-11-08 23:00 UTC (permalink / raw)
  To: tim.c.chen
  Cc: Olaf Kirch, Arjan van de Ven, linux-kernel, davem, kuznet, netdev

On Wed, 08 Nov 2006 14:07:32 -0800
Tim Chen <tim.c.chen@linux.intel.com> wrote:

> On Wed, 2006-11-08 at 23:10 +0100, Olaf Kirch wrote:
> 
> > 
> > In fixing performance issues, the most obvious explanation isn't always
> > the right one. It's quite possible you're right, sure.
> > 
> > What I'm saying though is that it doesn't rhyme with what I've seen of
> > Volanomark - we ran 2.6.16 on a 4p Intel box for instance and it didn't
> > come close to saturating a Gigabit pipe before it maxed out on CPU load.
> > 
> 
> I am running Volanomark in a loopback mode on a 2P woodcrest box 
> (4 cores).  So the configuration is a bit different.  
> 
> In my testing, the CPU utilization is at 100%.  So
> increase in ACKs will cost CPU to devote more
> time to process those ACKs and reduce throughput.
> 
> > 
> > You could count the number of outbound packets dropped on the server.
> > 
> 
> As I'm running in loopback mode, there are no dropped packets.
> 

Optimizing for loopback is perversion; perversion can be fun but it gets
to be a obsession then it's sick.

-- 
Stephen Hemminger <shemminger@osdl.org>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: 2.6.19-rc1: Volanomark slowdown
  2006-11-08 22:10       ` Olaf Kirch
  2006-11-08 22:07         ` Tim Chen
  2006-11-08 22:58         ` Stephen Hemminger
@ 2006-11-09  1:08         ` Rick Jones
  2 siblings, 0 replies; 16+ messages in thread
From: Rick Jones @ 2006-11-09  1:08 UTC (permalink / raw)
  To: Olaf Kirch
  Cc: Tim Chen, Arjan van de Ven, linux-kernel, davem, kuznet, netdev

On Wed, 2006-11-08 at 23:10 +0100, Olaf Kirch wrote:
> What I'm saying though is that it doesn't rhyme with what I've seen of
> Volanomark - we ran 2.6.16 on a 4p Intel box for instance and it didn't
> come close to saturating a Gigabit pipe before it maxed out on CPU load.

That actually supports the hypothesis doesn't it?  The issue being the
increased number of ACKs causing additional CPU overhead not saturating
a NIC if any involved.

One of these days I may have to try to look more closely at what volano
does relative to netperf - I remember that someone tried very hard (was
it you alexy?) to show a perfomance effect with netperf and it didn't do
it :(

rick jones


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: 2.6.19-rc1: Volanomark slowdown
  2006-11-08 22:07         ` Tim Chen
  2006-11-08 23:00           ` Stephen Hemminger
@ 2006-11-09  9:21           ` Olaf Kirch
  1 sibling, 0 replies; 16+ messages in thread
From: Olaf Kirch @ 2006-11-09  9:21 UTC (permalink / raw)
  To: Tim Chen; +Cc: Arjan van de Ven, linux-kernel, davem, kuznet, netdev

On Wed, Nov 08, 2006 at 02:07:32PM -0800, Tim Chen wrote:
> In my testing, the CPU utilization is at 100%.  So
> increase in ACKs will cost CPU to devote more
> time to process those ACKs and reduce throughput.

Oh, I see. I would test on a real network with real clients. I doubt
you would observe a noticeable effect there.

Olaf
-- 
Walks like a duck. Quacks like a duck. Must be a chicken.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2006-11-09  9:21 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1162924354.10806.172.camel@localhost.localdomain>
2006-11-07 20:45 ` 2.6.19-rc1: Volanomark slowdown David Miller
2006-11-07 21:50   ` John Heffner
2006-11-07 22:22     ` David Miller
2006-11-07 22:29       ` John Heffner
2006-11-08 10:07   ` Alexey Kuznetsov
2006-11-08 15:55 ` Arjan van de Ven
2006-11-08 16:29   ` Olaf Kirch
2006-11-08 18:38     ` Tim Chen
2006-11-08 19:44       ` Arjan van de Ven
2006-11-08 22:10       ` Olaf Kirch
2006-11-08 22:07         ` Tim Chen
2006-11-08 23:00           ` Stephen Hemminger
2006-11-08 22:32             ` Tim Chen
2006-11-09  9:21           ` Olaf Kirch
2006-11-08 22:58         ` Stephen Hemminger
2006-11-09  1:08         ` Rick Jones

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).