From: jonathan.davies@citrix.com (Jonathan Davies)
To: linux-arm-kernel@lists.infradead.org
Subject: [Xen-devel] "tcp: refine TSO autosizing" causes performance regression on Xen
Date: Mon, 13 Apr 2015 14:38:25 +0100 [thread overview]
Message-ID: <552BC6D1.1060907@citrix.com> (raw)
In-Reply-To: <CAFLBxZaVjFHh4UBnksGZS4waBr4jLdO8aJegyKvsU1-TvVt2Dg@mail.gmail.com>
On 13/04/15 11:56, George Dunlap wrote:
> On Thu, Apr 9, 2015 at 5:36 PM, Stefano Stabellini
> <stefano.stabellini@eu.citrix.com> wrote:
>> On Thu, 9 Apr 2015, Eric Dumazet wrote:
>>> On Thu, 2015-04-09 at 16:46 +0100, Stefano Stabellini wrote:
>>>> Hi all,
>>>>
>>>> I found a performance regression when running netperf -t TCP_MAERTS from
>>>> an external host to a Xen VM on ARM64: v3.19 and v4.0-rc4 running in the
>>>> virtual machine are 30% slower than v3.18.
>>>>
>>>> Through bisection I found that the perf regression is caused by the
>>>> prensence of the following commit in the guest kernel:
>>>>
>>>>
>>>> commit 605ad7f184b60cfaacbc038aa6c55ee68dee3c89
>>>> Author: Eric Dumazet <edumazet@google.com>
>>>> Date: Sun Dec 7 12:22:18 2014 -0800
>>>>
>>>> tcp: refine TSO autosizing
>
> [snip]
I recently discussed this issue on netdev in the following thread:
https://www.marc.info/?l=linux-netdev&m=142738853820517
>>> This commit restored original TCP Small Queue behavior, which is the
>>> first step to fight bufferbloat.
>>>
>>> Some network drivers are known to be problematic because of a delayed TX
>>> completion.
>
> [snip]
>
>>> Try to tweak /proc/sys/net/ipv4/tcp_limit_output_bytes to see if it
>>> makes a difference ?
>>
>> A very big difference:
>>
>> echo 262144 > /proc/sys/net/ipv4/tcp_limit_output_bytes
>> brings us much closer to the original performance, the slowdown is just
>> 8%
>>
>> echo 1048576 > /proc/sys/net/ipv4/tcp_limit_output_bytes
>> fills the gap entirely, same performance as before "refine TSO
>> autosizing"
>>
>>
>> What would be the next step for here? Should I just document this as an
>> important performance tweaking step for Xen, or is there something else
>> we can do?
>
> Is the problem perhaps that netback/netfront delays TX completion?
> Would it be better to see if that can be addressed properly, so that
> the original purpose of the patch (fighting bufferbloat) can be
> achieved while not degrading performance for Xen? Or at least, so
> that people get decent perfomance out of the box without having to
> tweak TCP parameters?
I agree; reducing the completion latency should be the ultimate goal.
However, that won't be easy, so we need a work-around in the short term.
I don't like the idea of relying on documenting the recommendation to
change tcp_limit_output_bytes; too many people won't read this advice
and will expect the out-of-the-box defaults to be reasonable.
Following Eric's pointers to where a similar problem had been
experienced in wifi drivers, I came up with two proof-of-concept patches
that gave a similar performance gain without any changes to sysctl
parameters or core tcp/ip code. See
https://www.marc.info/?l=linux-netdev&m=142746161307283.
I haven't yet received any feedback from the xen-netfront maintainers
about whether those ideas could be reasonably adopted.
Jonathan
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Davies <jonathan.davies@citrix.com>
To: George Dunlap <George.Dunlap@eu.citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Wei Liu <wei.liu2@citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
netdev <netdev@vger.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
<edumazet@google.com>, <linux-arm-kernel@lists.infradead.org>,
Christoffer Dall <christoffer.dall@linaro.org>,
David Vrabel <david.vrabel@citrix.com>,
"Felipe Franciosi" <felipe.franciosi@citrix.com>,
Paul Durrant <paul.durrant@citrix.com>
Subject: Re: [Xen-devel] "tcp: refine TSO autosizing" causes performance regression on Xen
Date: Mon, 13 Apr 2015 14:38:25 +0100 [thread overview]
Message-ID: <552BC6D1.1060907@citrix.com> (raw)
In-Reply-To: <CAFLBxZaVjFHh4UBnksGZS4waBr4jLdO8aJegyKvsU1-TvVt2Dg@mail.gmail.com>
On 13/04/15 11:56, George Dunlap wrote:
> On Thu, Apr 9, 2015 at 5:36 PM, Stefano Stabellini
> <stefano.stabellini@eu.citrix.com> wrote:
>> On Thu, 9 Apr 2015, Eric Dumazet wrote:
>>> On Thu, 2015-04-09 at 16:46 +0100, Stefano Stabellini wrote:
>>>> Hi all,
>>>>
>>>> I found a performance regression when running netperf -t TCP_MAERTS from
>>>> an external host to a Xen VM on ARM64: v3.19 and v4.0-rc4 running in the
>>>> virtual machine are 30% slower than v3.18.
>>>>
>>>> Through bisection I found that the perf regression is caused by the
>>>> prensence of the following commit in the guest kernel:
>>>>
>>>>
>>>> commit 605ad7f184b60cfaacbc038aa6c55ee68dee3c89
>>>> Author: Eric Dumazet <edumazet@google.com>
>>>> Date: Sun Dec 7 12:22:18 2014 -0800
>>>>
>>>> tcp: refine TSO autosizing
>
> [snip]
I recently discussed this issue on netdev in the following thread:
https://www.marc.info/?l=linux-netdev&m=142738853820517
>>> This commit restored original TCP Small Queue behavior, which is the
>>> first step to fight bufferbloat.
>>>
>>> Some network drivers are known to be problematic because of a delayed TX
>>> completion.
>
> [snip]
>
>>> Try to tweak /proc/sys/net/ipv4/tcp_limit_output_bytes to see if it
>>> makes a difference ?
>>
>> A very big difference:
>>
>> echo 262144 > /proc/sys/net/ipv4/tcp_limit_output_bytes
>> brings us much closer to the original performance, the slowdown is just
>> 8%
>>
>> echo 1048576 > /proc/sys/net/ipv4/tcp_limit_output_bytes
>> fills the gap entirely, same performance as before "refine TSO
>> autosizing"
>>
>>
>> What would be the next step for here? Should I just document this as an
>> important performance tweaking step for Xen, or is there something else
>> we can do?
>
> Is the problem perhaps that netback/netfront delays TX completion?
> Would it be better to see if that can be addressed properly, so that
> the original purpose of the patch (fighting bufferbloat) can be
> achieved while not degrading performance for Xen? Or at least, so
> that people get decent perfomance out of the box without having to
> tweak TCP parameters?
I agree; reducing the completion latency should be the ultimate goal.
However, that won't be easy, so we need a work-around in the short term.
I don't like the idea of relying on documenting the recommendation to
change tcp_limit_output_bytes; too many people won't read this advice
and will expect the out-of-the-box defaults to be reasonable.
Following Eric's pointers to where a similar problem had been
experienced in wifi drivers, I came up with two proof-of-concept patches
that gave a similar performance gain without any changes to sysctl
parameters or core tcp/ip code. See
https://www.marc.info/?l=linux-netdev&m=142746161307283.
I haven't yet received any feedback from the xen-netfront maintainers
about whether those ideas could be reasonably adopted.
Jonathan
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Davies <jonathan.davies@citrix.com>
To: George Dunlap <George.Dunlap@eu.citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Wei Liu <wei.liu2@citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
netdev <netdev@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
edumazet@google.com, linux-arm-kernel@lists.infradead.org,
Christoffer Dall <christoffer.dall@linaro.org>,
David Vrabel <david.vrabel@citrix.com>,
Felipe Franciosi <felipe.franciosi@citrix.com>,
Paul Durrant <paul.durrant@citrix.com>
Subject: Re: [Xen-devel] "tcp: refine TSO autosizing" causes performance regression on Xen
Date: Mon, 13 Apr 2015 14:38:25 +0100 [thread overview]
Message-ID: <552BC6D1.1060907@citrix.com> (raw)
In-Reply-To: <CAFLBxZaVjFHh4UBnksGZS4waBr4jLdO8aJegyKvsU1-TvVt2Dg@mail.gmail.com>
On 13/04/15 11:56, George Dunlap wrote:
> On Thu, Apr 9, 2015 at 5:36 PM, Stefano Stabellini
> <stefano.stabellini@eu.citrix.com> wrote:
>> On Thu, 9 Apr 2015, Eric Dumazet wrote:
>>> On Thu, 2015-04-09 at 16:46 +0100, Stefano Stabellini wrote:
>>>> Hi all,
>>>>
>>>> I found a performance regression when running netperf -t TCP_MAERTS from
>>>> an external host to a Xen VM on ARM64: v3.19 and v4.0-rc4 running in the
>>>> virtual machine are 30% slower than v3.18.
>>>>
>>>> Through bisection I found that the perf regression is caused by the
>>>> prensence of the following commit in the guest kernel:
>>>>
>>>>
>>>> commit 605ad7f184b60cfaacbc038aa6c55ee68dee3c89
>>>> Author: Eric Dumazet <edumazet@google.com>
>>>> Date: Sun Dec 7 12:22:18 2014 -0800
>>>>
>>>> tcp: refine TSO autosizing
>
> [snip]
I recently discussed this issue on netdev in the following thread:
https://www.marc.info/?l=linux-netdev&m=142738853820517
>>> This commit restored original TCP Small Queue behavior, which is the
>>> first step to fight bufferbloat.
>>>
>>> Some network drivers are known to be problematic because of a delayed TX
>>> completion.
>
> [snip]
>
>>> Try to tweak /proc/sys/net/ipv4/tcp_limit_output_bytes to see if it
>>> makes a difference ?
>>
>> A very big difference:
>>
>> echo 262144 > /proc/sys/net/ipv4/tcp_limit_output_bytes
>> brings us much closer to the original performance, the slowdown is just
>> 8%
>>
>> echo 1048576 > /proc/sys/net/ipv4/tcp_limit_output_bytes
>> fills the gap entirely, same performance as before "refine TSO
>> autosizing"
>>
>>
>> What would be the next step for here? Should I just document this as an
>> important performance tweaking step for Xen, or is there something else
>> we can do?
>
> Is the problem perhaps that netback/netfront delays TX completion?
> Would it be better to see if that can be addressed properly, so that
> the original purpose of the patch (fighting bufferbloat) can be
> achieved while not degrading performance for Xen? Or at least, so
> that people get decent perfomance out of the box without having to
> tweak TCP parameters?
I agree; reducing the completion latency should be the ultimate goal.
However, that won't be easy, so we need a work-around in the short term.
I don't like the idea of relying on documenting the recommendation to
change tcp_limit_output_bytes; too many people won't read this advice
and will expect the out-of-the-box defaults to be reasonable.
Following Eric's pointers to where a similar problem had been
experienced in wifi drivers, I came up with two proof-of-concept patches
that gave a similar performance gain without any changes to sysctl
parameters or core tcp/ip code. See
https://www.marc.info/?l=linux-netdev&m=142746161307283.
I haven't yet received any feedback from the xen-netfront maintainers
about whether those ideas could be reasonably adopted.
Jonathan
next prev parent reply other threads:[~2015-04-13 13:38 UTC|newest]
Thread overview: 91+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-09 15:46 "tcp: refine TSO autosizing" causes performance regression on Xen Stefano Stabellini
2015-04-09 15:46 ` Stefano Stabellini
2015-04-09 15:46 ` Stefano Stabellini
2015-04-09 16:16 ` Eric Dumazet
2015-04-09 16:16 ` Eric Dumazet
2015-04-09 16:36 ` Stefano Stabellini
2015-04-09 16:36 ` Stefano Stabellini
2015-04-09 16:36 ` Stefano Stabellini
2015-04-09 17:07 ` Eric Dumazet
2015-04-09 17:07 ` Eric Dumazet
2015-04-13 10:56 ` [Xen-devel] " George Dunlap
2015-04-13 10:56 ` George Dunlap
2015-04-13 13:38 ` Jonathan Davies [this message]
2015-04-13 13:38 ` Jonathan Davies
2015-04-13 13:38 ` Jonathan Davies
2015-04-13 13:49 ` Eric Dumazet
2015-04-13 13:49 ` Eric Dumazet
2015-04-15 13:43 ` George Dunlap
2015-04-15 13:43 ` George Dunlap
2015-04-15 16:38 ` Eric Dumazet
2015-04-15 16:38 ` Eric Dumazet
2015-04-15 16:38 ` Eric Dumazet
2015-04-15 17:23 ` George Dunlap
2015-04-15 17:23 ` George Dunlap
2015-04-15 17:23 ` George Dunlap
2015-04-15 17:29 ` Eric Dumazet
2015-04-15 17:29 ` Eric Dumazet
2015-04-15 17:41 ` George Dunlap
2015-04-15 17:41 ` George Dunlap
2015-04-15 17:41 ` George Dunlap
2015-04-15 17:52 ` Eric Dumazet
2015-04-15 17:52 ` Eric Dumazet
2015-04-15 17:55 ` Rick Jones
2015-04-15 17:55 ` Rick Jones
2015-04-15 18:08 ` Eric Dumazet
2015-04-15 18:08 ` Eric Dumazet
2015-04-15 18:19 ` Rick Jones
2015-04-15 18:19 ` Rick Jones
2015-04-15 18:32 ` Eric Dumazet
2015-04-15 18:32 ` Eric Dumazet
2015-04-15 18:32 ` [Xen-devel] " Eric Dumazet
2015-04-15 20:08 ` Rick Jones
2015-04-15 20:08 ` Rick Jones
2015-04-15 20:08 ` Rick Jones
2015-04-15 18:04 ` George Dunlap
2015-04-15 18:04 ` George Dunlap
2015-04-15 18:04 ` George Dunlap
2015-04-15 18:19 ` Eric Dumazet
2015-04-15 18:19 ` Eric Dumazet
2015-04-16 8:56 ` George Dunlap
2015-04-16 8:56 ` George Dunlap
2015-04-16 8:56 ` George Dunlap
2015-04-16 9:20 ` Daniel Borkmann
2015-04-16 9:20 ` Daniel Borkmann
2015-04-16 9:20 ` Daniel Borkmann
2015-04-16 10:01 ` George Dunlap
2015-04-16 10:01 ` George Dunlap
2015-04-16 10:01 ` George Dunlap
2015-04-16 12:42 ` Eric Dumazet
2015-04-16 12:42 ` Eric Dumazet
2015-04-20 11:03 ` George Dunlap
2015-04-20 11:03 ` George Dunlap
2015-06-02 9:52 ` Wei Liu
2015-06-02 9:52 ` Wei Liu
2015-06-02 9:52 ` Wei Liu
2015-06-02 16:16 ` Eric Dumazet
2015-06-02 16:16 ` Eric Dumazet
2015-04-16 9:22 ` David Laight
2015-04-16 9:22 ` David Laight
2015-04-16 9:22 ` David Laight
2015-04-16 10:57 ` George Dunlap
2015-04-16 10:57 ` George Dunlap
2015-04-15 17:41 ` Eric Dumazet
2015-04-15 17:41 ` Eric Dumazet
2015-04-15 17:58 ` Stefano Stabellini
2015-04-15 17:58 ` Stefano Stabellini
2015-04-15 17:58 ` Stefano Stabellini
2015-04-15 18:17 ` Eric Dumazet
2015-04-15 18:17 ` Eric Dumazet
2015-04-16 4:20 ` Herbert Xu
2015-04-16 4:20 ` Herbert Xu
2015-04-16 4:30 ` Eric Dumazet
2015-04-16 4:30 ` Eric Dumazet
2015-04-16 11:39 ` George Dunlap
2015-04-16 11:39 ` George Dunlap
2015-04-16 11:39 ` George Dunlap
2015-04-16 12:16 ` Eric Dumazet
2015-04-16 12:16 ` Eric Dumazet
2015-04-16 13:00 ` Tim Deegan
2015-04-16 13:00 ` Tim Deegan
2015-04-16 13:00 ` Tim Deegan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=552BC6D1.1060907@citrix.com \
--to=jonathan.davies@citrix.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.