I really think IPv6 is a step in future direction but I saw poor performance on one of our OVH server.
/etc/sysctl.conf and add following lines.
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1
sudo sysctl -p
Just run following command
If it returns 0, then ipv6 is not completely disabled. May be you need to reboot OS which is something not desired on server.
So just run following command to disable manually.
echo "1" > /proc/sys/net/ipv6/conf/all/disable_ipv6
You can test again to see if its disabled.
Thats it. Next section has tests I have carried out before reaching to conclusion that I need to disable IPv6. You may skip it.
wget with IPv6
wget -O /dev/null http://proof.ovh.ca/files/1Gb.dat --2014-02-06 06:42:26-- http://proof.ovh.ca/files/1Gb.dat Resolving proof.ovh.ca (proof.ovh.ca)... 2607:5300:60:273a::1, 188.8.131.52 Connecting to proof.ovh.ca (proof.ovh.ca)|2607:5300:60:273a::1|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 125000000 (119M) [application/x-ns-proxy-autoconfig] Saving to: `/dev/null' 100%[======================================>] 125,000,000 1.35M/s in 94s 2014-02-06 06:44:00 (1.27 MB/s) - `/dev/null' saved [125000000/125000000]
wget with IPv4
wget -4 -O /dev/null http://proof.ovh.ca/files/1Gio.dat --2014-02-07 06:30:46-- http://proof.ovh.ca/files/1Gio.dat Resolving proof.ovh.ca (proof.ovh.ca)... 184.108.40.206 Connecting to proof.ovh.ca (proof.ovh.ca)|220.127.116.11|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1073741824 (1.0G) [application/x-ns-proxy-autoconfig] Saving to: `/dev/null' 100%[====================================>] 1,073,741,824 108M/s in 9.5s 2014-02-07 06:30:56 (108 MB/s) - `/dev/null' saved [1073741824/1073741824]
As you can see there with IPv4 file got downloaded with 108 Mbps speed but with IPv6 it was just 1.32 Mbps i.e. 100 times slower!