IPv4 vs IPv6 Performance Comparison

Difference between IPv4 and IPv6

IPv6 usage has been growing very slowly through the last 10 to 15 years. Since mid-2015 it started to pick up and increase adoption at a rapid pace. Google, for example, has been tracking their IPv6 usage since 2009 and it is beautiful to finally see some growth.

IPv6 adoption rate chart
IPv6 adoption statistics from Google

As the number of available IPv4 addresses continues to go down, we expect to see more of IPv6 very soon. However, one of the main concerns I hear from people is about website speed and performance using IPv6 compared to IPv4. A few people say it is faster, since it is “less used” and has simplified routing. Other people say it is slower with fewer routers and hops supporting it.

We decided to try it out and test how IPv6 compares to IPv4 in a real world scenario.

IPv4 vs. IPv6 Test Methodology

We decided to test the difference between IPv4 and IPv6 by trying to emulate what most people do: search the web.

We visited the top sites in the world that support both IPv4 and IPv6 from multiple geographic locations and identified which one performs better. We used the curl utility and compared the connect_time and total_time values, as they more meaningfully match what users would expect.

We tested the following sites:

  • google.com
  • facebook.com
  • youtube.com
  • wikipedia.org
  • netflix.com
  • linkedin.com
  • pandora.com

We also tested the two CDN providers that support IPv6 and give it to all of their customers for free:

  • cloudflare.com
  • sucuri.net

Test 1: IPv4 x IPv6 from San Jose, California, USA

For the first test, we used a cloud provider in San Jose that supports both IPv4 and IPv6 on their servers. These are the final averages (after running the test 10 times):

chart_ipv4-vs-ipv6_san-joseThis test is basically a tie across IPv4 and IPv6 for all major sites except for Facebook, which was 3 times longer in both connect and total times over IPv6. This can be duplicated with pings using both IPv4 and IPv6, which matches what we saw via the web tests:

$ ping facebook.com
 PING facebook.com (69.171.230.68) 56(84) bytes of data.
 64 bytes from edge-star-mini-shv-17-prn1.facebook.com: 
   icmp_seq=1 ttl=83 time=23.2 ms
 64 bytes from edge-star-mini-shv-17-prn1.facebook.com: 
   icmp_seq=3 ttl=83 time=23.4 ms

$ ping6 facebook.com
 PING facebook.com(edge-star-mini6-shv-12-frc3.facebook.com) 56 data bytes
 64 bytes from edge-star-mini6-shv-12-frc3.facebook.com: 
   icmp_seq=1 ttl=48 time=63.9 ms
 64 bytes from edge-star-mini6-shv-12-frc3.facebook.com: 
   icmp_seq=3 ttl=48 time=64.1 ms

That’s 64ms ping with IPv6 versus a 23ms ping with IPv4. That’s a win for IPv4 because of Facebook.

Test 2: IPv4 x IPv6 from New York, USA

We did our second test from New York using a different cloud provider that also supports both IPv4 and IPv6 natively by default.

chart_ipv4-vs-ipv6_new-yorkThe results were surprisingly similar with very little difference between IPv4 and IPv6. When you look at the data above, the difference is mostly due to a margin of error within a few milliseconds. The only result that stood out was a slightly better performance with IPv6 going to Facebook and with IPv4 going to Netflix. We consider it a tie from New York, with pretty much no difference.

Test 3: IPv4 x IPv6 from London, UK

Our third test used another provider in London, UK that provides both IPv4 and IPv6 support. After our collection of tests, IPv4 and IPv6 performed almost the same as you can see here:

chart_ipv4-vs-ipv6_en_london

Another tie.

Test 4: IPv4 x IPv6 from Tokyo, Japan

For our final test, we chose Tokyo, Japan to represent Asia in our assessment. The overall connection numbers were a bit worse than non-anycast sites, but they still indicated similar performance between IPv4 and IPv6. Netflix performed a little bit better with IPv4 while Facebook did a little bit better with IPv6.

chart_ipv4-vs-ipv6_tokyoAnother tie at the end.

Comparing IPv4 and IPv6

We ran these tests without knowing what to expect, but were happy with the results and can confidently say that IPv4 and IPv6 performance are pretty much equal. This does not mean that IPv6 doesn’t have its own issues, but at least in terms of networking performance, you can safely migrate with no performance detriments.

If you want to enable IPv6 on your site and do not have one set up yet by your host, you can use our Sucuri Firewall and CDN to proxy IPv6 requests back to your IPv4 host with no performance loss.

6 comments
  1. very nice ….. really it is an important post for comparison IPv4 vs IPv6.

    Thanks DANIEL CID!

  2. I’d be curious to see this test run on a batch of sites that aren’t on CDN or similar global networks…all of the sites you tested have local servers near the test server (which has to be why the response times are all so fast…).

    For example, how about testing a WordPress site that’s on a VPS server in Los Angeles (with no CDN), from a test server in New York?

  3. IP6 gives you more IP addresses in a network not really useful for households with less then 255 devices.

Comments are closed.

You May Also Like