|
Planet MySQL
|
Planet MySQL - https://planet.mysql.com
|
-
MySQL HeatWave Database Housekeeping Best Practices
As MySQL HeatWave environments continue to grow, many organizations prioritize scaling compute and storage resources while overlooking a critical area: database housekeeping. Inadequate maintenance practices can result in excessive storage consumption, longer backup and recovery times, replication lag, degraded query performance, and increased operational costs. This blog highlights key database hygiene and optimization strategies for […]
-
MySQL 9.7.0 PGO Benchmark Analysis
Overview
Servers Tested:
MySQL 9.7.0 (PGO-enabled build released by Oracle)
MySQL 9.7.0 Non-PGO (built without Profile-Guided Optimization — see BUILD.md)
Tier Configurations:
Tier 2G: 2GB InnoDB buffer pool
Tier 12G: 12GB InnoDB buffer pool
Tier 32G: 32GB InnoDB buffer pool
View Results
Interactive Reports
The benchmark reports are available as interactive HTML pages at:
https://percona-lab-results.github.io/2026-pgo/index.html
Performance Graphs
Tier 2G (2GB Buffer Pool):
Tier 12G (12GB Buffer Pool):
Tier 32G (32GB Buffer Pool):
Key Findings
Performance Impact of PGO
MySQL 9.7.0 with Profile-Guided Optimization (PGO) demonstrates measurable performance improvements over the non-PGO build:
Overall Performance Summary:
Average improvement: 6.5% across all configurations
Peak improvement: 14.3% (Tier 32G, 1 thread), gradually tapering to 10.3% at 512 threads as concurrency increases
Performance gains range from 0.5% to 14.3% in most scenarios
Minor regression (-3.1% at Tier 12G, 128 threads)
Performance by Buffer Pool Size:
Tier 2G (2GB buffer pool): Average improvement of 3.0%
– Best gains at 4 threads (5.5% improvement)
– Gains range from 0.5% to 5.5% across all thread counts
– Modest improvements with no regressions
Tier 12G (12GB buffer pool): Average improvement of 4.1%
– Best gains at 4 threads (8.6% improvement)
– Strong gains at low concurrency (1-4 threads: 7.3%-8.6%)
– Minor regression at 128 threads (-3.1%), neutral at 512 threads (-0.0%)
Tier 32G (32GB buffer pool): Average improvement of 12.2%
– Consistently strong gains across all thread counts (10.3% to 14.3%)
– Peak performance at lowest concurrency (1 thread: 14.3%)
– Maintains 11-12% improvement even at highest concurrency (128-512 threads)
Key Observations:
PGO provides the most significant benefits with larger buffer pools (32GB tier shows 12.2% average improvement)
Largest buffer pool configuration benefits from PGO across all concurrency levels with no regressions
Low to moderate concurrency (1-32 threads) shows best PGO gains across all tiers
Smaller buffer pools (2GB, 12GB) show more modest improvements and occasional regressions at very high thread counts
The performance improvements demonstrate PGO’s effectiveness in optimizing hot code paths, particularly when memory resources are abundant
InnoDB Metrics Analysis
Deep analysis of InnoDB metrics reveals the source of PGO’s performance improvements:
Root Cause: CPU-Level Optimizations
PGO improvements are NOT from I/O optimization, caching, or lock reduction
Buffer pool hit ratios remain virtually identical between PGO and non-PGO builds
Lock contention is minimal in both builds
All I/O metrics scale proportionally with increased throughput
What PGO Actually Optimizes:
✓ Better instruction cache utilization
✓ Improved branch prediction in hot code paths
✓ Optimized function inlining
✓ More efficient CPU instruction ordering
The metrics confirm that PGO’s 6.5% average improvement comes entirely from making the CPU more efficient at executing MySQL’s hot code paths, allowing it to process more transactions per second with the same hardware resources.
What is PGO?
Profile-Guided Optimization (PGO) is a compiler optimization technique that uses runtime profiling data to guide code optimization. The compiler first instruments the code, collects execution profiles during typical workload runs, and then recompiles the code with optimizations targeted at the most frequently executed code paths.
Benefits of PGO:
Improved branch prediction
Better instruction cache utilization
Optimized function inlining
Reduced code bloat
Better register allocation
Benchmark Methodology
Workload
Tool: Sysbench OLTP Read/Write benchmark
Tables: 20 tables
Table Size: 5,000,000 rows per table
Thread Counts: 1, 4, 16, 32, 64, 128, 256, 512
Configuration
Warmup:
– Read-only: 180 seconds
– Read-write: 600 seconds
Measurement Duration: 900 seconds (15 minutes) per thread count
Runs: Single run per configuration
System Metrics Collected
InnoDB storage engine metrics
MySQL status variables
MySQL system variables
System I/O statistics (iostat)
Virtual memory statistics (vmstat)
CPU statistics (mpstat)
System statistics (dstat)
Appendix
For Repository structure, Build steps and Technical details go to https://github.com/Percona-Lab-results/2026-pgo/blob/main/README.md#report-categories
The post MySQL 9.7.0 PGO Benchmark Analysis appeared first on Percona.
-
Best Practices for MySQL HeatWave Adoption for OLTP and OLAP Workloads
Organizations modernizing transactional database environments are increasingly adopting MySQL HeatWave to simplify operations, improve scalability, increase availability, enhance security and enable real-time analytics without separating OLTP and OLAP systems. However, successful adoption requires more than simply provisioning a new database instance. This blog explores practical best practices for provisioning and migrating OLTP and OLAP workloads […]
-
A Practical Guide for MySQL HeatWave Capacity Planning
As organizations modernize their data platforms, MySQL HeatWave has emerged as a powerful solution for running online transactional processing (OLTP) and real-time online analytics processing (OLAP) together without ETL complexity. However, achieving optimal performance and cost efficiency requires thoughtful capacity planning. This blog explains how to monitor and estimate MySQL HeatWave capacity using SQL queries, […]
-
Designing Resilient APIs with MySQL HeatWave High Availability and Read Replicas
Modern cloud applications are expected to remain available even during infrastructure interruptions, replication failovers, maintenance events, and transient network failures. In distributed database environments, it requires applications to treat transient failures as a normal part of production operations. This blog discusses practical API reliability designs for applications using MySQL HeatWave High Availability and Read Replicas, […]
|