5GC$^2$ache: Improving 5G UPF Performance via Cache Optimization

Haonan Jia,Meng Wang,Biyi Li,Yirui Liu,Junchen Guo,Pengyu Zhang
2024-04-22
Abstract:Last Level Cache (LLC) is a precious and critical resource that impacts the performance of applications running on top of CPUs. In this paper, we reveal the significant impact of LLC on the performance of the 5G user plane function (UPF) when running a cloudified 5G core on general-purposed servers. With extensive measurements showing that the throughput can degrade by over 50\% when the precious LLC resource of UPF is not properly allocated, we identify three categories of performance degradation caused by incorrect LLC usage: DMA leakage problem, hot/cold mbuf problem and cache contention. To address these problems, we introduce the design and implementation of 5GC$^2$ache that monitors the LLC status as well as the throughput performance and dynamically adjusts key parameters of the LLC resource allocation. Our experiments show that 5GC$^2$ache enables a commercial 5G core to increase its throughput to 76.41Gbps, 39.41\% higher than the original performance and 29.55\% higher than the state-of-the-art.
Networking and Internet Architecture
What problem does this paper attempt to address?
### Problems the Paper Attempts to Solve The paper aims to address the performance degradation issue caused by improper cache optimization in the 5G User Plane Function (UPF). Specifically, the authors reveal the significant impact of the Last Level Cache (LLC) on 5G UPF performance when running a cloudified 5G core network on general-purpose servers. Through extensive measurements, the authors found that when the valuable LLC resources of the UPF are improperly allocated, throughput can drop by more than 50%. The paper identifies three performance degradation issues caused by incorrect LLC usage: 1. **DMA Leakage Issue**: Direct Data Input/Output (DDIO) technology allows the 5G core network to read and write packets directly from the Network Interface Card (NIC) to the LLC. However, even if some packets are sent directly to the LLC, if the CPU fails to process these packets in time, they will eventually be moved back to Dynamic Random Access Memory (DRAM). When the CPU needs to process these packets, they must be reloaded from DRAM to the LLC, which is referred to as the DMA leakage issue in the LLC. 2. **Hot/Cold mbuf Issue**: The 5G core network uses Receive Buffers (RX buffers), composed of multiple mbufs, to store packets from/to the NIC. Due to the FIFO ring structure of the RX buffer, the tail is always hot because it is the most recently used. In contrast, the head may become cold because it has to wait a long time to be used, especially when the RX buffer size is large. When the head becomes cold, its mbuf will be evicted from the LLC to DRAM, leading to about a 10% throughput drop. 3. **LLC Cache Contention Issue**: Since the LLC is shared between DDIO and packet processing, the competition for LLC resources between these two entities is directly related to data flow characteristics (such as packet size). Empirical data shows that this cache contention can lead to a throughput drop of about 10% to 15%. To address these issues, the paper introduces the design and implementation of 5GC2ache. 5GC2ache optimizes cache usage by monitoring LLC status and throughput performance and dynamically adjusting key parameters of LLC resource allocation. Experimental results show that 5GC2ache increases the throughput of a commercial 5G core network to 76.41Gbps, which is a 39.41% improvement over the original performance and 29.55% higher than the existing state-of-the-art technology.