Abstract
Video processing is foundational to a spectrum of important workloads: video sharing, video conferencing, photos/video archival, virtual/augmented reality, cloud gaming, and live streaming. The exponential growth in these workloads, coincident with a slowing Moore’s law, poses significant challenges to deliver more computing at higher efficiencies. In this article, we present the design of a new accelerator—the video coding unit (VCU)—targeted at warehouse-scale (cloud) video transcoding. Our deployment at scale in Google, the first of its kind, has demonstrated significant benefits on several products (YouTube, Meet, Stadia, Photos, etc.) serving billions of users.
Introduction
Video dominates internet traffic, driven by 4K uploads, low-latency gaming, and global conferencing. Traditionally, "transcoding"—converting uploaded video into various formats and resolutions—was handled by general-purpose CPUs. However, as resolutions climb and Moore’s Law stagnates, CPUs can no longer keep up efficiently.
While consumer-grade hardware accelerators exist, they are not designed for the "Warehouse-Scale Computer" (WSC). In a data center environment, the requirements extend beyond single-stream speed to include massive throughput, high reliability, multi-tenancy, and efficient resource management to prevent "stranding" (where idle resources cannot be used due to bottlenecks elsewhere).
System Architecture and Methods
To address these challenges, we developed a holistic hardware-software co-design centered on the Video Coding Unit (VCU).
The VCU ASIC
The VCU is a domain-specific accelerator packed with encoder and decoder cores, optimized for density and multi-output transcoding. Unlike consumer chips, it is designed to generate multiple resolutions from a single source simultaneously.
High-Level Synthesis (HLS)
To accelerate development, we utilized High-Level Synthesis (C-to-hardware) rather than traditional RTL. This allowed the use of software-like tools, such as sanitizers, to identify bugs early and iterate rapidly, ultimately reducing the codebase size by fivefold.
Warehouse-Scale Scheduling
At the cluster level, a sophisticated scheduler manages resources. Because video tasks vary significantly—from short clips to multi-hour livestreams—the scheduler treats hardware resources (CPU, memory, VCU cores, PCIe bandwidth) as a multidimensional "bin" to maximize global utilization.
Firmware Abstraction
The system employs a firmware layer that remains "oblivious" to specific codec logic. By offloading complex decision-making to the software layer, we can improve encoding quality and efficiency through software updates even after the hardware is deployed.
Evaluation and Key Insights
The system was evaluated using the vbench public benchmark suite and fleet-wide production data from Google services like YouTube and Google Photos.
Key Insights
- Datacenter as a Computer: Reliability is managed at the software level. If a VCU fails, the warehouse-scale software reroutes the task, allowing for more aggressive, high-density hardware designs.
- Post-Deployment Agility: Hardware is not static. Using HLS and flexible software interfaces allowed for continuous tuning of rate-control algorithms post-launch, leading to a steady decrease in bitrate and storage costs.
- Power Law Optimization: The system prioritizes resources for "head" videos (viral content) to maximize bandwidth savings, while using faster paths for "long-tail" content.
Results
- Performance: The VCU provides 8x to 20x higher throughput than software-only encoding for H.264 and VP9.
- Cost Efficiency: Factoring in Total Cost of Ownership (TCO), the VCU offers an order-of-magnitude improvement over well-tuned CPU baselines.
- Quality: The VCU matches the perceptual quality (PSNR) of industry-standard software encoders like
libx264andlibvpx. - Scalability: The VCU made compute-intensive VP9 encoding viable at scale, significantly reducing global bandwidth usage.
Future Directions
Future work focuses on incorporating newer standards like AV1, which offer even higher compression but require more complex hardware. Additionally, we are exploring "accelerator disaggregation" to allow any CPU in the data center to offload tasks to any available VCU across the network. Finally, integrating machine learning directly into the transcoding pipeline (e.g., for automatic captioning) represents a significant opportunity for further efficiency gains.
Summary updated