diff options
author | Bill Fenner <fenner@FreeBSD.org> | 1998-05-17 06:39:38 +0000 |
---|---|---|
committer | Bill Fenner <fenner@FreeBSD.org> | 1998-05-17 06:39:38 +0000 |
commit | 4a3bf3b27c0930b37b8fe1de84c4cd2a5b2ea791 (patch) | |
tree | b72e11a27c18b19aa8bacd1672488e211435600a /sbin/dump | |
parent | bd6be9150dbeaa8d8175a9273fd68f24b8f38271 (diff) | |
download | src-4a3bf3b27c0930b37b8fe1de84c4cd2a5b2ea791.tar.gz src-4a3bf3b27c0930b37b8fe1de84c4cd2a5b2ea791.zip |
Turn on TCP_NODELAY on the remote socket, to turn off sender silly window
syndrome avoidance. The combination of SWS avoidance and ack-every-other
causes low throughput if the block size divided by the MSS is odd (which
is true with the default block size and MSS).
Turning on TCP_NODELAY disables the Nagle algorithm and sender SWS avoidance.
The rdump request/response protocol can not invoke Nagle and cannot cause
SWS, so this has no negative effects.
Notes
Notes:
svn path=/head/; revision=36115
Diffstat (limited to 'sbin/dump')
-rw-r--r-- | sbin/dump/dumprmt.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sbin/dump/dumprmt.c b/sbin/dump/dumprmt.c index 0be78667984e..6420eaad260e 100644 --- a/sbin/dump/dumprmt.c +++ b/sbin/dump/dumprmt.c @@ -51,6 +51,7 @@ static char sccsid[] = "@(#)dumprmt.c 8.3 (Berkeley) 4/28/95"; #include <netinet/in.h> #include <netinet/in_systm.h> #include <netinet/ip.h> +#include <netinet/tcp.h> #include <protocols/dumprestore.h> @@ -142,12 +143,10 @@ rmtgetconn() register const char *rmt; static struct servent *sp = NULL; static struct passwd *pwd = NULL; -#ifdef notdef - static int on = 1; -#endif char *tuser; int size; int throughput; + int on; if (sp == NULL) { sp = getservbyname(dokerberos ? "kshell" : "shell", "tcp"); @@ -199,11 +198,9 @@ rmtgetconn() if (setsockopt(rmtape, IPPROTO_IP, IP_TOS, &throughput, sizeof(throughput)) < 0) perror("IP_TOS:IPTOS_THROUGHPUT setsockopt"); - -#ifdef notdef + on = 1; if (setsockopt(rmtape, IPPROTO_TCP, TCP_NODELAY, &on, sizeof (on)) < 0) perror("TCP_NODELAY setsockopt"); -#endif } static int |