Skip to Content
Smart CitiesSmart Cities
  • Article
  • Open Access

25 May 2026

33 Pages

Closed-Loop CPU-Aware Traffic Control for SDN-Enabled 5G/6G Networks in Open vSwitch Dataplanes

,
,
and
1
Faculty of Informatics and Computing, Singidunum University, 11000 Belgrade, Serbia
2
The School of Computing, Union University, 11000 Belgrade, Serbia
3
The Faculty of Organizational Sciences, University of Belgrade, 11000 Belgrade, Serbia
*
Author to whom correspondence should be addressed.

Highlights

What are the main findings?
  • The proposed closed-loop system maintains CPU usage strictly below configured targets (e.g., 1.02% vs. 3% target) through real-time XDP-based rate limiting at the NIC ingress, preventing data-plane overload.
  • Predictable per-slice CPU isolation is achieved only within the Safe zone, while saturated conditions require hardware offloading such as SmartNICs to ensure strict isolation.
What are the implications of the main findings?
  • Network operators can deploy the framework on commodity hardware to provide predictable CPU isolation between 5G/6G network slices, ensuring that traffic surges in one slice do not degrade performance in others.
  • The results underscore the need for hardware-assisted traffic shaping (e.g., SmartNICs) to eliminate residual cross-slice interference and achieve full isolation at line rate.

Abstract

This paper presents a closed-loop, CPU-aware traffic-control framework for SDN in 5G/6G multi-tenant edge environments based on commodity KVM/OVS infrastructures. It couples fine-grained data-plane telemetry via eBPF with adaptive XDP rate limiting, coordinated by a PID controller in the OVS datapath. Unlike control-plane polling, it provides real-time feedback between CPU utilization and traffic regulation. Experiments in a virtualized multi-tenant OVS testbed (KVM/virtio-net) keep CPU below per-slice CPU targets (e.g., 1.02% for a 3% setpoint), with an under-target bias that avoids overshoot while preserving stable forwarding. We attribute this bias, at light load, to a supply-limited regime, conservative per-slice CPU accounting, and stability-oriented PID tuning, and introduce a low-latency profile that mitigates this bias for latency-sensitive slices. The XDP datapath achieves 1–3 μ s per-packet processing with 5–10% additional CPU overhead relative to an uninstrumented baseline, while using less CPU than OVS policing at comparable throughput. A 3% per-slice CPU target balances isolation and throughput, while 2% yields stricter isolation at the cost of higher packet loss. Software-based rate limiting can induce cross-slice interference; effective isolation holds below 1 Gbps aggregate load. Above this, shared Linux kernel overhead degrades isolation, causing significant loss; thus, XDP alone cannot ensure line-rate isolation, motivating SmartNICs. The design improves efficiency, predictability, and isolation, laying a foundation for intelligent traffic management in future resource-intensive applications.

1. Introduction

Software-Defined Networking (SDN) separates the control of the network from the process of forwarding data. This separation allows for centralized programming and flexible management of the network. It leverages protocols such as OpenFlow to facilitate these changes [1]. This paradigm has become fundamental for dynamic infrastructures in cloud, edge, and emerging 5G/6G environments [2,3], where networks must continuously adapt to rapidly changing traffic demands and service requirements [4,5].
A representative example arises in edge–cloud environments supporting 5G/6G network slicing. In such systems, multiple slices share the same OVS-based dataplane on commodity hardware. When one slice experiences a sudden traffic surge, CPU resources may saturate, leading to increased latency and degraded throughput for other slices. This highlights CPU as a critical bottleneck and motivates the need for real-time, resource-aware traffic control mechanisms.
As SDN deployments grow in scale and complexity, ensuring stable forwarding performance in software-based dataplanes remains challenging. In many systems, packet forwarding is handled by OVS running on commodity servers. The processing capacity of such dataplanes depends heavily on CPU availability. Under high load, packet processing latency rises, and throughput may degrade, leading to unstable performance. Prior studies have shown that OVS performance is strongly affected by CPU contention. This makes it crucial to manage traffic based on resources in 5G and 6G environments, especially those that require strict guarantees for low latency and reliability. These environments often support multiple users and network slices. Most research on SDN optimization has focused on the control plane, improving scalability, reliability, and controller placement through distributed and hierarchical designs [6,7,8,9]. Although these methods enhance global network visibility, they rely on summary data and offer limited insight into runtime dataplane dynamics. Recent studies on software switches and programmable dataplanes (e.g., P4, eBPF) confirm that CPU usage is a dominant factor affecting packet forwarding stability [10]; however, many traffic management systems continue to overemphasize control-plane metrics and rely on coarse-grained measurements. Existing monitoring solutions, such as PayLess [11], provide low-cost controller-based data collection but rely on periodic polling, which prevents high-frequency visibility into dataplane states and fails to capture the system’s fine-grained dynamics.
The Extended Berkeley Packet Filter (eBPF) enables safe kernel instrumentation to monitor per-packet processing costs, while the eXpress Data Path (XDP) offers efficient rate control and early packet handling at the network ingress. This paper proposes a closed-loop, CPU-aware traffic control framework for SDN networks using OVS dataplanes that integrates high-frequency dataplane telemetry with an adaptive feedback loop to dynamically regulate traffic flows based on measured CPU utilization. The system uses a PID controller to map target CPU usage levels to real-time rate limits, preventing datapath overload and maintaining stable forwarding performance while improving efficiency, predictability, and fairness across traffic flows in virtualized switching environments.
The main contributions of this paper are as follows:
C1.
Fine-grained CPU utilization tracking using eBPF probes integrated into OVS datapaths.
C2.
High-performance rate limiting via XDP for early-stage traffic regulation.
C3.
Closed-loop control algorithm that maps CPU utilization to adaptive throughput limits.
C4.
Empirical characterization of CPU–throughput relationships and stability thresholds in virtualized OVS environments.
C5.
Demonstrated improvements for software-based switching in virtualized OVS dataplanes representative of commodity 5G/6G edge deployments.
The rest of the paper is organized as follows: Section 2 reviews related work; Section 3 describes the proposed system design; Section 4 details the implementation; Section 5 presents the test environment; Section 6 provides experimental results and evaluation; and Section 7 concludes the paper.

3. Proposed System Architecture

This section presents the theoretical foundations of the proposed CPU-aware traffic control framework. The architecture integrates SDN principles with closed-loop control theory to achieve real-time resource management in software-based dataplanes.

3.1. System Model Overview

The proposed architecture follows a layered SDN model enhanced with CPU-aware feedback control. Figure 1 illustrates the complete system model, showing the interaction between architectural layers and functional components.
Figure 1. Proposed system architecture showing SDN layers and component interactions. The Central Slice Resource Manager (CSRM) communicates directly with the Data Plane Agent. The Data Plane Agent collects CPU telemetry from OVS instances and enforces rate limits at the NIC level.
The architecture comprises the following key components:
  • Data Plane Agent (Per-VM agent): eBPF-based CPU monitoring, XDP rate limiting, gRPC (Google Remote Procedure Call) metrics to CSRM, and CPU-target updates; runs a local PID loop for low-latency closed-loop control.
  • OVS instances (multiple OVS bridges per host): Each represents a slice and operates independently, yet all share CPU resources, creating contention the system must manage.
  • SDN Controllers A and B manage flows/policies; CSRM is orthogonal, focusing only on CPU-aware rate limiting.
  • Services (end-user applications and network services) are connected to each OVS instance, generating and consuming traffic that flows through the managed dataplane.

3.2. Architectural Layer Justification

The placement of components across architectural layers follows fundamental principles of SDN design and control theory. This subsection provides theoretical justification for each design decision.

3.2.1. Data Plane Layer

By operating in the data plane, OVS performs the core packet forwarding function as the most latency-sensitive operation in the network stack. It implements a two-tier forwarding architecture composed of fast path (Kernel Datapath) and slow path (Userspace). On the fast path, the OVS kernel module (openvswitch.ko) keeps a flow cache that processes most packets without involving userspace. When packets match stored flows, they are processed directly in the kernel datapath. This results in microsecond-scale latency. On the slow path, packets missing the kernel cache go to the ovs-vswitchd daemon for flow table lookup and rule installation. This path offers a specific approach that enhances complex flow-matching capabilities, despite a slight increase in latency. The CPU usage of OVS mainly comes from the fast path, which is the main focus for managing resources. By using eBPF to track kernel functions, the system measures CPU time in the specific areas where resource conflicts occur.

