All code blocks suppose to be executed from a common working directory.
Install pre-requirements:
sudo apt install -y python3-pip meson libglib2.0-dev libssl-dev libnuma-dev libncurses-dev flex bison libibverbs-dev
pip3 install pyelftools
Clone SURE repo:
git clone https://github.com/FedeParola/sure.git
cd sure
git submodule update --init --recursive
Patch, build and install QEMU:
git clone https://github.com/qemu/qemu.git
cd qemu
git checkout v8.2.0
git apply ../sure/ivshmem_patch.diff
mkdir build
cd build
../configure --target-list=x86_64-softmmu
make -j
sudo make install
Build and install Z-stack:
git clone https://github.com/FedeParola/f-stack.git
cd f-stack/dpdk
meson build
ninja -C build
sudo ninja -C build install
cd ../lib
make -j
sudo make install
Bind a network interface to DPDK driver (not needed for Mellanox NICs):
sudo modprobe uio
sudo insmod f-stack/dpdk/build/kernel/linux/igb_uio/igb_uio.ko
sudo ip link set <ifname> down
sudo dpdk-devbind.py -b igb_uio <ifname>
Build Unimsg manager and gateway:
git clone https://github.com/FedeParola/unimsg.git
cd unimsg/manager/
make
cd ../gateway
make
Build the SURE application (e.g., rr-latency):
cd sure/apps/rr-latency/sure
make menuconfig
# Configure the application
make -j
Allocate 2M hugepages:
echo 1024 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
sudo umount /dev/hugepages
sudo mount -t hugetlbfs -o pagesize=2M none /dev/hugepages
Run the manager:
cd unimsg/manager
sudo ./unimsg_manager
Run the gateway:
cd unimsg/gateway
sudo ./unimsg_gateway
Run the SURE VM (e.g., rr-latency app).
<id>
is an incremental id of the VM starting from 1.
The address of the VM will be computed as 10.0.0.<id>
.
cd sure/apps/rr-latency/sure
sudo ./run.sh <id> <args>
To prevent CPU C-states and P-states form affecting measurements, the following tuning can be applied.
Following instructions were tested on a CloudLab sm110p
node, but should apply to all recent Intel CPUs.
Edit /etc/default/grub
and append intel_pstate=passive
to the GRUB_CMDLINE_LINUX
option, then apply and reboot the machine:
sudo update-grub2
sudo reboot
Disable turbo-boost:
echo 1 | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo
Set all cores to max frequency:
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
echo 1 | sudo tee /sys/devices/system/cpu/cpu*/cpuidle/state*/disable