Building a Telco Test Lab Using srsRAN – #1 Tuned

This is the first blog post of a series called “Building a Telco Test Lab Using srsRAN”. This series will describe how to set up a telco testing lab from scratch. I will pay special attention to components like the gNB, RU, and PTP infrastructure. Other components, like the core network, will not be covered in such detail.

In this chapter, I will show how I install and configure Tuned, a tool that helps with configuring Linux-based systems. It stores almost all configurations in a single file, the Tuned profile. This makes it much easier to keep track of the system configuration. It also applies all settings on boot if you use a startup script.

Disabling the Power-Profiles Daemon

Before installing Tuned, I remove the power-profiles-daemon service. This service can interfere with Tuned. I disable it to avoid problems:

sudo systemctl mask power-profiles-daemon.service
sudo systemctl stop power-profiles-daemon.service
sudo systemctl disable power-profiles-daemon.service

Installing Tuned

Install Tuned using the following commands on Ubuntu 24.04:

sudo apt install tuned
sudo ln -s /boot/grub/grub.cfg /etc/grub2.cfg
sudo systemctl enable --now tuned

Creating and Adjusting the Custom Profile

To make our life easier, we can use the srsRAN Tuned profile and adjust it to our needs throughout the other chapters.

The default profile consists of:

  • a Tuned config file (tuned.conf)
  • a startup script (startup.sh)

The config holds all system tuning options, and the startup script can execute commands once on boot. I use the startup script, for example, to create Virtual Functions and bind them to a DPDK driver. More on this in a later chapter.

You can download both files from here:

The tuned.conf is created for a test lab but not for a production environment! It disables lots of security features to improve latency. The only required edit is to enable the IOMMU depending on CPU vendor:

  • Intel CPUs: add intel_iommu=on
  • AMD CPUs: add amd_iommu=on

This profile is written for x86 CPUs. Other architectures require different parameters.

The startup.sh script sets the CPU governor to performance. This keeps the CPU at max frequency to avoid frequency scaling. It also turns off DRM KMS polling. That can reduce periodic timer activity and interrupt noise caused by the GPU/display subsystem.

Enabling the Custom Profile

Create a directory and move both files into it:

sudo mkdir -p /etc/tuned/srs-realtime
sudo cp tuned.conf /etc/tuned/srs-realtime/tuned.conf
sudo cp startup.sh /etc/tuned/srs-realtime/startup.sh
sudo chmod +x /etc/tuned/srs-realtime/startup.sh

Enable and activate the profile:

sudo systemctl enable tuned.service
sudo tuned-adm profile srs-realtime
tuned-adm active

Verify that the profile is active:

tuned-adm profile

The current Tuned configuration is not highly optimized but should be enough to run a gNB without issues on systems with enough headroom. In the upcoming posts, I will extend these two files to store additional settings.

Comments
Join the Discussion and Share Your Opinion
Add a Comment

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert