Site icon Bizety: Research & Consulting

Packet Processors: Linux, Snabb, PacketShader, and VPP

As various complex functions such as data compression and cryptography are increasingly performed on data packets, network traffic throughput can suffer. One means of increasing throughput and avoiding latency is through the use of open-source packet processors and various packet-processing acceleration techniques. In order to understand how these tools optimize this process, it’s important to first understand how packet processing works.

Each file transmitted through the Internet is broken into chunks, or packets, comprised of three parts. The header provides information about the packet, such as its origin, destination, and length; the payload comprises the data itself; and the trailer indicates the end of the packet and includes information about error detection and correction. Because packets take many different routes through the network and often arrive out of order, the information from the trailer is used to reassemble the file for user consumption when the packets arrive at their destination.

As packets of data move through various network elements, different algorithms are used to control the dataflow. Just as a network is divided into the control plane and data plane, packet processing algorithms are applied to either the control information, which is used to transfer the packet to its destination, or the payload, performing content-driven actions on the data content. However, various delays and bottlenecks can occur during packet processing due to various functions like switching between analog and digital when processing voice and video applications. These delays increase as data becomes increasingly complex and bandwidth hungry. In order to overcome these delays, a variety of architectural approaches and open-source packet processing software has been developed, several of which we’ve examined below:

Linux

Because Linux is designed as a generic system that caters to many different applications, many core cycles are needed for context switching, locks, and higher OS layers, which can lead to bad cache utilization and bottlenecking. As a result, packet processing acceleration must be done in order to optimize the networking stack in a scalable manner. Because data path processing requires far less code and is used far more often than control path processing, the best approach for packet processing is acceleration through either datapath or application-specific fastpath (ASF). The goal of fastpath is to take care of all routine operations, freeing up the normal path for special connections, core database, and control packets.

Snabb

Snabb is a packet networking toolkit that compiles into a standalone executable with multiple applications and runs on any Linux/x86-64 distribution. It is written using Lua, LuaJIT compiler, and Ethernet I/O using kernel bypass mode. In addition, Snabb is a community of programmers dedicated to building new networking elements. The first generation of applications created by the Snabb community include:

PacketShader

PacketShader is a PC-based software routing platform that uses Graphic Processing Units (GPUs) to accelerate packet processing. GPUs allow for fast graphics rendering and high-bandwidth parallel applications with large computation cycles. By offloading computation and memory-intensive routing applications, Packetshader avoids the CPU performance bottleneck typical of high-speed software routers.

To further enhance the utilization of GPUs on high-speed software routers in Linux, Packetshader also performs packet I/O optimizations such as pre-allocating packet buffers, batch processing, NUMA-aware data placement, and leveraging receive-side scaling (RSS) for linear scalability of multi-core CPUs.

VPP

Vector Packet Processing (VPP) is the open-source version of Cisco’s VPP technology. It is an out-of-the-box packet processing stack that is hardware, kernel, and deployment agnostic and runs on commodity CPUs. The modular, extensible, and flexible framework is built on a packet processing graph, meaning anyone can plug in new graph nodes, rearrange the graph, or build an independent plugin, allowing for the creation of any kind of packet processing application. Moreover, this can be done without changing the core code as the engine runs in userspace. The platform is feature-rich, providing out-of-the-box switch/router functionality, fast lookup tables for bridge entries and routes, and arbitrary n-tuple classifiers at a high level, as well as many other IPv4/IPv6, MPLS, and L2 features.

In contrast to scalar packet processors, which process one packet at a time, vector processing reads the largest available number of packets from the network I/O layer and processes the entire vector through the packet processing graph at once. This results in faster and more reliable performance, since throughput and latency are stabilized as l-cache misses amortize over a large number of packets.

Copyright secured by Digiprove © 2017
Exit mobile version