There’s a problem with IPv6 route lookup speed in Linux

There’s a problem with IPv6 route lookup speed in Linux

The challenge

The great thing about IPv6 is its larger IP address space, but this is also its weakness. That larger IP address needs routing, potentially creating larger routing tables.. This creates larger routing tables, which has an impact on memory and the time taken to search them.

Work done by Vincent Bernat shows that an route lookup takes 450ns for an IPv6 routing table containing 40,000 routes. This is longer that the time needed to forward a packet at 10Gb/s at wire-speed (50ns). Even with an empty table it takes 150ns to lookup where to send the packet.

This has a big impact when using as a in a 10Gb/s or higher environment. Because of the impact of larger routing tables, uses a different route storage and lookup ability than IPv4. This, however, hasn’t been stress tested as much or as often as the corresponding code in the environment.

What’s reviewed

He looks at the lookup implementation, the structures for storing the information and the code. He reviews the performance in three scenarios; that of a current Internet full view, a data centre with various /48 routes in differing densities, and as a leaf for an access model with /128 routes randomly spread through a /108 routing space.

He then tests these scenarios for route lookup performance, both in tree depth and lookup time. He measures performance in different kernel versions, and the performance inserting new routes into the table. Finally he looks at memory usage in the different scenarios.

Recommendations

There are a few recommendations, such as not using the CONFIG_IPV6_MULTIPLE_TABLES option in the kernel, and using a kernel later than version 4.2.

However, his main expectation is that as usage increases, optimizations will occur in the code to speed up route lookup, and allow IPv6 packet forwarding at wire-speed for 10Gb/s.

John Dixon

John Dixon is the Principal Consultant of thirteen-ten nanometre networks Ltd, based in Wiltshire, United Kingdom. He has a wide range of experience, (including, but not limited to) operating, designing and optimizing systems and networks for customers from global to domestic in scale. He has worked with many international brands to implement both data centres and wide-area networks across a range of industries. He is currently supporting a major SD-WAN vendor on the implementation of an environment supporting a major global fast-food chain.

Comments are closed.