AutoCO: An Online Continuous Optimization System for Phase-Changing Database Workloads.
Profile Guided Optimization (PGO) utilizes a program’s runtime behavior to drive optimization, but its effectiveness relies heavily on profile freshness, as stale or unrepresentative profiles can limit or even negate its benefits. Extensive prior work has proposed techniques to mitigate profile staleness in offline PGO . Recent online optimizers go further by profiling the exact production binaries and immediately applying optimizations to running processes via code replacement. However, existing online binary optimizers such as OCOLOS and AOBO are limited to single-shot optimization. They fail to adapt to subsequent behavioral changes, rendering them suboptimal for long-running workloads with evolving runtime behaviors. Therefore, an online optimizer is required to automatically and continually re-profile and re-optimize long-running phase-changing applications. We present AutoCO , the first online binary-level continuous optimization system supporting multiple architectures (x86-64 and AArch64). To enable continuous adaptation to phase changes in target database workloads, AutoCO introduces a closed-loop system comprising four coordinated mechanisms: a phase monitoring mechanism that raises candidate phase-change events and a lifetime-aware trigger gate that suppresses optimization rounds unlikely to amortize their lifecycle costs; an address mapping mechanism that bridges runtime execution states with the original binary to enable iterative optimization; a code generation and injection mechanism that leverages mapped profiles to restructure the binary layout and safely redirects control flow; and an asynchronous resource reclamation mechanism that prevents memory bloat by safely reclaiming resources from obsolete code. This continuous process is supported by a modular design that facilitates portability across diverse ISAs. On MySQL, MongoDB, and PostgreSQL across x86-64 and AArch64, AutoCO achieves substantial initial performance boosts of up to 47.46% (MySQL), 43.17% (MongoDB), and 17.46% (PostgreSQL). Crucially, as workloads evolve, AutoCO continuously re-optimizes phases whose candidate events pass the lifetime-aware gate, yielding an additional adaptive speedup of 3.06%-23.01% over stale optimization.
Authors
- Jianmei Guo (ORCID: https://orcid.org/0000-0001-5787-6781)
- Zhiwei Ying
- YUFENG LI
- Bo Huang (ORCID: https://orcid.org/0000-0001-5126-7192)
- Yue Tang
- Yuehua Chen (ORCID: https://orcid.org/0009-0006-1343-7449)
- Zhenjian Du
- Haoyu Liao (ORCID: https://orcid.org/0009-0004-1611-5360)
Institutions
- East China Normal University (CN)
Publication Details
- Journal
- ACM Transactions on Architecture and Code Optimization
- Published
- 2026-07-22
- DOI
- https://doi.org/10.1145/3832323
- Primary Topic
- Parallel Computing and Optimization Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00