From 260fd25568322c575b08b89d7ca60e75f000de41 Mon Sep 17 00:00:00 2001 From: Arpit Agarwal Date: Tue, 29 Jul 2014 02:55:27 +0000 Subject: [PATCH] HADOOP-8069. Enable TCP_NODELAY by default for IPC. (Contributed by Todd Lipcon) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1614242 13f79535-47bb-0310-9956-ffa450edef68 --- .../hadoop-common/CHANGES.txt | 3 +++ .../fs/CommonConfigurationKeysPublic.java | 4 ++-- .../src/main/resources/core-default.xml | 19 ------------------- 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index b13598f9aa..c2f6f91eda 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -460,6 +460,9 @@ Release 2.6.0 - UNRELEASED HADOOP-10882. Move DirectBufferPool into common util. (todd) + HADOOP-8069. Enable TCP_NODELAY by default for IPC. (Todd Lipcon via + Arpit Agarwal) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java index 57d4eec23b..59c08143bf 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java @@ -207,7 +207,7 @@ public class CommonConfigurationKeysPublic { public static final String IPC_CLIENT_TCPNODELAY_KEY = "ipc.client.tcpnodelay"; /** Defalt value for IPC_CLIENT_TCPNODELAY_KEY */ - public static final boolean IPC_CLIENT_TCPNODELAY_DEFAULT = false; + public static final boolean IPC_CLIENT_TCPNODELAY_DEFAULT = true; /** See core-default.xml */ public static final String IPC_SERVER_LISTEN_QUEUE_SIZE_KEY = "ipc.server.listen.queue.size"; @@ -226,7 +226,7 @@ public class CommonConfigurationKeysPublic { public static final String IPC_SERVER_TCPNODELAY_KEY = "ipc.server.tcpnodelay"; /** Default value for IPC_SERVER_TCPNODELAY_KEY */ - public static final boolean IPC_SERVER_TCPNODELAY_DEFAULT = false; + public static final boolean IPC_SERVER_TCPNODELAY_DEFAULT = true; /** See core-default.xml */ public static final String HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_KEY = diff --git a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml index 46bcf895a5..eeb2bb20fa 100644 --- a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml +++ b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml @@ -807,25 +807,6 @@ for ldap providers in the same way as above does. - - ipc.server.tcpnodelay - false - Turn on/off Nagle's algorithm for the TCP socket connection on - the server. Setting to true disables the algorithm and may decrease latency - with a cost of more/smaller packets. - - - - - ipc.client.tcpnodelay - false - Turn on/off Nagle's algorithm for the TCP socket connection on - the client. Setting to true disables the algorithm and may decrease latency - with a cost of more/smaller packets. - - - -