From: "Bendik Rønning Opstad" <bro.devel@gmail.com>
To: Yuchung Cheng <ycheng@google.com>
Cc: "Andreas Petlund" <apetlund@simula.no>,
"Neal Cardwell" <ncardwell@google.com>,
"David S. Miller" <davem@davemloft.net>,
"Alexey Kuznetsov" <kuznet@ms2.inr.ac.ru>,
"James Morris" <jmorris@namei.org>,
"Hideaki YOSHIFUJI" <yoshfuji@linux-ipv6.org>,
"Patrick McHardy" <kaber@trash.net>,
"Jonathan Corbet" <corbet@lwn.net>,
"Eric Dumazet" <edumazet@google.com>,
"Tom Herbert" <tom@herbertland.com>,
"Paolo Abeni" <pabeni@redhat.com>, "Erik Kline" <ek@google.com>,
"Hannes Frederic Sowa" <hannes@stressinduktion.org>,
"Al Viro" <viro@zeniv.linux.org.uk>,
"Jiri Pirko" <jiri@resnulli.us>,
"Alexander Duyck" <alexander.h.duyck@redhat.com>,
"Florian Westphal" <fw@strlen.de>,
"Daniel Lee" <Longinus00@gmail.com>,
"Marcelo Ricardo Leitner" <mleitner@redhat.com>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Willem de Bruijn" <willemb@google.com>,
"Linus Lüssing" <linus.luessing@c0d3.blue>,
linux-doc@vger.kern
Subject: Re: [PATCH RFC net-next 2/2] tcp: Add Redundant Data Bundling (RDB)
Date: Thu, 29 Oct 2015 18:53:53 -0400 [thread overview]
Message-ID: <3710572.sJUWpao1xp@bro-compal> (raw)
In-Reply-To: <CAK6E8=fyY_kQ4ZpyC+q3fH-CFvwDt_=ro2Y7qB9bxgMCpkcC3g@mail.gmail.com>
On Monday, October 26, 2015 02:58:03 PM Yuchung Cheng wrote:
> On Mon, Oct 26, 2015 at 2:35 PM, Andreas Petlund <apetlund@simula.no> wrote:
> > > On 26 Oct 2015, at 15:50, Neal Cardwell <ncardwell@google.com> wrote:
> > >
> > > On Fri, Oct 23, 2015 at 4:50 PM, Bendik Rønning Opstad
> > >
> > > <bro.devel@gmail.com> wrote:
> > >> @@ -2409,6 +2412,15 @@ static int do_tcp_setsockopt(struct sock *sk,
> > >> int level,> >
> > > ...
> > >
> > >> + case TCP_RDB:
> > >> + if (val < 0 || val > 1) {
> > >> + err = -EINVAL;
> > >> + } else {
> > >> + tp->rdb = val;
> > >> + tp->nonagle = val;
> > >
> > > The semantics of the tp->nonagle bits are already a bit complex. My
> > > sense is that having a setsockopt of TCP_RDB transparently modify the
> > > nagle behavior is going to add more extra complexity and unanticipated
> > > behavior than is warranted given the slight possible gain in
> > > convenience to the app writer. What about a model where the
> > > application user just needs to remember to call
> > > setsockopt(TCP_NODELAY) if they want the TCP_RDB behavior to be
> > > sensible? I see your nice tests at
> > >
> > > https://github.com/bendikro/packetdrill/commit/9916b6c53e33dd04329d29b
> > > 7d8baf703b2c2ac1b> >
> > > are already doing that. And my sense is that likewise most
> > > well-engineered "thin stream" apps will already be using
> > > setsockopt(TCP_NODELAY). Is that workable?
This is definitely workable. I agree that it may not be an ideal solution to
have TCP_RDB disable Nagle, however, it would be useful with a way to easily
enable RDB and disable Nagle.
> > We have been discussing this a bit back and forth. Your suggestion would
> > be the right thing to keep the nagle semantics less complex and to
> > educate developers in the intrinsics of the transport.
> >
> > We ended up choosing to implicitly disable nagle since it
> > 1) is incompatible with the logic of RDB.
> > 2) leaving it up to the developer to read the documentation and register
> > the line saying that "failing to set TCP_NODELAY will void the RDB
> > latency gain" will increase the chance of misconfigurations leading to
> > deployment with no effect.
> >
> > The hope was to help both the well-engineered thin-stream apps and the
> > ones deployed by developers with less detailed knowledge of the
> > transport.
> but would RDB be voided if this developer turns on RDB then turns on
> Nagle later?
It would (to a large degree), but I believe that's ok? The intention with also
disabling Nagle is not to remove control from the application writer, so if
TCP_RDB disables Nagle, they should not be prevented from explicitly enabling
Nagle after enabling RDB.
The idea is to make it as easy as possible for the application writer, and
since Nagle is on by default, it makes sense to change this behavior when the
application has indicated that it values low latencies.
Would a solution with multiple option values to TCP_RDB be acceptable? E.g.
0 = Disable
1 = Enable RDB
2 = Enable RDB and disable Nagle
If the sysctl tcp_rdb accepts the same values, setting the sysctl to 2 would
allow to use and test RDB (with Nagle off) on applications that haven't
explicitly disabled Nagle, which would make the sysctl tcp_rdb even more useful.
Instead of having TCP_RDB modify Nagle, would it be better/acceptable to have a
separate socket option (e.g. TCP_THIN/TCP_THIN_LOW_LATENCY) that enables RDB and
disables Nagle? e.g.
0 = Use default system options?
1 = Enable RDB and disable Nagle
This would separate the modification of Nagle from the TCP_RDB socket option and
make it cleaner?
Such an option could also enable other latency-reducing options like
TCP_THIN_LINEAR_TIMEOUTS and TCP_THIN_DUPACK:
2 = Enable RDB, TCP_THIN_LINEAR_TIMEOUTS, TCP_THIN_DUPACK, and disable Nagle
Bendik
next prev parent reply other threads:[~2015-10-29 22:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-23 20:50 [PATCH RFC net-next 0/2] tcp: Redundant Data Bundling (RDB) Bendik Rønning Opstad
2015-10-23 20:50 ` [PATCH RFC net-next 1/2] tcp: Add DPIFL thin stream detection mechanism Bendik Rønning Opstad
2015-10-23 21:44 ` Eric Dumazet
[not found] ` <1445636654.22974.193.camel-XN9IlZ5yJG9HTL0Zs8A6p/gx64E7kk8eUsxypvmhUTTZJqsBc5GL+g@public.gmane.org>
2015-10-25 5:56 ` Bendik Rønning Opstad
2015-10-23 20:50 ` [PATCH RFC net-next 2/2] tcp: Add Redundant Data Bundling (RDB) Bendik Rønning Opstad
2015-10-26 14:50 ` Neal Cardwell
2015-10-26 21:35 ` Andreas Petlund
2015-10-26 21:58 ` Yuchung Cheng
2015-10-27 19:15 ` Jonas Markussen
2015-10-29 22:53 ` Bendik Rønning Opstad [this message]
2015-11-02 9:18 ` David Laight
2015-11-02 9:37 ` David Laight
2015-11-05 2:06 ` Bendik Rønning Opstad
2015-10-24 6:11 ` [PATCH RFC net-next 0/2] tcp: " Yuchung Cheng
2015-10-24 8:00 ` Jonas Markussen
[not found] ` <61F74109-9FDC-485A-978B-714B7AA27445-6miFZF/5cTBuMpJDpNschA@public.gmane.org>
2015-10-24 12:57 ` Eric Dumazet
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=3710572.sJUWpao1xp@bro-compal \
--to=bro.devel@gmail.com \
--cc=Longinus00@gmail.com \
--cc=alexander.h.duyck@redhat.com \
--cc=apetlund@simula.no \
--cc=bro.devel+kernel@gmail.com \
--cc=corbet@lwn.net \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ek@google.com \
--cc=fw@strlen.de \
--cc=hannes@stressinduktion.org \
--cc=jiri@resnulli.us \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linus.luessing@c0d3.blue \
--cc=linux-doc@vger.kern \
--cc=mleitner@redhat.com \
--cc=ncardwell@google.com \
--cc=pabeni@redhat.com \
--cc=tom@herbertland.com \
--cc=viro@zeniv.linux.org.uk \
--cc=willemb@google.com \
--cc=ycheng@google.com \
--cc=yoshfuji@linux-ipv6.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 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).