This repository showcases the performance and capabilities of a dynamic in-network aggregation framework using a programmable switch, along with physical workers and a parameter server (PS), based on ATP. The setup includes two physical workers, one physical PS, and a programmable switch.
To get started, clone the repository:
git clone https://github.com/lorepap/netagg.git
If you are using a physical switch, compile the switch program and proceed to Step 2 directly.
# Navigate to the SDE directory
cd $SDE
# Compile the P4 program
$TOOLS/p4_build.sh ~/git/p4ml/p4src/p4ml.p4
# (Optional) Start the software Tofino behavior model
./run_tofino_model.sh -p p4ml
# Navigate to the SDE directory
cd $SDE
# Run the switch daemon with the specified P4 program
./run_switchd.sh -p p4ml
# Run P4 test scripts
$SDE/run_p4_tests.sh -t $ATP_REPO/ptf/ -p p4ml
# Install entries via the RPC script
$TOOLS/run_pd_rpc.py -p p4ml $ATP_REPO/run_pd_rpc/setup.py
# Navigate to the server directory
cd $ATP_REPO/server/
# Compile the server application
make
# Run the server application
# Usage: ./app [AppID]
sudo ./app 1
Wait until all threads have completed QP creation.
# Navigate to the client directory
cd $ATP_REPO/client/
# Compile the worker application
make
# Run Worker 1
# Usage: ./app [MyID] [Num of Workers] [AppID] [Num of PS]
sudo ./app 0 2 1 1
# Run Worker 2
# Usage: ./app [MyID] [Num of Workers] [AppID] [Num of PS]
sudo ./app 1 2 1 1
Once the workers are running, switch back to Terminals 5 or 6 to monitor the bandwidth report in real-time.
Feel free to modify the configuration or parameters as needed to suit your experimental setup.