The 10G Ethernet performance problem on Linux

November 17, 2013

It's clear that 10G Ethernet on Linux is not yet in the state that 1G Ethernet is, where you can simply assume that you'll get wire speed unless your hardware is terrible (but sometimes your hardware is terrible, or at least not great). Instead you need to tune things for best performance, and do so beyond the basics of MTU 9000 and large application buffers. There are even any number of resources on the web to tell you things about this; for example, I've recently been reading this one [PDF].

(There's also this one from 2008 [PDF slides] that I've seen referred to in a number of places.)

The problem here is simple: that paper is from 2009. Things have changed since 2009; in fact, I've seen things change between kernel 3.11.6 and kernel 3.12 (and they changed significantly between Ubuntu 12.04's 3.2.0 kernel and 3.11.6). Much of the other 10G tuning advice on the web I've found is like this, either clearly old or undated but probably old. Since they're old, some but not all of their performance tuning advice is likely out of date and either not necessary, not applicable any more, or actively counterproductive. Given the changes I've seen just between 3.11.6 and 3.12, this is probably going to continue to be the case for a while more; even carefully researched tuning advice written today may not apply in a year.

(At least not to current kernels. If you research tuning advice for, say, a RHEL/CentOS 6 kernel it's likely to stay useful for years because RHEL kernels don't change much.)

This is the 10G Ethernet performance problem on Linux as I see it. Today and for the likely future, getting good performance out of 10G Ethernet on Linux is going to take you real work. It's not enough to read some resources and follow their advice because parts of the advice may be out of date; you're going to have to experiment, ideally under real life scenarios not just artificial bandwidth or latency tests.

(Artificial tests can at best verify that under ideal circumstances you can hit wire bandwidth or wire latency. But the tuning you need for them may be different than the tuning you need for your live production load.)


Comments on this page:

By Mark T. Kennedy at 2013-11-18 12:09:12:

how large is the penetration of 10G in academia? wall street is flush with it.

By cks at 2013-11-18 13:30:48:

I don't know how much penetration 10G has in general, but we're just starting to use it here. Places with more money than us have probably been doing it for a while.

By Ben Hutchings at 2013-11-24 18:15:48:

You shouldn't need significant tuning to get a single TCP stream at line rate on current servers, not even raising the MTU (thanks to TSO and GRO). But with real applications running on multiple cores with lots of streams you might need to pay some attention to task and interrupt affinity. And if you're concerned about latency, rather more tuning is needed.

Written on 17 November 2013.
« Sending and receiving file descriptors in Python
Why booting Linux from a ZFS root filesystem with GRUB can be hard »

Page tools: View Source, View Normal, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sun Nov 17 20:44:50 2013
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.