3.2.2. Control Logic Placement

The architecture splits control logic into two tiers. A local Data Plane Agent runs a PID controller on the same host as its OVS instances to minimize latency and support a 500 ms control loop without network delays. This proximity enables rapid reactions to host-level conditions.
A centralized CSRM handles policies requiring global visibility (e.g., fair CPU allocation across hosts and priority-based slice management). By gathering information from different hosts, it connects local actions to the overall goals of the system. This design has a clear structure. By employing fast local loops for stability and slower global loops for optimization this approach helps ensure that the system is both responsive and consistent.

3.3. Component Interaction Model

Understanding the causal relationships between system components is essential for analyzing system behavior. The proposed model follows a hierarchical communication model with three complementary patterns. In the vertical control and data path, the CSRM communicates with Data Plane Agents. It sends CPU commands downwards and receives telemetry data upwards. This communication occurs asynchronously, enabling continued operation despite network delays. Each Data Plane Agent interfaces with its local OVS instances using eBPF maps and kernel interfaces. This tight coupling enables microsecond-scale interactions. Traditional SDN controllers manage flow rules with OVS, and the CSRM maintains this process without interfering, ensuring compatibility with current SDN systems.

3.4. Temporal Action Flow

Figure 2 traces the end-to-end timing of the control loop. A packet from the traffic source first reaches the NIC Filter, which immediately enforces the rate-limiting policy by passing admissible traffic and dropping excess. Packets that are accepted proceed to the Forwarding Engine for processing. During this time, the Forwarding Engine continuously sends metrics to the local Data Plane Agent. On a slower cadence, the agent aggregates and exports telemetry to CSRM, which evaluates policy and global state to compute updated CPU targets. The updated targets are immediately transmitted to the agent (shown by a dotted line). Thus, control-system latency does not affect packet processing. The agent sets a traffic speed limit and configures the NIC filter accordingly. It creates a feedback loop that adjusts traffic based on current conditions. This separation of fast data and slower control paths ensures high-throughput packet processing and timely adaptation.
Figure 2. Temporal action flow diagram showing the sequence of operations from packet arrival to rate adjustment. Steps 1–3 occur per-packet; steps 4–6 occur per control interval.

3.5. Closed-Loop Control Model

The proposed framework implements a closed-loop feedback system that continuously adjusts traffic rates based on measured CPU utilization. Figure 3 illustrates the control loop structure, which maps directly to the temporal action flow presented in Figure 2.
Figure 3. Closed-loop control diagram. The PID controller computes rate adjustments based on the error between target and measured CPU utilization. The Rate Limiter enforces the computed limit, and the CPU Sensor measures the resulting resource consumption.
The control loop comprises three tightly coupled components that regulate ingress bandwidth to a target CPU budget. A CPU sensor continuously measures the CPU time spent on packet processing and reports the resulting utilization ( C P U m e a s u r e d ). The PID controller compares this measurement to the setpoint ( C P U t a r g e t ) to compute the error e ( t ) and produces a control signal u ( t ) that adjusts the input rate. The rate limiter enforces the resulting bound ( R l i m i t ) at the network ingress, ensuring that the forwarding engine admits traffic only at that rate. The sensor then observes the effect and feeds the updated utilization back to the controller, closing the loop and ensuring stable adherence to the CPU budget under varying workloads.
The following subsections detail the theoretical models for each component: CPU measurement, rate limiting, and PID control.

3.6. Per-Slice CPU Measurement Challenge

A fundamental challenge in multi-tenant software switching environments is accurately attributing CPU consumption to individual network slices. In virtualized network environments, multiple isolated network slices (implemented as separate namespaces or virtual bridges) share a single operating system kernel. While each slice appears isolated at the network level, all packet processing occurs through common kernel code paths. The forwarding engine (e.g., a kernel datapath module) is loaded once and serves all slices simultaneously, all slices compete for the same physical CPU cores, and the kernel does not inherently track which slice caused a particular CPU expenditure.
The key insight enabling per-slice CPU measurement is that each packet carries identifying information that can be used to attribute processing time to its originating slice. Attribution can rely on the destination IP address (each slice uses a distinct IP subnet), the ingress interface identifier (packets arrive on slice-specific virtual interfaces), or flow metadata (forwarding rules tag packets with slice identifiers). By instrumenting kernel functions at the point where packet metadata is accessible, the proposed model can record CPU time and associate it with the correct slice.

Measurement Model

To attribute CPU consumption to individual slices, the proposed model must measure the time spent in kernel functions that process packets. The measurement targets four key functions in the Linux networking stack: the OVS datapath entry point (ovs_dp_process_packet), virtual Ethernet transmission (veth_xmit), network interface reception (netif_receive_skb), and device transmit queuing (__dev_queue_xmit). Each function receives a socket buffer (sk_buff) containing packet metadata, including the network interface index (ifindex) that identifies the originating slice. Using eBPF kprobes, the proposed model attaches measurement probes at function entry and exit points, recording timestamps and extracting slice identifiers from packet metadata without modifying kernel source code.
For each instrumented function f, we capture entry and exit timestamps:
T f = t e x i t − t e n t r y
where T f is the CPU time consumed by function f in nanoseconds. The eBPF program accumulates time across all packet invocations; the total per-slice CPU time over a measurement interval is the sum across all four instrumented functions:
C P U s l i c e = ∑ f ∈ F T f = T o v s + T v e t h + T n e t i f + T x m i t
The CPU utilization percentage is then:
C P U % = C P U s l i c e Δ t × N c o r e s × 100
Normalization and setpoint convention. Unless otherwise stated, C P U % is normalized to the total host processing capacity across N c o r e s as in (3); that is, 100% corresponds to all cores fully utilized. On the 2-core testbed used in this work, a single fully saturated core appears as 50% total CPU. All per-slice targets (e.g., 2%, 3%, 5%) and reported OVS per-slice utilizations are expressed on this total-host basis rather than per-core.
This approach enables fine-grained, per-slice CPU accounting despite the shared kernel infrastructure, providing the foundation for slice-aware resource management.

3.7. Rate Limiting Model

The proposed model employs a token bucket algorithm for rate limiting, a classical traffic shaping mechanism that provides both rate control and burst tolerance. The bucket state is maintained per slice:
t o k e n s ( t ) = min B m a x , t o k e n s ( t − Δ t ) + R l i m i t × Δ t
where:
  • B m a x is the maximum bucket size (burst capacity);
  • R l i m i t is the configured rate limit (bytes/second);
  • Δ t is the time since last packet.
A packet of size S bytes is forwarded if t o k e n s ≥ S ; otherwise, it is dropped:
a c t i o n = P A S S if t o k e n s ≥ S D R O P otherwise
The token bucket provides two key properties: (1) long-term average rate is bounded by R l i m i t , and (2) short-term bursts up to B m a x bytes are permitted, accommodating bursty traffic patterns common in network applications.
The rate limiter operates at the network ingress point, before packets enter the forwarding engine. This placement ensures that dropped packets consume minimal CPU resources, as they are discarded before incurring the cost of forwarding table lookups and packet transformations.

3.8. PID Controller Design

The proposed model employs a discrete PID (Proportional-Integral-Derivative) controller to regulate CPU utilization by adjusting traffic rate limits.

3.8.1. Control Law

The control output at time step n is:
u ( n ) = K p · e ( n ) + K i · ∑ j = 0 n e ( j ) · Δ t + K d · e ( n ) − e ( n − 1 ) Δ t
Each component within a control system possesses a distinct function. The proportional ( K p ) term provides an immediate response that is directly related to the current error; thus, larger errors yield proportionately larger corrections. The integral ( K i ) term aggregates past errors to eliminate any steady-state offset, thereby ensuring that the system ultimately attains the desired target, even in the presence of persistent disturbances. The derivative ( K d ) term forecasts potential future errors based on the rate of change, which aids in mitigating oscillations and enhancing the overall stability of the system.

3.8.2. Rate Limit Update

