Skip to contentSkip to conversation

2.6.19-rc1: Volanomark slowdown

DISCUSSION Tim Chen 8 participants 17 messages Nov 7, 2006 – Nov 9, 2006

Subsystems (2)
lore
Share & tools
lore

Tim Chen

author
#0 lore raw

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.

Is there any real application out there
that this new behavior could be a concern?

Tim

maintainer
#1 lore raw

From: Tim Chen <[email protected]>
Date: Tue, 07 Nov 2006 10:32:34 -0800

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

Quoted 11 lines

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

Quoted 7 lines

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.

#2 lore raw
Quoted 3 lines · David Miller

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

maintainer
#3 lore raw

From: John Heffner <[email protected]>
Date: Tue, 07 Nov 2006 16:50:33 -0500

Quoted 7 lines

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

#4 lore raw
Quoted 8 lines · David Miller

From: John Heffner <[email protected]>
Date: Tue, 07 Nov 2006 16:50:33 -0500

Quoted 1 line

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

#5 lore raw
In reply to David Miller

Hell]!

Quoted 1 line
Quoted 1 line

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

#6 lore raw
In reply to Tim Chen
Quoted 13 lines · Tim Chen

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.

Quoted 4 lines

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

Signature · 2 lines
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
#7 lore raw
Quoted 4 lines · Arjan van de Ven

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

Signature · 1 line
Walks like a duck. Quacks like a duck. Must be a chicken.
author
#8 lore raw
Quoted 5 lines · Olaf Kirch

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

#9 lore raw
Quoted 7 lines

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

Signature · 2 lines
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
#10 lore raw
In reply to Tim Chen
Quoted 1 line · Tim Chen

The patch in question affects purely TCP and not the scheduler. I don't

I know.

Quoted 2 lines

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.

Quoted 6 lines

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

Signature · 1 line
Walks like a duck. Quacks like a duck. Must be a chicken.
author
#11 lore raw
Quoted 8 lines · Olaf Kirch

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.

Quoted 3 lines

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

#12 lore raw
Quoted 19 lines · On Wed, 08 Nov 2006 14:07:32 -0800 Tim Chen <[email protected]> wrote:
Quoted 8 lines · Olaf Kirch

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.

Quoted 1 line
Quoted 5 lines
Quoted 2 lines

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.

Signature · 1 line
Stephen Hemminger <[email protected]>
author
#13 lore raw
Quoted 4 lines · Stephen Hemminger

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

#14 lore raw
In reply to Tim Chen
Quoted 3 lines · Tim Chen

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

Signature · 1 line
Walks like a duck. Quacks like a duck. Must be a chicken.
#15 lore raw
In reply to Olaf Kirch
Quoted 19 lines · On Wed, 8 Nov 2006 23:10:28 +0100 Olaf Kirch <[email protected]> wrote:
Quoted 1 line · Tim Chen

The patch in question affects purely TCP and not the scheduler. I don't

I know.

Quoted 2 lines

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.

Quoted 3 lines

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.

Quoted 6 lines
Quoted 2 lines

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.

Signature · 1 line
Stephen Hemminger <[email protected]>
#16 lore raw
In reply to Olaf Kirch
Quoted 3 lines · Olaf Kirch

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