Cache preloading after mysqld startup
Warm buffer pools deliberately so the first traffic hour is not a cold-cache outage.
Restart empties caches. The process is up; latency is not.
What to warm
InnoDB buffer pool first. Touch hot ranges/indexes before cutting traffic back:
SELECT COUNT(*) FROM orders FORCE INDEX (PRIMARY);
SELECT COUNT(*) FROM order_items FORCE INDEX (idx_order_id);
Later server versions can dump/restore the buffer pool — use that when available.
When it matters
- Large pools and frequent restarts
- Failover to a cold replica
- After restores or heavy DDL invalidation
If restarts are rare and traffic warms naturally, skip the theatre.
Ops
- Warm replicas before promotion when you can
- Cap concurrency so warm-up ≠ attack traffic
- Watch buffer pool read ratios during the ramp
Choose when you pay for cold cache — not whether.