The bandwidth limit is updated incrementally:
R l i m i t ( n ) = R l i m i t ( n − 1 ) + u ( n )
This incremental update ensures smooth transitions and prevents abrupt rate changes that could cause traffic bursts or packet loss spikes.

3.8.3. Dead Zone Implementation

To prevent oscillations caused by measurement noise and minor fluctuations, the controller implements a dead zone:
e e f f e c t i v e ( n ) = 0 if | e ( n ) | < ϵ e ( n ) otherwise
where ϵ is the dead zone threshold (set to 0.5% in our implementation). This prevents unnecessary rate adjustments when CPU utilization is within acceptable bounds, improving system stability and reducing control overhead.

3.8.4. Sampling Interval Selection and Sub-Second Burst Handling

The 500 ms control period is a deliberate design choice balancing measurement reliability, control stability, and system overhead. The eBPF CPU sensor accumulates kernel-function execution times and reports one measurement per 100 ms interval; using five consecutive sensor readings per PID cycle reduces the coefficient of variation of the CPU estimate to below 5%, yielding a stable error signal. Reducing the interval to 100 ms (single-sample operation) amplifies measurement noise, which—given the existing proportional gain K p = 5.0 —would drive the controller into limit-cycle oscillations without re-tuning all three gains. Conversely, intervals above one second introduce sluggish response to genuine load ramps and allow CPU usage to drift significantly above the setpoint before correction begins.
A two-layer defense mechanism handles the mismatch between the 500 ms PID cycle and sub-second traffic dynamics. At the sub-millisecond level, the XDP token bucket absorbs burst packets before they reach the OVS datapath: tokens accumulated during quiescent periods permit short-duration bursts up to B m a x , and excess packets are dropped at the NIC without incurring forwarding CPU cost. The PID layer then corrects the resulting sustained rate trend on the 500 ms timescale. This separation of concerns means that transient CPU spikes caused by individual bursts are absorbed elastically by the token bucket, while the PID eliminates the long-term mean deviation.
We acknowledge that in high-density 5G/6G environments, where traffic variability can occur on scales of tens of milliseconds, a shorter control interval may be warranted. Reducing the period to 100–200 ms while maintaining stability would require lower proportional gain or an adaptive gain-scheduling strategy, and quantifying the optimal interval under realistic 5G traffic profiles is reserved for future work.

3.8.5. Light-Load Bias and Safety Margin

At low offered rates, the PID controller may operate in a supply-limited regime, where the admissible rate exceeds the incoming traffic, preventing utilization from reaching the target setpoint. Moreover, the per-slice CPU measurement reflects time spent in instrumented OVS/kernel functions, while fixed per-packet overheads outside the measurement scope (e.g., softirq and socket processing) dominate at low traffic rates, resulting in a conservative utilization estimate. To ensure stability, the controller configuration employs a low integral gain, a dead zone of approximately one half percent, coarse update intervals of 500 ms, and an additional safety margin in the mapping from CPU utilization to the admissible rate. These design choices mitigate oscillations and overshoot but introduce a systematic under-target bias under light-load conditions

4. Implementation

This section describes the implementation of the proposed CPU-aware traffic control framework, mapping the theoretical architecture presented in Section 3 to corresponding software components and technologies. The complete source code for the CSRM framework is publicly available [35].

4.1. Implementation Overview

The system employs Linux network namespaces to create isolated virtual network segments (slices). Each slice contains an independent OVS instance, providing complete datapath isolation. The architecture consists of three namespace types:
  • Host namespace—Contains the physical uplink interface (ens19), the Linux bridge (br-phy), and the host-side veth endpoints. The gRPC server and control components execute in this namespace.
  • OVS namespaces (ovs-1, ovs-2)—Each contains an independent OVS instance with its own datapath (br0), flow tables, and forwarding logic. The OVS processes (ovs-vswitchd, ovsdb-server) run within their respective namespaces.
  • Test namespaces (test-1, test-2)—Contain the endpoint applications (e.g., iperf3 servers) that generate or receive traffic. These namespaces simulate tenant workloads.
The virtual network topology implements a hierarchical bridging architecture as shown in Figure 4. The physical uplink (ens19) is connected to a Linux bridge (br-phy) in the host namespace. Each OVS instance in the OVS namespaces is connected to br-phy via a dedicated veth pair, ensuring that all traffic to/from the OVS instances passes through the host-level bridge and uplink.
Figure 4. Implementation topology showing the OVS host with two network slices (ovs-1, ovs-2), namespace-based isolation, and external traffic generators.

4.2. Software Module Mapping

The implementation is distributed across two hosts: the Data Plane Host running OVS and the Control Host running CSRM. Table 1 lists the modules deployed on the Data Plane Host, while Table 2 lists the modules on the Control Host.
Table 1. Data Plane Host modules (OVS Host).
Table 2. Control Host modules (CSRM).
Figure 5 shows how these modules implement the closed-loop control model from Figure 3, with technology-specific components.
Figure 5. Software module interaction diagram showing data flow between implementation components on the Data Plane Host. Solid arrows: data (packet) flow; dashed arrows: control; dotted arrows: monitoring. Packets arrive at the NIC, are filtered by the XDP Rate Limiter, and forwarded to the OVS Dataplane. The eBPF CPU Sensor measures OVS processing time via kprobes and reports CPU metrics through the gRPC Server to the PID Controller, which adjusts the rate limit accordingly.
The control flow operates as follows: (1) the gRPC Server receives CPU metrics from the eBPF sensor and exposes them to the CSRM; (2) the PID Controller computes rate limit adjustments based on the error between target and measured CPU; (3) the XDP Rate Limiter enforces the computed limits by filtering packets at the NIC driver level; (4) the eBPF CPU Sensor instruments OVS kernel functions via kprobes and reports CPU time back to the gRPC server. The OVS Dataplane processes packets that pass the XDP filter, with its CPU consumption measured by the eBPF probes.

4.3. eBPF-Based CPU Measurement

Extended Berkeley Packet Filter (eBPF) is a Linux kernel technology that allows running sandboxed programs in kernel space without modifying kernel source code or loading kernel modules. We use eBPF kprobes to implement the per-slice CPU measurement described in Section 3.6. Four kernel functions, described in Table 3, are instrumented to capture the complete packet processing path:
Table 3. eBPF kprobe instrumentation points.
The total CPU time for a packet is the sum of all processing stages, as described in Section 3.6:
T t o t a l = T o v s + T v e t h + T n e t i f + T x m i t
The CPU time measurement employs a kprobe/kretprobe pair for each instrumented function is presented in Algorithm 1.
Algorithm 1 eBPF CPU Measurement
procedure OnFunctionEntry(skb)
p i d _ t g i d ←  GetCurrentPidTgid()
i f i n d e x ← s k b → d e v → i f i n d e x
s t a r t _ m a p [ p i d _ t g i d ] ← { t i m e s t a m p : n o w ( ) , i f i n d e x }

procedure OnFunctionExit()
p i d _ t g i d ←  GetCurrentPidTgid()
e n t r y ← s t a r t _ m a p [ p i d _ t g i d ]
Δ t ← n o w ( ) − e n t r y . t i m e s t a m p
c p u _ t i m e [ e n t r y . i f i n d e x ] ← c p u _ t i m e [ e n t r y . i f i n d e x ] + Δ t
Delete( s t a r t _ m a p [ p i d _ t g i d ] )
The algorithm operates as follows. On each instrumented kernel function entry, OnFunctionEntry records the current process identifier ( p i d _ t g i d ) and the network interface index ( i f i n d e x ) of the socket buffer, storing them together with a nanosecond timestamp in a per-PID hash map ( s t a r t _ m a p ). This associates the start of a kernel function execution with the specific OVS slice (identified by i f i n d e x ) that triggered it. On function return, OnFunctionExit retrieves the saved entry for the same PID, computes the elapsed kernel time Δ t = n o w ( ) − e n t r y . t i m e s t a m p , and accumulates it in a per-interface counter ( c p u _ t i m e [ i f i n d e x ] ). The entry is then deleted to prevent stale state from accumulating. Because each OVS slice uses a distinct network interface, the per- i f i n d e x accumulation naturally partitions CPU consumption by slice without requiring any explicit tagging of packets.
The accumulated CPU time is converted to percentage:
C P U % = Δ T n s T i n t e r v a l × 10 9 × C × 100
where Δ T n s is the delta of accumulated CPU time, T i n t e r v a l is the measurement interval (0.1 s or 100 ms), and C is the number of CPU cores.
The eBPF program stores per-function CPU time in separate hash maps, allowing fine-grained analysis. The Data Plane Agent periodically reads these maps and exports aggregated metrics via gRPC.

