Release of the F-Stack network stack 1.24, running in user space

The network stack F-Stack 1.24 has been released. It is a version of the FreeBSD network stack that operates in user space and utilizes the DPDK framework to achieve maximum performance. The project was created by Tencent, the largest telecommunications company in China, and is used in its products and services. The code is written in C and is distributed under the BSD license. It supports operation on both Linux and FreeBSD.

F-Stack allows applications to leverage an independent local network stack that does not rely on the operating system's network stack, functioning in user space and interacting directly with network hardware. F-Stack is positioned as a solution to enhance the performance of network request handlers when the standard TCP/IP stack of the Linux kernel becomes a bottleneck and limits scalability—in some situations, the project enables a significant increase in the number of small network requests processed. Theoretically, F-Stack can achieve the ceiling of network performance possible for the utilized network card.

Performance enhancement is achieved by eliminating operations such as packet copying, stream scheduling, interrupt handling, and the use of system calls. The DPDK (Data Plane Development Kit) framework is used to interact with the network card, bypassing the operating system kernel interfaces, and develops a set of libraries for low-level work with network adapters. DPDK allows reducing overhead and fitting within a minimal number of CPU cycles when receiving or sending network packets.

The functionality of the TCP/IP stack corresponds to the FreeBSD 13 network stack and has been extracted from that operating system into an independent library. Standard POSIX API (socket, epoll, kqueue) or its own programming interface based on micro-threads, which simplifies the creation of network applications and avoids complex asynchronous request handling logic, can be used for application development.

The project supports translated versions for using F-Stack in a multiprotocol environment. server Nginx 1.25.2 and Redis DB 6.2.6 demonstrate performance exceeding that of standard builds running on the system network stack.

The most notable changes in the new release are:

  • The config.ini configuration file now offers the option to choose between using KNI (Kernel NIC Interface) and virtio_user as the transport for packet transmission between the kernel and the DPDK-based packet processing application. Added support for using ratelimit for KNI.
  • Support has been added for enabling the network stack setting 'net.add_addr_allfibs=1' to add addresses to all routing tables.
  • An API ff_get_traffic has been added to obtain traffic, for example, to implement QoS (Quality of Service).
  • Functions pthread_create and pthread_join have been added, similar to the corresponding functions from POSIX.
  • The API ff_dpdk_raw_packet_send has been added for applications to send raw packets directly through DPDK instead of through a socket.
  • Support for automatic VLAN configuration, routing, and policy routing has been implemented.
  • Migrated to DPDK version 22.11.6 LTS.
  • Support for the stream module has been added in the implementation of Nginx over F-Stack.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster