Tuning the network
In this recipe, we will look at tuning the network for better performance. This recipe is very much limited to the operating system parameters and not the optimization of routers or switches.
Getting ready
To step through the recipe in this section, we need at least one node to test and to make the configuration changes, and the same can be applied to all the nodes in the cluster.
How to do it...
Connect to a node which at a later stage will be used to install Hadoop. We are using the node
master1.cyrus.com
.Switch as user
root
or havesudo
privileges.Edit the
/etc/sysctl.conf
file to tune parameters which affect the network performance. The parameters shown in the next steps need to be changed in this file.Change the port range by adding the following line:
net.ipv4.ip_local_port_range = 1024 65535
Enable TCP socket reuse and recycle by using the following line:
net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_tw_reuse = 1
Tune the SYN backlog queue by adjusting the following values....