4.4. XDP-Based Rate Limiting

eXpress Data Path (XDP) is a high-performance packet processing framework that executes eBPF programs at the earliest point in the Linux network stack—directly in the NIC driver, before socket buffer allocation. We selected XDP over alternative rate limiting mechanisms because, in our KVM/virtio-net setup, it processes packets in ≈1–3 μ s (vs. ≈2–5 μ s for kernel-based mechanisms), dropped packets bypass the networking stack, minimizing CPU usage, and eBPF maps enable userspace to update rate limits without reloading the program.
The XDP rate limiter implements the token bucket algorithm described in Section 3.7. The program maintains per-slice state in eBPF maps (rate_limits, token_state) shown in Algorithm 2.
Algorithm 2 XDP Token Bucket Rate Limiting
procedure ProcessPacket(ctx)
d s t _ i p ←  ExtractDestIP(ctx)
t b ← t o k e n _ s t a t e [ d s t _ i p ]
if  t b = NULL  then return XDP_PASS
Δ t ← n o w ( ) − t b . l a s t _ u p d a t e
t b . t o k e n s ← min ( t b . t o k e n s + t b . r a t e × Δ t , B m a x )
if  t b . t o k e n s ≥ | p a c k e t |  then
t b . t o k e n s ← t b . t o k e n s − | p a c k e t |
return XDP_PASS
else return XDP_DROP
The algorithm operates as follows. The destination IP address extracted from the packet header is used as a per-slice key to look up the token bucket state ( t b ) in the eBPF map. If no entry exists for that destination (the slice is not under active rate limiting), the packet is passed unconditionally via XDP_PASS. Otherwise, tokens are replenished by computing the elapsed time Δ t since the last update and adding t b . r a t e × Δ t tokens, capped at the maximum burst size B m a x to prevent unlimited accumulation. If the current token count is sufficient to cover the packet size | p a c k e t | , the tokens are consumed and the packet is forwarded; if not, the packet is dropped via XDP_DROP before it reaches the kernel networking stack. As discussed in Section 3.7, the XDP ingress placement ensures that dropped packets bypass the kernel networking stack, directly reducing CPU consumption in the OVS datapath.

4.5. gRPC Communication Layer

The system uses gRPC for communication between CSRM and Data Plane Agents. Alternative transport mechanisms such as REST/HTTP, WebSocket, raw sockets, or message queues (e.g., MQTT or ZeroMQ) are viable. In this work, gRPC was selected primarily due to its native support for server-side streaming, which avoids application-level polling, its efficient Protocol Buffers serialization, and its strongly typed service interface that facilitates modular system evolution. Given our 500 ms control loop interval, any transport supporting push-based or streaming semantics would likely be sufficient to meet the timing requirements. We did not conduct a comparative evaluation of transport-layer latency and overhead; this choice reflects a design rationale rather than an empirically validated performance comparison. Raw sockets offer low latency but lack built-in serialization and require custom protocol implementation. Message queues add deployment complexity and potential single points of failure. gRPC was selected because server-side streaming enables continuous telemetry export without polling overhead, Protocol Buffers provide compact binary encoding, and the service contract defined in .proto files ensures type safety and consistency between distributed components. We do not claim that REST/HTTP is unsuitable for sub-second control loops; quantifying transport-layer effects on end-to-end detection-to-action latency is left to future work.
The gRPC interface defines three methods: StreamMetrics for continuous CPU metrics streaming from agent to CSRM, SetRateLimit for commands from CSRM to update slice rate limits, and RunCalibration to trigger the calibration sequence for coefficient measurement.

4.6. PID Controller Implementation

The PID controller described in Section 3.8 is implemented in pid_controller.py. The control loop executes every 500 ms following Algorithm 3.
Algorithm 3 PID Control Loop
procedure ControlLoop( C P U t a r g e t , Δ t )
C P U m e a s u r e d ←  ReadMetrics()
e ← C P U t a r g e t − C P U m e a s u r e d
if  | e | < 0.5 %  then return  // dead zone
P ← K p × e
i n t e g r a l ← i n t e g r a l + e × Δ t
I ← K i × i n t e g r a l
D ← K d × ( e − e p r e v ) / Δ t
u ← P + I + D
R l i m i t ← R l i m i t + u
UpdateRateLimit( R l i m i t )
e p r e v ← e
The algorithm operates as follows. At each 500 ms tick, ReadMetrics queries the gRPC server for the latest CPU utilization reported by the eBPF sensor. The error e = C P U t a r g e t − C P U m e a s u r e d is computed; a dead zone of | e | < 0.5 % suppresses corrections when the system is already within an acceptable band, preventing limit oscillation caused by measurement noise. Outside the dead zone, the controller evaluates the three PID terms as defined in Section 3.8: P = K p · e ( n ) , I = K i · ∑ e ( j ) Δ t , D = K d · ( e ( n ) − e ( n − 1 ) ) / Δ t . The controller adds the control output u = P + I + D to the current rate limit R l i m i t , producing an incremental (velocity-form) update, and writes the updated limit to the XDP eBPF map via UpdateRateLimit, taking effect at the NIC for the next arriving packet. Finally, e p r e v is saved for the derivative computation in the following cycle. The Data Plane Agent writes the new values to the XDP eBPF maps for immediate enforcement.

5. Test Environment

This section describes the experimental platform, traffic generation methodology, and evaluation scenarios used to validate the proposed framework.

5.1. Hardware and Software Platform

The experimental platform is deployed on a virtualized infrastructure using Proxmox VE with KVM hypervisor. Table 4 summarizes the hardware and software specifications.
Table 4. Experimental platform specifications.
Although the virtual uplink interface was provisioned with sufficient capacity to avoid becoming the primary bottleneck, the evaluated KVM/virtio-net datapath saturated near 1.4 Gbps aggregate throughput due to software packet-processing limitations. The dominant bottlenecks are virtualization overheads—particularly virtio-net virtqueue depth/parallelism and KVM interrupt/VM-exit handling—rather than the line rate of the underlying host. Accordingly, the reported results should be interpreted as comparative measurements within a constrained virtualized environment, not as absolute hardware throughput limits. Both XDP and OVS policing were evaluated under identical conditions, preserving the internal validity of the comparative analysis; on bare-metal or with enhanced I/O (e.g., more queues/RSS or SR-IOV), the absolute ceiling would be higher, which we leave for future work. The virtualized infrastructure reflects real-world cloud deployment scenarios where network functions are commonly deployed as virtual machines. The virtio-net driver provides paravirtualized network I/O with near-native performance.
The 2-core configuration with 2 RSS (Receive Side Scaling) queues represents a resource-constrained environment typical of edge computing deployments. This configuration amplifies the effects of CPU contention, making it suitable for evaluating the effectiveness of CPU-aware traffic control.

5.2. Network Topology

The testbed consists of a central OVS node (VM1) that hosts two isolated network slices, each connected to a dedicated external traffic generator. VM1 runs both the ovs-1 and ovs-2 slices and is connected to the physical network via the ens19 uplink through the br-phy bridge. An external Traffic Generator 1 sends packets to the ovs-1 slice at the IP address 192.168.101.10. Traffic Generator 2 sends packets to the ovs-2 slice at the IP address 192.168.102.10. This setup allows both slices to receive separate traffic streams simultaneously, simulating multiple users.

5.3. Traffic Generation Methodology

Traffic is generated using a custom Python (v. 3.10.12) script (traffic_generator.py) [35] that wraps iperf3 with ramp-up capabilities. The script supports configurable ramp-up where traffic rate increases in defined steps (e.g., 100 Mbps increments), step duration control where each rate level is maintained for a configurable period (e.g., 10 s), synchronized start allowing multiple generators to be coordinated for concurrent slice loading, and statistics collection providing per-step throughput, packet loss, and jitter measurements. Table 5 lists the traffic generation parameters used in experiments.
Table 5. Traffic generation parameters.
The choice of UDP traffic eliminates TCP congestion control effects, providing direct observation of the rate-limiting mechanism. The 1400-byte packet size represents typical application payloads while avoiding fragmentation.

