This repository contains the source code for the PCM SDK.
PCM is a research and development SDK for implementing and evaluating programmable congestion control (CC) and load balancing (LB) algorithms. It provides CPU-based implementations of PCM algorithm interfaces and a runtime shell.
To compare supported algorithms under traffic patterns such as incast and core congestion, the project also integrates with UET htsim and ATLAHS/HTSIM toolchains, enabling both baseline network experiments and trace-driven studies.
SDK core:
build.py: primary build entry point.hac/: code generation and helper tooling for algorithm integration.algorithms/: CC/LB algorithms.include/: PCM runtime.
Applications:
apps/htsim/: UET htsim-based simulation app, scenarios, configs, and plotting scripts.apps/htsim_atlahs/: ATLAHS/GOAL-trace simulation app and related batch workflows.third-party/: external dependencies.
- C++23 compiler
- cmake >= 3.16
- numpy
- matplotlib
- pyyaml
git submodule update --init --recursive
# The htsim patch exposes parts of the UE NIC/endpoint interface,
# allowing CC/LB logic inside the UE stack to be redirected into PCM.
cp -r ./apps/htsim/uet-htsim-patch/* ./third-party/uet-htsim/htsim/sim/
cd ./third-party/uet-htsim/htsim/sim/
cmake -S . -B build
cmake --build build --parallelLoad balancing algorithms rely on the xxHash library to provide fast PRNG:
cd ./third-party/xxHash && makeThe PCM project can be built using build.py script which acts as a wrapper for CMake:
./build.py --relwithdebinfoThe following command can be used to run batch incast experiments for all supported CC algorithms:
export LD_LIBRARY_PATH=$(pwd)/build/lib/:$LD_LIBRARY_PATH
python3 ./apps/htsim/batch_simulations.py --conf=$(pwd)/apps/htsim/all_algos_incast.json --out=$(pwd)/results --plotUpon successful execution, the ./results/ folder will contain congestion window evolution PDF plots for all algorithms listed in the all_algos_incast.json batch.
Other experiments (core congestion, LB algorithms) can be run using JSON batch configs in ./apps/htsim/.
PCM is integrated with the ATLAHS simulation toolchain, which extends UET htsim to support simulation of application GOAL traces.
See https://github.com/spcl/HTSIM for more information.
As with basic htsim, build spcl/HTSIM.
# make sure to pull submodules recursively
git submodule update --init --recursive
# apply HTSIM_spcl-patch to HTSIM_spcl first
cp -r ./apps/htsim_atlahs/HTSIM_spcl-patch/* ./third-party/HTSIM_spcl/htsim/sim/
# build htsim-atlahs
cd ./third-party/HTSIM_spcl/htsim/sim/
cmake -S . -B build
cmake --build build --parallelThe procedure is similar to the UET htsim app.
python3 build.py --relwithdebinfo --build-htsim-atlahspython3 ./apps/htsim_atlahs/batch_simulations_goal.py --conf ./apps/htsim_atlahs/pcm_goal_incast_16_nodes.json --out ./apps/htsim_atlahs/log_goal/16_nodes --plotpython3 ./build.py --helppython3 ./build.py --cleanpython3 build.py --debugpython3 build.py --profiling --profiling-backend <perf,chrono,rdtsc>Notes:
- The
perfoption is supported only on Linux. Runsudo sysctl -w kernel.perf_event_paranoid=0to enable collection of perf data without root permissions. rdtscis supported only on x86.