P2GO: P4 Profile-Guided Optimizations
Abstract
Programmable devices allow the operator to specify the data-plane behavior of a network device in a high-level language such as P4. The compiler then maps the P4 program to the hardware after applying a set of optimizations to minimize resource utilization. Yet, the lack of context restricts the compiler to conservatively account for all possible inputs – including unrealistic or infrequent ones – leading to sub-optimal use of the resources or even compilation failures. To address this inefficiency, we propose that the compiler leverages insights from actual traffic traces, effectively unlocking a broader spectrum of possible optimizations. We present a system working alongside the compiler that uses traffic-awareness to reduce the allocated resources of a P4 program by: (i) removing dependencies that do not manifest; (ii) adjusting table and register sizes to reduce the pipeline length; and (iii) offloading parts of the program that are rarely used to the controller. Our prototype implementation on the Tofino switch automatically profiles the P4 program, detects opportunities and performs optimizations to improve the pipeline efficiency. Our work showcases the potential benefit of applying profiling techniques used to compile general-purpose languages to compiling P4 programs.
People
Talk
BibTex
@INPROCEEDINGS{wintermeyer2020profile-guided,
isbn = {978-1-4503-8145-1},
doi = {10.1145/3422604.3425941},
year = {2020-11},
booktitle = {Proceedings of the 19th ACM Workshop on Hot Topics in Networks},
type = {Conference Paper},
author = {Wintermeyer, Patrick and Apostolaki, Maria and Dietmüller, Alexander and Vanbever, Laurent},
abstract = {Programmable devices allow the operator to specify the data-plane behavior of a network device in a high-level language such as P4. The compiler then maps the P4 program to the hardware after applying a set of optimizations to minimize resource utilization. Yet, the lack of context restricts the compiler to conservatively account for all possible inputs -- including unrealistic or infrequent ones -- leading to sub-optimal use of the resources or even compilation failures. To address this inefficiency, we propose that the compiler leverages insights from actual traffic traces, effectively unlocking a broader spectrum of possible optimizations. We present a system working alongside the compiler that uses traffic-awareness to reduce the allocated resources of a P4 program by: (i) removing dependencies that do not manifest; (ii) adjusting table and register sizes to reduce the pipeline length; and (iii) offloading parts of the program that are rarely used to the controller. Our prototype implementation on the Tofino switch automatically profiles the P4 program, detects opportunities and performs optimizations to improve the pipeline efficiency. Our work showcases the potential benefit of applying profiling techniques used to compile general-purpose languages to compiling P4 programs.},
language = {en},
address = {New York , NY},
publisher = {Association for Computing Machinery},
title = {P2GO: P4 Profile-Guided Optimizations},
PAGES = {146 - 152},
Note = {19th ACM Workshop on Hot Topics in Networks (HotNets 2020) (virtual); Conference Location: Chicago, IL, USA; Conference Date: November 4-6, 2020; Conference lecture held on November 6, 2020. Due to the Coronavirus (COVID-19) the conference was conducted virtually.}
}
Research Collection: 20.500.11850/452270
Slide Sources: https://gitlab.ethz.ch/projects/41276