5.4. Evaluation Scenarios

Three evaluation scenarios are designed to characterize system behavior across different operating conditions:

5.4.1. Scenario 1—Baseline Performance (No Rate Limiting)

This scenario establishes the system’s natural capacity without any rate limiting intervention. Table 6 summarizes the scenario parameters.
Table 6. Scenario 1: Baseline Performance.
This scenario provides the empirical data needed to calculate the CPU-throughput coefficient k and establish operating zone boundaries.

5.4.2. Scenario 2—Low-Load Controlled Operation

This scenario evaluates the PID controller’s effectiveness under moderate traffic conditions where the system operates within its stable region. Table 7 summarizes the scenario parameters.
Table 7. Scenario 2: Experimental Setup and Evaluation Metrics.
This scenario demonstrates the system’s ability to maintain predictable resource allocation when operating below saturation.

5.4.3. Scenario 3—High-Load Stress Test (Worst Case)

This scenario pushes the system beyond its stable operating region to characterize failure modes and limitations. Table 8 summarizes the scenario parameters.
Table 8. Scenario 3: High-Load Stress Test.
This worst-case scenario reveals the fundamental limitations of software-based rate limiting when kernel resources become the bottleneck.

5.5. Measurement and Data Collection

Three categories of metrics are collected during each experiment. CPU metrics are gathered via eBPF at 100ms intervals, including per-slice CPU time in nanoseconds, total system CPU utilization as a percentage, and per-function CPU breakdown. Traffic metrics are collected via iperf3 at 1-second intervals, capturing achieved throughput in Mbps, packet loss rate as a percentage, and jitter in milliseconds. Control metrics are logged by CSRM at 500ms intervals, recording the PID error signal, computed rate limit adjustments, and actual enforced rate limits.
All metrics are timestamped and logged to CSV files for post-experiment analysis. The variability observed across five independent runs is illustrated by shaded mean ± standard deviation regions in Section 6. The measurement infrastructure introduces less than 1% additional CPU overhead, as validated through comparison with and without instrumentation.

5.6. PID Controller Parameters

Table 9 lists the PID controller parameters used across all experiments.
Table 9. Parameters of the Proposed PID Controller.
These parameters were derived through an empirical three-stage procedure on the live testbed, validated by the sensitivity study and stability analysis described below.

5.6.1. Tuning Procedure

Gains were determined in three sequential stages on the live testbed. In the first stage, with K i = K d = 0 , K p was increased from 1.0 until the first CPU-limit violation appeared; the last compliant value identified the available proportional headroom. In the second stage, K i was raised incrementally until the steady-state offset—CPU remaining well below the 3% setpoint during sustained high traffic—was eliminated without inducing oscillation. In the third stage, K d was tuned to damp overshoot observed on step-up traffic transitions spanning 100 to 500 Mbps ramps.
The Ziegler–Nichols open-loop method was considered but not applied directly, as the plant (CPU usage as a function of packet rate) is nonlinear and time-varying; empirical step-response tuning on the actual testbed was therefore more appropriate. The resulting nominal gains lie at the empirical knee of the responsiveness–stability curve, as confirmed by the sensitivity study below.

5.6.2. Sensitivity Analysis

Each variant was tested with five independent runs under identical synthetic traffic (step increases: 100, 200, 300, 400, 500 Mbps × 10 s each, constant 1400-byte frames). The OVS-1 CPU limit is 3.0%. The raw per-run CSV logs for all variants are available in the project repository [35]. As shown in Table 10, the nominal PID configuration achieved stable CPU regulation without overshoot.
Table 10. PID gain sensitivity: aggregate metrics (5 runs per variant; OVS-1 CPU limit = 3.0%).
CPU mean/max computed over active-traffic samples only (NIC rx > 1 Mbps). Violations: % of 1-s samples with ovs-1 cpu > 3.0%. XDP 400/500 Mbps: mean Mbps throttled by the XDP program at the respective load step. Table 11 presents per-burst CPU mean (%) averaged over five runs.
Table 11. Per-burst CPU mean (%) under gain variation (5 runs per variant).

5.6.3. Stability Argument

The empirical results constitute an implicit BIBO (Bounded-Input, Bounded-Output) stability demonstration. Under ± 25 % gain variation the controller remains fully compliant, recording zero violations with CPU max ≤ 2.78 % , and the − 25 % variant deviates by only + 1.54  Mbps from nominal at 500 Mbps, while higher-gain variants ( + 25 % , + 50 % ) show reduced steady-state throttling ( ∼ 32 –34 Mbps vs. 55 Mbps nominal at 500 Mbps), reflecting more aggressive initial control action that holds CPU further below the setpoint, indicating a robust gain margin. Under − 50 % gain variation a single transient violation occurs—a peak overshoot of + 0.65  pp above the setpoint, affecting 0.4% of samples—which confirms a finite gain-margin boundary. Under + 50 % gain variation no oscillation or instability was observed, with CPU stdev remaining at 0.385 compared to the nominal 0.383, indicating adequate phase margin.
Formal linearization is infeasible because the plant gain ( Δ CPU/ Δ packet-rate) is traffic-pattern-dependent; the empirical 5-run replication (coefficient of variation <5% in CPU max across runs for all compliant variants) confirms reproducibility. The nominal gains therefore represent a conservative, experimentally validated operating point that maintains compliance across the full ± 25 % gain envelope, with a clear safety margin against the − 50 % degradation boundary.
Setpoint portability. Setpoints are specified on a total-host basis. To preserve the same absolute CPU budget when changing core count, the setpoint should be scaled inversely with N c o r e s , i.e., target new = target old × ( N cores , old / N cores , new ) . For example, a 3% setpoint on a 2-core host corresponds to approximately 1.5% on a 4-core host.

5.7. Token Bucket Decisions

The token bucket burst size (Bmax = 64 KB) was selected as a pragmatic engineering compromise between transient burst accommodation, control stability, throughput efficiency, and bounded latency effects within the evaluated virtualized OVS/XDP dataplane. Moderate burst capacities are commonly employed in practical token bucket and Linux traffic shaping deployments to balance short-term burst tolerance against queuing delay and jitter rather than maximize peak burst throughput [RFC 2697; RFC 2698]. In this context, the selected 64 KB configuration allows short-lived microbursts to pass without immediate packet drops, thereby improving throughput stability and preventing excessively aggressive controller behavior during transient traffic fluctuations. At the same time, substantially larger burst capacities would permit longer bursts to accumulate before enforcement, potentially increasing transient queuing delay, jitter, and short-term latency variation—effects that may be undesirable for latency-sensitive 5G/6G network slices such as V2X communication, industrial control, or real-time smart city services. Conversely, excessively small burst capacities would impose overly strict shaping, increasing unnecessary packet loss and reducing throughput efficiency even for benign short-duration traffic bursts. Accordingly, the selected 64 KB value represents a balanced trade-off appropriate for the evaluated CPU-constrained software dataplane, prioritizing stable CPU regulation while maintaining bounded burst-induced delay. Although the present work does not include a dedicated sensitivity analysis of latency or jitter across alternative burst-size configurations, future work will investigate adaptive or slice-specific burst sizing strategies for SLA-sensitive smart city and 5G/6G deployments.

6. Evaluation and Discussion

This section presents the experimental evaluation of the proposed CPU-aware traffic control framework across the three scenarios defined in Section 5.

6.1. Scenario 1—Baseline Performance

