From: Dave Taht <dave.taht@gmail.com>
To: bloat-devel <bloat-devel@lists.bufferbloat.net>,
bloat <bloat@lists.bufferbloat.net>
Subject: [Bloat] using tcp_notsent_lowat in various apps?
Date: Tue, 16 Jun 2015 09:11:08 -0700 [thread overview]
Message-ID: <CAA93jw44LGP_qd61u6gTAA+XZSWZPT690oxMXnnXNjheoXiJTA@mail.gmail.com> (raw)
In light of apple's: https://developer.apple.com/videos/wwdc/2015/?id=719
I am curious if anyone has tried this new socket option in appropriate apps,
(web browsers, screen sharers like tightvnc, X11, etc)? Would it be
helpful in openssh/dropbear?
What other sorts of apps? It looks like using it in chrome got stuck
on battery life analsysis:
https://code.google.com/p/chromium/issues/detail?id=310927
It does not appear to be a define in my fairly recently version of
gcc, and looking at the kernel for linux it looks like "25" is correct
there. it is defined to be 0x201 in OSX/ios:
http://fxr.watson.org/fxr/source/bsd/netinet/tcp.h?v=xnu-2050.18.24#L217
(and now on universally in dev builds of ios)
I just tossed off a quick patch for rsync, not that I have a clue as
to whether it would make any difference there.
diff --git a/socket.c b/socket.c
index 3f5786b..bbb2461 100644
--- a/socket.c
+++ b/socket.c
@@ -406,6 +406,8 @@ static int *open_socket_in(int type, int port,
const char *bind_addr,
int af_hint)
{
int one = 1;
+ const int lowat = 16 * 1024;
+ int rc;
int s, *socks, maxs, i, ecnt;
struct addrinfo hints, *all_ai, *resp;
char portbuf[10], **errmsgs;
@@ -451,6 +453,12 @@ static int *open_socket_in(int type, int port,
const char *bind_addr,
setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
(char *)&one, sizeof one);
+#ifndef TCP_NOTSENT_LOWAT
+#define TCP_NOTSENT_LOWAT 25
+#endif
+ rc = setsockopt(s, IPPROTO_TCP, TCP_NOTSENT_LOWAT,
+ (char *)&lowat, sizeof lowat);
+ if(rc != 0) { perror("lowatfailed"); }
if (sockopts)
set_socket_options(s, sockopts);
else
--
Dave Täht
What will it take to vastly improve wifi for everyone?
https://plus.google.com/u/0/explore/makewififast
next reply other threads:[~2015-06-16 16:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 16:11 Dave Taht [this message]
2015-06-16 16:18 ` Steinar H. Gunderson
2015-06-16 16:31 ` Dave Taht
2015-06-16 16:33 ` Jonathan Morton
2015-06-16 17:22 ` Dave Taht
2015-06-16 18:12 ` Eric Dumazet
2015-06-19 2:47 ` Juliusz Chroboczek
2015-06-19 4:07 ` Jonathan Morton
2015-06-19 7:10 ` Eric Dumazet
2015-06-21 15:04 ` Juliusz Chroboczek
2015-06-21 16:09 ` Jonathan Morton
2015-06-22 7:02 ` Eric Dumazet
2015-06-22 12:05 ` Juliusz Chroboczek
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=CAA93jw44LGP_qd61u6gTAA+XZSWZPT690oxMXnnXNjheoXiJTA@mail.gmail.com \
--to=dave.taht@gmail.com \
--cc=bloat-devel@lists.bufferbloat.net \
--cc=bloat@lists.bufferbloat.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