xPrio is a reinforcement learning-based resource prioritization approach combining crosslayer signals from browser and transport layer into resource priorities. This repo contains our simulation, training and evaluation code.
- Constantin Sander, Ike Kunze, Hendrik Buschbaum and Klaus Wehrle: xPrio: Crosslayer Web Resource Prioritization at Runtime. Proc. ACM Netw. 4, CoNEXT2, Article 27 (June 2026), 16 pages. https://doi.org/10.1145/3808675
If you use any portion of our work, please consider citing our publication.
@article{2026-sander-xprio,
title = {{xPrio: Crosslayer Web Resource Prioritization at Runtime}},
year = {2026},
issue_date = {June 2026},
publisher = {Association for Computing Machinery},
volume = {4},
number = {CoNEXT2},
articleno = {27},
numpages = {16},
journal = {Proc. ACM Netw.},
DOI = {https://doi.org/10.1145/3808675},
author = {Sander, Constantin and Kunze, Ike and Buschbaum, Hendrik and Wehrle, Klaus}
}
- Clone ns-3 3.41
git clone https://github.com/nsnam/ns-3-dev-git
cd ns-3-dev-git
git checkout 2209a5abd18be77c6c865c837368b4e459ae7c8e
- Clone xPrio into ns-3 scratch folder and build dependencies
git clone --recursive https://www.github.com/COMSYS/xPrio
./xPrio/simulation/build_deps.sh
- Clone, patch and install ns3-gym in contrib folder
git clone https://github.com/tkn-tub/ns3-gym.git ./opengym
cd opengym/
git checkout 6007f4b3811af0cffcacf9a6151e5b9d2f4ef3ae
git apply ../../scratch/xPrio/simulation/ns3gym.patch
pip3 install --user ./model/ns3gym
- Build
./ns3 configure
./ns3 build xPrio
- Check out Chromium in browsertime/docker/chromium according to https://chromium.googlesource.com/chromium/src/+/main/docs/linux/build_instructions.md
- Apply our tracing and reuse patch on commit 91ad1c4f1b187a13b6189ea80b20a5b642143bbf
git checkout 91ad1c4f1b187a13b6189ea80b20a5b642143bbf
git apply ../../chromium.patch
- Build Chromium according to https://chromium.googlesource.com/chromium/src/+/main/docs/linux/build_instructions.md
- Build adapted Browsertime container in browsertime/docker/
./build.sh
- Build go_fastcgi server in go_fastcgi
./build.sh
- Build h2o in h2o
mkdir build
cd build
cmake -DWITH_MRUBY=OFF ..
make install
git clone https://github.com/python-pillow/Pillow
cd Pillow
git checkout 9b4fae77178e827ab17118fbc89c739ffd6a0fab
git apply ../trace_to_schedule/pillow.patch
python3 -m pip install .
- Record mahimahi websites via https://github.com/worenga/mitmproxy2mahimahi
- Adapt configs/snapshots.json for websites
- Run inference on websites
python3 inference.py <namespacename> --eval configs/snapshots.json
- Run trace processing
python3 trace_to_schedule.py output/<browsertimeresult>
- Adapt config/model.json and config/schedules.json to your websites
python3 train.py --configfile configs/model.json
Logs and model weights can be found under results/logs and results/experiences
- Adapt configs/test.json according to your websites
python3 inference.py <namespacename> --eval configs/test.json