The baseline test established system capacity without rate limiting, identifying the CPU-throughput relationship and saturation thresholds. Figure 6 shows the relationship between aggregate traffic and CPU utilization during the baseline ramp-up test. The total CPU increased from 17% at 200 Mbps to approximately 42% at 1 Gbps (Safe zone), remains near this level through 1.2 Gbps (41.6–41.9%), then rises to 50% at 1.4 Gbps (Caution zone), and continues to 70% at 3 Gbps (Danger zone). The 0.8 Gbps point is absent from the figures due to insufficient stable-state samples at that ramp step. The OVS CPU per-slice line remains relatively flat (2–10%), indicating that the OVS datapath itself consumes only a small fraction of total CPU. All CPU percentages reported in this paper are normalized to the total host capacity ( N c o r e s ). For the 2-vCPU testbed, 100% denotes two fully utilized vCPUs.
Figure 6. Total system CPU as a function of aggregate traffic during baseline test. CPU rose from 17% at 200 Mbps to 70% at 3 Gbps aggregate. CPU% values are normalized to total host capacity across 2 cores.
Figure 7 provides a detailed view of the per-slice OVS CPU consumption. Both OVS-1 and OVS-2 showed nearly identical CPU usage, ranging from 2% at 200 Mbps to 10% at 3 Gbps aggregate. This confirmed fair resource sharing between slices in the baseline scenario without rate limiting.
Figure 7. Per-slice OVS CPU utilization (detailed view). Both slices show nearly identical CPU consumption (2–10%), demonstrating fair resource sharing. CPU% values are normalized to total host capacity across 2 cores.
The significant gap between Total System CPU (17–70%) and OVS CPU per-slice (2–10%) reflects the layered nature of packet processing in virtualized environments. The combined OVS datapath (both slices) accounts for approximately 20–29% of total CPU consumption, while the remaining 70–80% is consumed by two components: (1) kernel networking overhead including the shared network stack, bridge processing, veth pair traversal, and interrupt handling, and (2) the iperf3 server processes running inside the namespaces that receive and process the test traffic. This overhead is not directly attributable to any single slice because it occurs in shared kernel code paths and application-level processing before and after packets reach slice-specific OVS processing.
The experimental results revealed three characteristic operating zones with respect to traffic load and packet loss behaviour, as presented in Table 12.
Table 12. Operating zones for baseline performance without rate limiting (pps calculated for 1400 B packets).

6.2. Scenario 2—Low-Load Controlled Operation

This scenario validated the PID controller’s effectiveness under controlled conditions. Based on Scenario 1 findings, we limited the maximum input traffic to 500 Mbps per slice (1000 Mbps aggregate), operating at the upper boundary of the Safe zone, avoiding the Caution and Danger zones where kernel-level saturation dominates. We first established baseline performance without CPU limiting, then applied 3% and 2% CPU targets to OVS-1 while leaving OVS-2 unlimited.
Table 13 presents the complete results showing CPU utilization and packet loss for all three configurations.
Table 13. Low-load test results (N = 5 independent runs): CPU utilization and XDP-enforced drop rate for baseline, 3% limit, and 2% limit configurations. The PID controller successfully maintains OVS-1 CPU below both targets across all runs; OVS-2 (unlimited) has negligible XDP drops. In the 100–300 Mbps range, the limited slice operates in a supply-limited regime, where the offered load remained below the admissible rate computed by the controller. As a result, the measured per-slice OVS CPU stays below the configured setpoint without requiring substantial active throttling.
Figure 8 visualizes the packet loss comparison between configurations, with shaded mean ± standard deviation regions indicating measurement dispersion across all five independent runs.
Figure 8. XDP-enforced drop rate under low load across N = 5 independent runs. Solid/dashed curves show mean packet-loss values for 3% and 2% CPU targets, while shaded regions indicate mean ± standard deviation. OVS-1 (limited slice) experiences progressively stronger XDP enforcement as CPU targets tighten, whereas OVS-2 (unlimited slice) maintains negligible packet loss (<0.02%), confirming effective slice isolation in the safe operating zone.
The results demonstrated three key findings across all five runs. First, the PID controller successfully maintained OVS-1 CPU well below both targets in every run: mean 1.02 ± 0.11 % vs. the 3% target and mean 0.60 ± 0.12 % vs. the 2% target at 500 Mbps. The consistently low standard deviations confirmed stable controller behavior across repeated experiments. The controller is intentionally conservative, preferring to enforce XDP drops rather than risk violating CPU constraints.
Second, the unlimited slice (OVS-2) experienced negligible XDP-enforced drops (<0.02%) regardless of the limit applied to OVS-1, confirming robust slice isolation. The near-zero variance bands for OVS-2 across all traffic levels further validate that rate limiting on one slice does not introduce measurable cross-slice interference under Safe-zone conditions.
Third, more aggressive limiting (2% vs. 3%) provides stronger CPU isolation ( 0.60 ± 0.12 % vs. 1.02 ± 0.11 %) but at the cost of substantially higher XDP drop rates ( 64.01 ± 0.74 % vs. 40.94 ± 5.15 % at 500 Mbps). The widening variance bands for OVS-1 at higher throughput reflect increasing controller intervention as traffic approaches the configured CPU ceiling.
Overall, these results confirmed that XDP-based PID-controlled rate limiting successfully enforced predictable CPU isolation within the Safe zone while preserving near-perfect service quality for unlimited slices. Across all five runs, the unlimited slice remains effectively unaffected, demonstrating that the proposed framework achieves strong per-slice isolation without inducing kernel-level contention under controlled traffic conditions.

6.3. Scenario 3—High-Load Stress Test

This scenario validated slice isolation under extreme load conditions where total traffic exceeded system capacity. We applied a 5% CPU limit to OVS-1 while leaving OVS-2 unlimited, then ramp both slices simultaneously from 100 to 1500 Mbps (3000 Mbps aggregate) using UDP traffic. Table 14 presents the complete results.
Table 14. High-load stress test with 5% CPU limit on OVS-1 (N = 5 independent runs). OVS-1 CPU stays below the 5% target across all runs; XDP enforcement begins at 500 Mbps and grows monotonically to 315 , 690 ± 48 , 471 drops/interval at 1500 Mbps. Under saturation (>700 Mbps), shared kernel overhead dominates and isolation degrades.
Figure 9 visualizes the packet loss comparison between the limited and unlimited slices, with shaded mean ± standard deviation regions representing measurement dispersion across all five independent runs.
Figure 9. Packet loss under high load across N = 5 independent runs. Solid lines show mean packet-loss values, while shaded regions represent mean ± standard deviation. In the saturated regime, isolation degrades: XDP enforces substantial drops on the limited slice, while the unlimited slice also experiences loss due to shared kernel bottlenecks.
The results across all five runs demonstrated three key findings. First, the controller maintained OVS-1 CPU below the 5% target in every run: mean 1.33 ± 0.13 % at 500 Mbps and 1.34 ± 0.81 % at 1500 Mbps; OVS-2 reached 4.73 ± 1.37 % at 1500 Mbps. Second, XDP enforcement began at 500–600 Mbps (3208 ± 3052 drops/interval at 500 Mbps) and grew monotonically to 315 , 690 ± 48 , 471 at 1500 Mbps; the widening shaded variance bands at high traffic rates confirmed increasing run-to-run dispersion as kernel saturation emerged. Third, XDP drops on OVS-1 began at 500 Mbps, coinciding with the transition into the Caution zone; below this threshold all five runs operated without active rate limiting.
Overall, under saturation (>700 Mbps per slice), OVS-1 experiences severe XDP-enforced drops (25.95% at 700 Mbps, rising to 82.24% at 1500 Mbps), while OVS-2 remained largely protected until the most extreme load (2.26% at 1500 Mbps with high variance), confirming that shared kernel bottlenecks begin to dominate at extreme throughput and that XDP enforcement alone cannot guarantee perfect isolation at line rate.

6.4. Discussion

