add these lines to /etc/sysctl.conf :
fs.file-max = 100000 net.ipv4.tcp_window_scaling = 1 net.ipv4.tcp_syncookies = 1 net.core.rmem_max = 16777216 net.core.wmem_max = 16777216 net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 65536 16777216 net.core.rmem_default=65536 net.core.wmem_default=65536 net.ipv4.route.flush=1
and then :
sysctl -p /etc/sysctl.conf
References
http://www.techrepublic.com/blog/linux-and-open-source/tuning-the-linux-kernel-for-more-aggressive-network-throughput/
https://wwwx.cs.unc.edu/~sparkst/howto/network_tuning.php
https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Web_Platform/5/html/Administration_And_Configuration_Guide/jgroups-perf-udpbuffer.html
http://www.nateware.com/linux-network-tuning-for-2013.html
http://www.slashroot.in/linux-network-tcp-performance-tuning-sysctl