 Andrew Beveridge ☄️andClaude Opus 4.5
|
2e71dc3158
|
feat(infra): Upgrade encoding worker to c4d-highcpu-32 (4.92x faster) (#244)
## Summary
Upgrades the GCE encoding worker from c4-standard-8 (Intel Xeon) to
c4d-highcpu-32 (AMD EPYC 9B45 Turin), achieving **4.92x faster encoding
performance** based on rigorous benchmarking.
## Changes
- **Infrastructure**: Updated `MachineTypes.ENCODING_WORKER` to
`c4d-highcpu-32` in `config.py`
- **Documentation**: Comprehensive benchmark results in
`docs/archive/2026-01-08-performance-investigation.md`
- **Lessons Learned**: Added "GCE Instance Type Selection for FFmpeg
Encoding" section
- **Benchmark Scripts**: Added reusable scripts for future
infrastructure testing:
- `scripts/benchmark_encoding.py` - Local Python benchmark using actual
code paths
- `scripts/benchmark_encoding_gce.sh` - Shell benchmark for GCE VMs
- `scripts/benchmark_candidates.sh` - Multi-VM orchestration for
comparative testing
## Benchmark Results
| Instance | CPU | Total Time | vs Baseline |
|----------|-----|------------|-------------|
| c4-standard-8 (baseline) | Intel Xeon | 666s | 1.00x |
| c4-highcpu-16 | Intel Xeon | 309s | 2.16x |
| c4a-highcpu-16 | Google Axion ARM | 248s | 2.69x |
| c4d-highcpu-16 | AMD EPYC 9B45 | 220s | 3.03x |
| **c4d-highcpu-32** | **AMD EPYC 9B45** | **135s** | **4.92x** |
Key finding: AMD EPYC Turin significantly outperforms Intel Granite
Rapids for CPU-bound FFmpeg/libass workloads.
## Testing
- [x] Benchmarked on actual GCE instances with production data
- [x] Verified c4d-highcpu-32 uses hyperdisk-balanced (already
configured)
- [ ] Infrastructure deploys via CI after merge
## Deployment Impact
⚠️ Changing machine type will cause Pulumi to **replace** the VM (~1-2
min downtime). Jobs queued during restart will retry automatically.
@coderabbitai ignore
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-08 14:17:02 -05:00 |
|