The experimental results demonstrated that CPU-aware traffic control via XDP was effective in a multi-tenant OVS dataplane environment when operating within system capacity. In the Safe zone (below 1000 Mbps aggregate, or 500 Mbps per slice), the baseline (no rate limiting) operates without any XDP-enforced drops, and the closed-loop approach adapted to varying traffic patterns automatically across all five independent runs. When CPU limits were applied, the controller enforced XDP drops to keep per-slice CPU below the target: with a 3% CPU target, OVS-1 maintained a mean CPU of 1.02 ± 0.11 % (vs. 3% target) at the cost of 40.94 ± 5.15 % XDP-enforced drop rate at 500 Mbps, while the unlimited OVS-2 slice experienced negligible drops (<0.02%).
The primary limitation is cross-slice interference under saturation. In the Danger zone (above 1400 Mbps aggregate), kernel-level packet drops occur before XDP processing, causing both slices to experience severe packet loss (>30%) regardless of XDP configuration. The root cause is the shared kernel networking stack, which accounts for approximately 70–80% of total CPU consumption, while the combined OVS datapath accounts for only 20–29%.
The per-function eBPF telemetry collected during Scenario 3 indicates that the dominant contributors to this shared overhead are (1) NET_RX_SOFTIRQ and NET_TX_SOFTIRQ deferred interrupt processing, which scales super-linearly with packet rate due to per-packet skb allocation and freeing; (2) Linux bridge forwarding (br_forward/br_nf_pre_routing) in the host-level br-phy bridge shared by all slices; and (3) virtio-net driver interrupt handling inherent to the KVM/virtio-net setup, which cannot be attributed to a single slice. These subsystems are architecturally shared and lie outside the scope of the per-slice XDP filter.
Several kernel-level tuning strategies could partially mitigate this bottleneck. Receive Packet Steering (RPS) and Receive Flow Steering (RFS) distribute softirq processing across all available vCPUs rather than concentrating it on a single core, which can defer saturation to a higher aggregate rate. CPU affinity pinning (isolcpus, taskset) can dedicate one vCPU exclusively to softirq and bridge processing, isolating this cost from OVS vCPUs. Interrupt coalescing (ethtool-C) reduces the per-packet interrupt rate at the virtio-net interface. For workloads that must operate reliably beyond 1400 Mbps aggregate, a kernel-bypass approach such as AF_XDP zero-copy mode or DPDK-based forwarding eliminates the softirq and skb overhead, though at the cost of a substantial implementation change. Investigating these strategies under realistic 5G traffic profiles is left as future work.
Based on our findings, we recommend proactive capacity planning by keeping aggregate traffic below 1000 Mbps (Safe zone), using 3% CPU target per-slice for a balance between isolation and throughput (or 2% for stricter isolation at the cost of higher packet loss), and considering hardware offload via SmartNIC-based rate limiting for strict isolation requirements when operating in the Danger zone (above 1400 Mbps aggregate).
A detailed comparison with related work is provided in Appendix A. Table A1 summarizes the key differences between our approach and existing solutions in terms of monitoring methodology and actuation capabilities. Table A2 presents quantitative metrics including detection-to-action time, CPU overhead, and isolation effectiveness.

Impact on Latency-Sensitive Slices and Mitigations

The under-target behavior observed in Table 13 is attributed to three main factors: a supply-limited operating regime at low offered load, conservative per-slice CPU accounting that underestimates OVS datapath activity due to dominant fixed kernel costs, and stability-oriented PID tuning, including low integral gain, a dead zone, coarse update intervals, and an additional safety margin. While these design choices improve stability and prevent oscillations, they reduce effective utilization headroom for latency-sensitive slices during transient conditions. To mitigate this effect, an enhanced performance profile can be applied, incorporating feed-forward initialization of the admissible rate from offline calibration, tighter control parameters with shorter update intervals and reduced dead zone, adjusted integral gain with anti-windup, and the use of a minimum committed rate to guarantee baseline bandwidth.

7. Conclusions

This paper presented a closed-loop, CPU-aware traffic control framework for SDN dataplanes built on OVS. The system integrates eBPF-based CPU telemetry, a PID feedback controller for adaptive bandwidth regulation, and XDP-based early packet filtering to enable real-time traffic management in software-defined switching environments.
The framework architecture separates concerns between the Data Plane Agent (running on OVS hosts) and the Central Slice Resource Manager (CSRM), connected via gRPC for efficient bidirectional communication. This design enables local enforcement with centralized intelligence, supporting scalable multi-host deployments.
Experimental evaluation in a multi-tenant OVS dataplane environment demonstrated several key results. The PID controller effectively maintained CPU utilization below configured targets, with the 3% CPU target providing a good balance between isolation and throughput (OVS-1 maintaining 1.02 ± 0.11 % CPU at the cost of 40.94 ± 5.15 % XDP-enforced drop rate at 500 Mbps). Within the Safe operating zone (below 1000 Mbps aggregate, or 500 Mbps per slice), baseline kernel-level packet loss remained below 1%, and the unlimited slice (OVS-2) experienced negligible XDP-enforced drops (<0.02%) regardless of the limit applied to OVS-1.
The study also identified fundamental limitations of software-based rate limiting. Effective isolation between slices was observed only within the Safe zone (below 1 Gbps aggregate), as discussed in Section 6.4. As detailed in Section 6.4, shared kernel overhead (70–80% of total CPU) dominated over OVS datapath consumption, defeating XDP-based rate limiting under saturation. Practical deployment should remain within the Safe zone and consider SmartNIC offload for strict isolation requirements.
The proposed framework is applicable to smart city network infrastructure, where multi-tenant SDN environments must provide fair resource sharing among diverse city services while maintaining cost efficiency through commodity-hardware deployment.
Future work could be directed in several ways, including multi-queue NIC support via RSS for improved slice isolation, machine-learning-based adaptive PID tuning for varying workloads, hybrid hardware–software control integration with SmartNIC offload, and IPv6 support for dual-stack deployments.

Author Contributions

Conceptualization, S.B., P.D.B. and Ž.B.; methodology, S.B.; software, S.B.; validation, S.B., P.D.B. and I.D.; formal analysis, S.B. and I.D.; investigation, S.B.; resources, Ž.B.; data curation, S.B.; writing—original draft preparation, S.B.; writing—review and editing, Ž.B., P.D.B. and I.D.; visualization, S.B.; supervision, P.D.B. and Ž.B.; project administration, P.D.B.; funding acquisition, Ž.B. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The source code for the CSRM framework, including the eBPF/XDP telemetry agent and PID controller implementation, is publicly available at https://github.com/stefanbisevac028/CSRM (accessed on 10 April 2026). The raw per-run CSV logs for the PID gain sensitivity analysis (Section 5.6.2) are included in the same repository.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
SDNSoftware-Defined Networking
OVSOpen vSwitch
eBPFextended Berkeley Packet Filter
XDPeXpress Data Path
PIDProportional-Integral-Derivative
CPUCentral Processing Unit
NICNetwork Interface Card
RSSReceive Side Scaling
gRPCGoogle Remote Procedure Call
CSRMCentral Slice Resource Manager
VMVirtual Machine
APIApplication Programming Interface

