With the exponential increase in network traffic and the demand for greater speed and performance, significant challenges arise for network developers and engineers. Two solutions that have gained prominence in this context are XDP (eXpress Data Path) and DPDK (Data Plane Development Kit).
Both offer innovative approaches to speeding up network packet processing, but each has distinct characteristics and may be better suited to certain scenarios. In this article, we’ll explore the differences between XDP and DPDK, analyzing their features, benefits and limitations. This makes it possible to understand how to meet the challenge of traffic speed and boost the performance of modern networks.
The evolution of networks
If you have to buy a smartphone, you’re sure to find plenty of models with 4G or 5G technology in the stores. You won’t find any models with previous technologies anymore because, although 2G and 3G are still in operation (in Internet of Things devices, for example), cell phone consumers want and need the high-speed services available with the new generations. These are streaming services, file transfers and thousands of other applications that require high speed. To give you an idea of how these speeds have evolved: a 2G generation cell phone, launched in 1993, would take 14 hours to download a standard 6GB movie. While a 5G generation cell phone, which began operating in 2018, downloads the same movie in a minute and a half.
These two extremes are separated not only by time but also by a huge evolution in network technology. The challenges for network service providers to cope with this progress have involved innovating, evolving and reinventing. And all this in a sequence of new solutions that had total (or almost total) compatibility with the technologies already in use. In this way, a 4G generation phone, for example, can use 3G networks. And one of these challenges, particularly in the case of 5G networks, was processing packets at speeds of 10 Gbps or more. Without it, we wouldn’t have the services we have today.
Speed evolves with improvements in hardware and software
Microelectronics manufacturers’ response to this challenge has been to develop ever faster processors and their peripherals (such as network interfaces). The response of the organizations that develop operating systems has been to create versions that make the most of the new features they bring. Network personnel were left with the challenge of combining all the innovations available in these two universes – hardware and software – to develop the solutions that have achieved today’s astonishing speed and volume of traffic.
Two of the most relevant solutions are XDP vs DPDK. To understand how this alphabet soup works, it’s easier to think of a processor as a shopping mall. A place where you’ll find all kinds of stores and services. You can also think of the operating system as if it were the mall’s management: it decides opening hours, who occupies the stores, for how long, who does the cleaning and so on.
In a simplified comparison, the challenge of processing packages extremely quickly would be like creating a delivery system from the mall to the neighborhoods in the area. And the quickest way to do that, we all know, is with a drive thru.
Shortcuts to save time within systems
This is exactly what computer and network specialists have achieved by creating the XDP (Express Data Path) platform. XDP is a high-performance data path and is being used in data centers to send and receive network packets at high speed rates. But at the same time, ignoring most of the operating system’s network resources in order to spend less time. By making exactly one direct path for the data (the express data path), operates like a drive thru. Imagine if the delivery man had to park his vehicle and then enter the mall to receive the package for the delivery operation. With the drive thru he doesn’t get out of the vehicle and can receive the package through the window, just by extending his arm.
This is the magic of XDP, which can be used to achieve high performance when processing data packets. This is mainly because it saves on the use of the operating system kernel – it doesn’t waste time entering the shopping mall. And to save even more time, this strategy places control of the network interface (NIC) in an eBPF-type program – a kind of virtual machine running in the kernel. This is essential to speed up the process when working at network speeds of 10 Gbps or more.
XDP vs DPDK: XDP is an excellent solution, but not the only one
Fortunately, XDP is not the only solution for packet processing in high-performance networks, although it is the state of the art in this area. Another equally important solution for this is the DPDK – or Data Plane Development Kit. In fact, the DPDK is a collection of libraries – understand a library as a special toolbox designed for a programming language (there are, for example, geometry libraries, statistics libraries and other functionalities). What they do is speed up the processing of packages on x86, POWER and ARM processors.
The DPDK was born at Intel in 2010, was made open source, hosted by the Linux Foundation and has since been improved by the community. XDP was born in 2016, created by an engineer from VMware and two from Facebook, and is currently supported by major computing companies. But between DPDK and XDP, which one is better?
XDP vs DPDK: Which one to choose?
There are many studies on the subject, but one of the most recent was carried out by five researchers from the Federal University of Pernambuco. They published an academic paper called “Lessons from an experimental evaluation of XDP and DPDK in a cloud computing environment”. So they came to the conclusion that one is not better than the other. Each will be better depending on a server’s “operating environment. To make an informed decision, one must consider important factors such as dominant package sizes and VMs competing for CPU, I/O load and network resources. To sum up, there is no single configuration that suits all servers well”. The paper recommends that administrators first identify the type of environment in which a server will operate, and then decide which of the approaches will offer the best results.
They are extremely useful for network service providers to protect their customers from DDoS attacks (distributed denial of service attacks). DDoS attacks are destructive attacks in which attackers overload Internet applications with excessive requests, to the point where the server can no longer respond. Before this happens, traffic inspection algorithms detect the attack and DPDK or XDP are used to process and divert the packets sent by the attacker’s requests at a faster speed than the attack.