Low Latency Kernel & High Performance Setup - pchat-imm/o-ran-e2-kpm GitHub Wiki

Low Latency Kernel & High Performance Setup

Description: enable host computer with low latency kernel, CPU power and CPU governor to performance mode
Tutorial: Mallasen Quintana, S. (2022). Deployment and analysis of a 5G NR radio access network based on Open RAN, using USRPs and OpenAirInterface (Doctoral dissertation, Universitat Politècnica de València).

Host PCs

1. Low latency kernel

  • install low latency image
sudo apt-get install linux-image-lowlatency linux-headers-lowlatency
  • reboot, select Advanced option of Ubuntu in the GRUB menu
  • check the kernel
uname -r
	5.15.0-118-lowlatency

2. CPU power management

  • disbale hyper threading as it migh not supported by srsRAN (need to check)
## see that CPE frequency is always at maximum
watch grep \"cpu MHz\" /proc/cpuinfo


## change GRUB_Linux_Default
sudo nano /etc/default/grub

# GRUB_CMD_LINE_DEFAULT="quiet splash"
GRUB_CMD_LINE_DEFAULT="quiet intel_pstate=disable procesor.max_cstate=1 intel_idle.max_cstate=0 idle=poll"


## uodate the grub setting
sudo update-grub


## add blacklist
sudo nano /etc/modprobe.d/blacklist.conf

blacklist intel_powerclamp

## run i7z to check that C-state 0 is the only one with 100% and others are at 0%
sudo apt install i7z
sudo i7z

3. CPU governor

## install cpufrequtils
sudo apt-get install cpufrequtils

## set CPU governor to performance mode
sudo cpufreq-set -g performance

edit file /etc/init.d/cpufrequtils

# GOVERNOR="ondemand"
GOVERNOR="performance"		# @1mm add
## restart the cpufrequtils
./cpufrequtils restart
	Restarting cpufrequtils (via systemctl): cpufrequtils.service.
## or 
sudo systemctl restart cpufrequtils.service

## restart systemctl deamon
sudo systemctl daemon-reload

## view cpufreq
cat /proc/cpuinfo | grep -i mhz
cpufreq-info
⚠️ **GitHub.com Fallback** ⚠️