References

  1. McKeown, N.; Anderson, T.; Balakrishnan, H.; Parulkar, G.; Peterson, L.; Rexford, J.; Turner, J. OpenFlow: Enabling innovation in campus networks. ACM SIGCOMM Comput. Commun. Rev. 2008, 38, 69–74. [Google Scholar] [CrossRef] [Scilit]
  2. Nunes, B.A.A.; Mendonca, M.; Nguyen, X.N.; Obraczka, K.; Turletti, T. A survey of software-defined networking: Past, present, and future of programmable networks. IEEE Commun. Surv. Tutor. 2014, 16, 1617–1634. [Google Scholar] [CrossRef] [Scilit]
  3. Kreutz, D.; Ramos, F.M.; Verissimo, P.E.; Rothenberg, C.E.; Azodolmolky, S.; Uhlig, S. Software-defined networking: A comprehensive survey. Proc. IEEE 2014, 103, 14–76. [Google Scholar] [CrossRef] [Scilit]
  4. Ebrahimi, S.; Bouali, F.; Haas, O.C. Resource management from single-domain 5G to end-to-end 6G network slicing: A survey. IEEE Commun. Surv. Tutor. 2024, 26, 2836–2866. [Google Scholar] [CrossRef] [Scilit]
  5. Dalgitsis, M.; Cadenelli, N.; Serrano, M.A.; Bartzoudis, N.; Alonso, L.; Antonopoulos, A. Cloud-native orchestration framework for network slice federation across administrative domains in 5G/6G mobile networks. IEEE Trans. Veh. Technol. 2024, 73, 9306–9319. [Google Scholar] [CrossRef] [Scilit]
  6. Heller, B.; Sherwood, R.; McKeown, N. The controller placement problem. ACM SIGCOMM Comput. Commun. Rev. 2012, 42, 473–478. [Google Scholar] [CrossRef] [Scilit]
  7. Tootoonchian, A.; Ganjali, Y. HyperFlow: A distributed control plane for OpenFlow. In Proceedings of the 2010 Internet Network Management Conference on Research on Enterprise Networking, San Jose, CA, USA, 27 April 2010; p. 6. [Google Scholar]
  8. Yeganeh, S.H.; Ganjali, Y. Kandoo: A framework for efficient and scalable offloading of control applications. In Proceedings of the First Workshop on Hot Topics in Software Defined Networks, Helsinki, Finland, 13 August 2012; pp. 19–24. [Google Scholar]
  9. Dixit, A.; Hao, F.; Mukherjee, S.; Lakshman, T.V.; Kompella, R. Towards an elastic distributed SDN controller. ACM SIGCOMM Comput. Commun. Rev. 2013, 43, 7–12. [Google Scholar] [CrossRef] [Scilit]
  10. Pfaff, B.; Pettit, J.; Koponen, T.; Jackson, E.; Zhou, A.; Rajahalme, J.; Casado, M. The design and implementation of Open vSwitch. In Proceedings of the 12th USENIX Symposium on Networked Systems Design and Implementation (NSDI 15), Oakland, CA, USA, 4–6 May 2015; pp. 117–130. [Google Scholar]
  11. Chowdhury, S.R.; Bari, M.F.; Ahmed, R.; Boutaba, R. PayLess: A low-cost network monitoring framework for SDN. In Proceedings of the 2014 IEEE Network Operations and Management Symposium (NOMS), Krakow, Poland, 5–9 May 2014; IEEE: Piscataway, NJ, USA, 2014. [Google Scholar]
  12. Bannour, F.; Souihi, S.; Mellouk, A. Distributed SDN control: Survey, taxonomy, and challenges. IEEE Commun. Surv. Tutor. 2017, 20, 333–354. [Google Scholar] [CrossRef] [Scilit]
  13. Karakus, M.; Durresi, A. Control plane scalability issues and approaches in SDN. Comput. Netw. 2017, 112, 279–293. [Google Scholar] [CrossRef] [Scilit]
  14. Rotsos, C.; Sarrar, N.; Uhlig, S.; Sherwood, R.; Moore, A.W. OFLOPS: An open framework for OpenFlow switch evaluation. In International Conference on Passive and Active Network Measurement; Springer: Berlin/Heidelberg, Germany, 2012; pp. 85–95. [Google Scholar]
  15. Jarschel, M.; Oechsner, S.; Schlosser, D.; Pries, R.; Goll, S.; Tran-Gia, P. Modeling and performance evaluation of an OpenFlow architecture. In Proceedings of the 2011 23rd International Teletraffic Congress (ITC), San Francisco, CA, USA, 6–9 September 2011; IEEE: Piscataway, NJ, USA, 2011. [Google Scholar]
  16. Tran, M.N.; Kim, Y. Network performance benchmarking for containerized infrastructure in NFV environment. In Proceedings of the 2022 IEEE 8th International Conference on Network Softwarization (NetSoft), Milan, Italy, 27 June–1 July 2022; IEEE: Piscataway, NJ, USA, 2022; pp. 115–120. [Google Scholar]
  17. Li, G.; Wang, X.; Zhang, Z. SDN-based load balancing scheme for multi-controller deployment. IEEE Access 2019, 7, 39612–39622. [Google Scholar] [CrossRef] [Scilit]
  18. Abranches, M.; Michel, O.; Keller, E.; Schmid, S. Efficient network monitoring applications in the kernel with eBPF and XDP. In Proceedings of the 2021 IEEE Conference on Network Function Virtualization and Software Defined Networks (NFV-SDN), Heraklion, Greece, 9–11 November 2021; IEEE: Piscataway, NJ, USA, 2021. [Google Scholar]
  19. Prometheus Authors. The Prometheus Monitoring System: Documentation and Architecture Overview. 2023. Available online: https://prometheus.io/docs/introduction/overview/ (accessed on 11 April 2026).
  20. Han, S.; Jang, K.; Park, K.; Moon, S. PacketShader: A GPU-accelerated software router. ACM SIGCOMM Comput. Commun. Rev. 2010, 40, 195–206. [Google Scholar] [CrossRef] [Scilit]
  21. Vieira, M.A.; Castanho, M.S.; Pacífico, R.D.; Santos, E.R.; Júnior, E.P.C.; Vieira, L.F. Fast packet processing with eBPF and XDP. ACM Comput. Surv. 2020, 53, 16. [Google Scholar] [CrossRef] [Scilit]
  22. Jouet, S.; Pezaros, D.P. BPFabric: Data plane programmability for software defined networks. In Proceedings of the ACM/IEEE Symposium on Architectures for Networking and Communications Systems (ANCS); IEEE: Piscataway, NJ, USA, 2017; pp. 38–48. [Google Scholar]
  23. Høiland-Jørgensen, T.; Brouer, J.D.; Borkmann, D.; Fastabend, J.; Herbert, T.; Ahern, D.; Miller, D. The express data path: Fast programmable packet processing in the operating system kernel. In Proceedings of the 14th International Conference on Emerging Networking Experiments and Technologies (CoNEXT), Heraklion, Greece, 4–7 December 2018; IEEE: Piscataway, NJ, USA, 2018; pp. 54–66. [Google Scholar]
  24. Shin, J.; Kim, J.; Nam, J. Aquila: Efficient In-Kernel System Call Telemetry for Cloud-Native Environments. Sensors 2025, 25, 6511. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  25. Tomovic, S.; Radusinovic, I.; Prasad, N.R. Run-Time Adaptive In-Kernel BPF/XDP Solution for 5G UPF. Electronics 2022, 11, 1022. [Google Scholar] [CrossRef] [Scilit]
  26. Montazerolghaem, A. Energy-efficient Software-defined 5G/6G Multimedia IoV: PID controller-based approach. IEEE Trans. Veh. Technol. 2025; early access. [CrossRef] [Scilit]
  27. Malavika, R.; Valarmathi, M.L. Adaptive Server Load Balancing in SDN Using PID Neural Network Controller. Comput. Syst. Sci. Eng. 2022, 42, 229. [Google Scholar] [CrossRef] [Scilit]
  28. Xie, J.; Yu, F.R.; Huang, T.; Xie, R.; Liu, J.; Wang, C.; Liu, Y. A survey of machine learning techniques applied to software defined networking (SDN): Research issues and challenges. IEEE Commun. Surv. Tutor. 2018, 21, 393–430. [Google Scholar] [CrossRef] [Scilit]
  29. Alwakeel, A.M.; Alnaim, A.K. Unleashing the Potential of 5G for Smart Cities: A Focus on Real-Time Applications. Smart Cities 2025, 8, 70. [Google Scholar] [CrossRef] [Scilit]
  30. Botez, R.; Pasca, A.G.; Dobrota, V. Efficient Network Slicing with SDN and Heuristic Algorithm for 5G Networks. Sensors 2023, 23, 6053. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  31. Alhussein, O.; Hadjadj-Aoul, Y.; Outtagarts, A. SDN-Based Network Slicing Mechanism for a Scalable 4G/5G Core Network. Sensors 2021, 21, 3773. [Google Scholar] [CrossRef] [Scilit]
  32. 3GPP. Service Requirements for Enhanced V2X Scenarios. Technical Report TS 22.186, 3rd Generation Partnership Project. 2024. Available online: https://www.etsi.org/deliver/etsi_ts/122100_122199/122186/18.00.01_60/ts_122186v180001p.pdf (accessed on 9 May 2026).
  33. oneM2M. Requirements. Technical Report TS-0002 Version 3.1.2, oneM2M. 2019. Available online: https://www.etsi.org/deliver/etsi_ts/118100_118199/118102/03.01.02_60/ts_118102v030102p.pdf (accessed on 9 May 2026).
  34. ETSI. Multi-Access Edge Computing (MEC); Phase 2: Use Cases and Requirements; Technical Report GS MEC 002 V2.1.1; European Telecommunications Standards Institute: Sophia Antipolis, France, 2018. [Google Scholar]
  35. Biševac, S. CSRM: CPU-Aware Slice Resource Management Framework. GitHub Repository. 2026. Available online: https://github.com/stefanbisevac028/CSRM (accessed on 10 April 2026).
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.