From: Dave Taht <dave.taht@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Hal Murray <hmurray@megapathdsl.net>,
bloat <bloat@lists.bufferbloat.net>
Subject: Re: [Bloat] SO_SNDBUF and SO_RCVBUF
Date: Fri, 24 Apr 2015 07:34:07 -0700 [thread overview]
Message-ID: <CAA93jw5O8opDNmcuYUPV2mb3DLZtFAKjpAP+Sc88qGqf9DiMZw@mail.gmail.com> (raw)
In-Reply-To: <1429883441.22254.126.camel@edumazet-glaptop2.roam.corp.google.com>
On Fri, Apr 24, 2015 at 6:50 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Thu, 2015-04-23 at 21:40 -0700, Dave Taht wrote:
>> and of course, after writing the previous email, I go reading the
>> original commit for this option. Yea, that is a huge increase in
>> context switches...
>>
>> https://lwn.net/Articles/560082/
>>
>> ... but totally worth it for many apps that can do something else
>> while their connection congests, and totally awesome for tcp vpns,
>> x11, screen sharers, etc....
>
> It all depends on how many bytes are pushed by the application per
> sendmsg()
>
> To keep the amount of unsent bytes low, the application should not issue
> a large write, but it still can if it needs to for whatever reason.
>
> netperf -t TCP_STREAM" uses a default size of 16384 bytes per sendmsg.
>
> So obviously, if a wakeup is needed per sendmsg(), number of context
> switches is exactly bandwidth_in_bytes_per_second / 16384
>
> Normally, without this TCP_NOTSENT_LOWAT option, number of wakeups is
> more like bandwidth_in_bytes_per_second / SO_SNDBUF, because kernel
> wakes up the blocked task when output buffers size occupancy reached 50%
>
>
>
I think a "userspace janitors" project is needed, where we identify
everything that could benefit from TCP_NOTSENT_LOWAT[1], and go patch
it.
I did a little of this for using IPV6_TCLASS right on a ton of
applications and (for example) have some long standing patches
submitted to rsync for selecting congestion control and setting
IP_TOS/IPV6_TCLASS (sigh - still not accepted).
Maybe GSOC? Getting, say just one college class to up and go do it,
for a week or two, together, analyzing the the results as they go,
would make a dent....
[1] I think userspace vpns could use an internal fq+codel algorithm,
or perhaps the kernel socket read buffer could gain a socket option to
present one
--
Dave Täht
Open Networking needs **Open Source Hardware**
https://plus.google.com/u/0/+EricRaymond/posts/JqxCe2pFr67
next prev parent reply other threads:[~2015-04-24 14:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-22 19:10 Hal Murray
2015-04-22 19:26 ` Rick Jones
2015-04-22 19:28 ` Dave Taht
2015-04-22 21:02 ` Eric Dumazet
2015-04-22 21:05 ` Rick Jones
2015-04-22 21:46 ` Eric Dumazet
2015-04-22 22:20 ` Simon Barber
2015-04-22 23:08 ` Eric Dumazet
2015-04-24 4:37 ` Dave Taht
2015-04-24 4:40 ` Dave Taht
2015-04-24 13:50 ` Eric Dumazet
2015-04-24 14:34 ` Dave Taht [this message]
2015-04-24 16:31 ` Rick Jones
2015-04-24 18:41 ` Eric Dumazet
2015-04-24 5:23 ` Eric Dumazet
2015-04-22 21:07 ` Steinar H. Gunderson
2015-04-22 21:42 ` Eric Dumazet
2015-04-22 21:47 ` Dave Taht
2015-04-22 22:11 ` Steinar H. Gunderson
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
List information: https://lists.bufferbloat.net/postorius/lists/bloat.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAA93jw5O8opDNmcuYUPV2mb3DLZtFAKjpAP+Sc88qGqf9DiMZw@mail.gmail.com \
--to=dave.taht@gmail.com \
--cc=bloat@lists.bufferbloat.net \
--cc=eric.dumazet@gmail.com \
--cc=hmurray@megapathdsl.net \
/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