Is my Realtek ethernet really that bad?

This resource was originally created by user: jgreco on the TrueNAS Community Forums Archive. Please DM this account or comment in this thread to claim it.

One of the longest running issues faced here in the forums may be people who come to these forums, wanting to recycle an old PC into a NAS. In general, this is a bad idea because typical PC hardware isn’t optimized towards the task. However, the issue that most commonly bites people is that a NAS is a network oriented device, and having a low end ethernet chipset such as a Realtek or Atheros is likely to lead to inconsistent performance and unpleasant experiences.

As a result, we usually end up recommending that users replace these with an Intel ethernet card such as the Intel Desktop CT, usually available for about $35. Make sure you get a legitimate Intel card, as there are fakes out there. The Intel will perform much better than your Realtek.

Don’t believe me? Listen to what a major motherboard manufacturer has to say about their Intel ethernet:

Intel Gigabit LAN
Experience the fast network connectivity!

The LAN solution from Intel has been long known to have a better throughput, lower CPU utilization as well as better stability. With the Intel Gigabit LAN solutions onboard, the ultimate network experience can therefore be delivered to its users like never before.

– Section 1.3.4 on page 1-8.

Now, ASUS doesn’t come out and name names, but the ethernets on their non-Intel boards are usually Realtek. So what do you think this says?

The point of server grade ethernet chipsets is that they’re optimized for coping with a high number of simultaneous streams, including TCP offload, interrupt coalescing, virtual function support, multiple queues, and doing this with relatively low latency. Intel’s desktop ethernet chipsets are nearly as good at small server tasks as their (much pricier) server grade chipsets.

The average PC doesn’t need most of that, so many people are under the mistaken impression that because their PC was browsing the web just fine, the low end ethernet chipset used on it must be fine for NAS usage too. However, web browsing tends to be a small handful of simultaneous streams, a task which does not necessarily require assistance in the form of dedicated silicon for TCP offload or most of those other “server” features.

“Gamer optimized” ethernets aren’t that great either. Competitive gaming tends to be oriented towards a low latency single stream of packets, which is relatively easy to deal with. You do not need really need hardware assistance for this, which is why the Realteks have been “very solid” in that environment.

Both of these are substantially easier workloads for the ethernet chipset than many server workloads, where server chipsets can be asked to support hundreds or thousands of parallel streams at once.

It used to be that web browsing only consisted of two or three simultaneous TCP streams, but over time we have seen this grow to a somewhat larger number. It’s still not hundreds or thousands, though. As the speed of Internet connections increases, and the complexity of things that we run in the background on a PC increases, the limits of the Realtek ethernet chipsets get closer and closer. At some point, you’re going to feel that today’s Realtek ethernet chipset is not performing well, just as you would probably feel that yesteryear’s 10/100 Realteks really sucked if you tried to use them today, even if you only needed less than 100Mbps.

Speaking of 100Mbps, years ago, one of the FreeBSD driver gurus, Bill Paul, wrote the following commentary while writing a driver for the Realtek 100Mbps cards. So this is not directly relevant to modern cards, but why would it have gotten much better?

From the rl driver source, spotted by @Ericloewe one fine day years ago.


/* * RealTek 8129/8139 PCI NIC driver * * Supports several extremely cheap PCI 10/100 adapters based on * the RealTek chipset. Datasheets can be obtained from * * * Written by Bill Paul * Electrical Engineering Department * Columbia University, New York City / / * The RealTek 8139 PCI NIC redefines the meaning of ‘low end.’ This is * probably the worst PCI ethernet controller ever made, with the possible * exception of the FEAST chip made by SMC. The 8139 supports bus-master * DMA, but it has a terrible interface that nullifies any performance * gains that bus-master DMA usually offers. * * For transmission, the chip offers a series of four TX descriptor * registers. Each transmit frame must be in a contiguous buffer, aligned * on a longword (32-bit) boundary. This means we almost always have to * do mbuf copies in order to transmit a frame, except in the unlikely * case where a) the packet fits into a single mbuf, and b) the packet * is 32-bit aligned within the mbuf’s data area. The presence of only * four descriptor registers means that we can never have more than four * packets queued for transmission at any one time. * * Reception is not much better. The driver has to allocate a single large * buffer area (up to 64K in size) into which the chip will DMA received * frames. Because we don’t know where within this region received packets * will begin or end, we have no choice but to copy data from the buffer * area into mbufs in order to pass the packets up to the higher protocol * levels. * * It’s impossible given this rotten design to really achieve decent * performance at 100Mbps, unless you happen to have a 400Mhz PII or * some equally overmuscled CPU to drive it. * * On the bright side, the 8139 does have a built-in PHY, although * rather than using an MDIO serial interface like most other NICs, the * PHY registers are directly accessible through the 8139’s register * space. The 8139 supports autonegotiation, as well as a 64-bit multicast * filter. * * The 8129 chip is an older version of the 8139 that uses an external PHY * chip. The 8129 has a serial MDIO interface for accessing the MII where * the 8139 lets you directly access the on-board PHY registers. We need * to select which interface to use depending on the chip type. */

So when someone in the forums is trying to explain to you that your Realtek may be the source of your performance issues, please try to understand that all ethernet chipsets are not made equal.