Skip to content

Instantly share code, notes, and snippets.

@thaddeusc1
Last active March 31, 2023 19:03
Show Gist options
  • Save thaddeusc1/ec02f72088fc0140660ab34c74219147 to your computer and use it in GitHub Desktop.
Save thaddeusc1/ec02f72088fc0140660ab34c74219147 to your computer and use it in GitHub Desktop.
Setup PTS for srsRAN benchmarking
#!/usr/bin/env bash
# Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
sudo apt update
# srsRAN supports—but does **not** require—GCC 10.
sudo apt install --assume-yes build-essential gcc-10 g++-10
sudo update-alternatives --remove-all cc
sudo update-alternatives --remove-all c++
# gcc
sudo update-alternatives --remove-all gcc
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 75
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 # Default on Ubuntu 22.04 LTS
# g++
sudo update-alternatives --remove-all g++
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 75
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100 # Default on Ubuntu 22.04 LTS
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 100
# Use GCC 10 across all benchmark runs, so that results focus on performance differences due to *CPU characteristics* and **not** compiler characteristics.
sudo update-alternatives --set gcc /usr/bin/gcc-10
sudo update-alternatives --set g++ /usr/bin/g++-10
cd ~/Downloads
sudo apt install curl
curl --remote-name https://phoronix-test-suite.com/releases/repo/pts.debian/files/phoronix-test-suite_10.8.4_all.deb
sudo apt install --assume-yes ./phoronix-test-suite_10.8.4_all.deb
# Install additional recommended packages for PTS
sudo apt install --assume-yes php-bz2 php-sqlite3 php-curl
phoronix-test-suite install-dependencies srsran-1.0.1
# Install srsRAN dependencies that PTS misses
sudo apt install --assume-yes libmbedtls-dev libzmq5 libsctp-dev
phoronix-test-suite install srsran-1.0.1
# Use the performance CPU governor for testing (will revert to default after reboot)
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
phoronix-test-suite run srsran-1.0.1
# Change GCC back to the distribution's default.
sudo update-alternatives --auto gcc
sudo update-alternatives --auto g++
@thaddeusc1
Copy link
Author

thaddeusc1 commented Apr 7, 2022

This gist targets running v1.0.1 of the srsRAN test1 as v1.1 of the srsRAN test2 removes support for benchmarking large channel performance—i.e., channels comprised of 270 Physical Resource Blocks (PRBs)—using 5G New Radio (NR).

Footnotes

  1. Test v1.0.1 is based upon release 21.04 of srsRAN.

  2. Test v1.1 is based upon release 21.10 of srsRAN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment