학술논문

Revamping Sampling-Based PGO with Context-Sensitivity and Pseudo-instrumentation
Document Type
Conference
Source
2024 IEEE/ACM International Symposium on Code Generation and Optimization (CGO) Code Generation and Optimization (CGO), 2024 IEEE/ACM International Symposium on. :322-333 Mar, 2024
Subject
Computing and Processing
Data centers
Instruments
Scalability
Production
Servers
Usability
Optimization
Profile Guided Optimization
Feedback Directed Optimization
Sampling
Instrumentation
Context-sensitive Profiling
Compiler
Language
ISSN
2643-2838
Abstract
The ever increasing scale of modern data center demands more effective optimizations, as even a small percentage of performance improvement can result in a significant reduction in data-center cost and its environmental footprint. However, the diverse set of workloads running in data centers also challenges the scalability of optimization solutions. Profile-guided optimization (PGO) is a promising technique to improve application performance. Sampling-based PGO is widely used in data-center applications due to its low operational overhead, but the performance gains are not as substantial as the instrumentation-based counterpart. The high operational overhead of instrumentation-based PGO, on the other hand, hinders its large-scale adoption, despite its superior performance gains. In this paper, we propose CSSPGO, a context-sensitive sampling-based PGO framework with pseudo-instrumentation. CSSPGO offers a more balanced solution to push sampling-based PGO performance closer to instrumentation-based PGO while maintaining minimal operational overhead. It leverages pseudo-instrumentation to improve profile quality without incurring the overhead of traditional instrumentation. It also enriches profile with context-sensitivity to aid more effective optimizations through a novel profiling methodology using synchronized LBR and stack sampling. CSSPGO is now used to optimize over 75% of Meta's data center CPU cycles. Our evaluation with production workloads demonstrates 1%-5% performance improvement on top of state-of-the-art sampling-based PGO.