Back to articles
Technology Insight

Building a Sub-15ms Cloud Gaming Solution: Leveraging Sunshine and AV1 Encoding on GPU VPS

June 7, 2026

Introduction: The New Era of Self-Hosted Cloud Gaming

Cloud gaming has transitioned from a novel concept to a mainstream necessity for gamers demanding flexibility. However, commercial platforms often come with limitations regarding library availability, regional restrictions, and subscription costs. For enterprises and technology enthusiasts alike, building a proprietary cloud gaming infrastructure offers unmatched control, privacy, and performance optimization. This guide outlines how to architect a self-hosted cloud gaming solution achieving sub-15ms latency by pairing Sunshine, the open-source game stream host, with advanced AV1 hardware encoding on a GPU-enabled Virtual Private Server (VPS).

The Architecture Components: Sunshine and AV1

To achieve real-time responsiveness that rivals local hardware, every millisecond in the pipeline matters. Our architecture relies on two pillars:

1. Sunshine: The Ultimate Open-Source Host

Sunshine is a self-hosted game stream host that acts as an open-source alternative to proprietary solutions. It is designed to offer low-latency streaming and is fully compatible with Moonlight, the premier open-source client. Unlike older streaming solutions, Sunshine bypasses heavy middleware layers, capturing frames directly from the OS display subsystem and passing them straight to the GPU pipeline. This lean architecture is crucial for keeping capture latency to a absolute minimum.

2. AV1 Encoding: Next-Gen Efficiency

The AOMedia Video 1 (AV1) codec represents a massive leap forward in video compression technology. Compared to traditional codecs like H.264 and HEVC (H.265), AV1 delivers up to 30% better compression efficiency at identical bitrates. In a cloud gaming context, this efficiency translates into two major advantages:

  • Reduced Bandwidth Requirements: High-fidelity 4K or 1440p streams require significantly less network throughput, minimizing packet queuing and network jitter.
  • Superior Visual Fidelity: Fast-paced gaming scenes experience fewer blocky artifacts, ensuring sharp text and clear details even during rapid motion.
Note: Hardware acceleration is mandatory. Software-based AV1 encoding introduces unacceptable CPU overhead and latency, making modern GPU architectures (such as NVIDIA Ada Lovelace, AMD RDNA 3, or Intel Arc) on your VPS essential.

Step-by-Step Deployment Blueprint

Building this solution involves provisioning the right infrastructure, configuring the host OS, and tuning Sunshine to prioritize low-latency AV1 pipelines. Follow these steps to deploy your high-performance environment.

Step 1: Selecting the Right GPU VPS Infrastructure

Your choice of VPS provider determines your baseline latency. Look for providers offering data centers geographically close to your target users (ideally under 100 miles) to minimize network propagation time. Ensure the instance specs meet the following criteria:

  • GPU: NVIDIA L4, RTX 4090, or equivalent data center GPUs featuring hardware AV1 encoders (NVENC).
  • CPU: At least 4 dedicated high-frequency vCPUs to handle input tracking and OS overhead.
  • Network: Dedicated 1 Gbps port with unmetered or high-allowance bandwidth.
  • OS: Windows Server 2022 or Windows 10/11 Pro (for maximum game compatibility and display driver support).

Step 2: Installing Display Drivers and Virtual Displays

Since your VPS will operate headless (without a physical monitor), you must configure a virtual display driver to trick the OS into rendering frames at high refresh rates. Install the official enterprise drivers for your GPU, then utilize an open-source tool like the IddSampleDriver to inject a virtual monitor capable of 2560x1440 resolution at 120Hz or 144Hz. This prevents the OS from defaulting to a low-resolution software rasterizer.

Step 3: Sunshine Installation and AV1 Activation

Download and install the latest stable release of Sunshine on your VPS. Once installed, access the web-based configuration interface (usually accessible at https://localhost:47990). Navigate to the Configuration panel and apply the following settings:

  1. Audio/Video Settings: Locate the encoder selection and force it to use hardware-accelerated AV1 (e.g., nvenc_av1 for NVIDIA platforms).
  2. Performance Tuning: Set the preset option to "P1" or "UltraFast" depending on your GPU architecture. This prioritizes encoding speed over absolute maximum compression ratio, lowering encoding latency below 3ms.
  3. Rate Control: Choose Constant Bit Rate (CBR) or Low Latency VBR, and specify a bitrate between 25,000 Kbps and 45,000 Kbps for pristine image quality.

Step 4: Network and Client Optimization

On the user side, download the Moonlight client on your target device (PC, tablet, or mobile). Connect to the VPS IP address and enter the pairing PIN provided by the Sunshine web UI. Under Moonlight's settings, ensure you explicitly check "Prefer AV1 video codec". Set your frame rate target to match the virtual display (e.g., 120fps) and enable hardware decoding on your local machine to keep decoding latency below 2ms.

Analyzing the Sub-15ms Latency Budget

Achieving the sub-15ms milestone requires understanding how latency is distributed throughout the system. A optimized Sunshine and AV1 pipeline breaks down approximately as follows:

  • Frame Capture & Render: 2ms to 4ms (Handling the game logic and OS frame grabbing).
  • AV1 Hardware Encoding: 1.5ms to 3ms (Processed instantly by the dedicated GPU encoding blocks).
  • Network Transit: 4ms to 7ms (Dependent on physical distance and optical fiber quality; requiring a ping under 8ms).
  • Client-Side Decoding: 1ms to 2ms (Handled by modern hardware decoders on the client device).

When summed up carefully, the total end-to-end glass-to-glass latency lands comfortably between 8.5ms and 16ms, providing a feeling indistinguishable from playing on a local console or PC.

Conclusion: Future-Proofing Corporate and Personal Gaming

By leveraging open-source innovation via Sunshine and coupling it with the state-of-the-art efficiency of AV1 hardware encoding, you can successfully bypass the limitations of mainstream cloud gaming. This architecture offers a highly scalable template for deployment. Whether you are an enterprise looking to deliver high-performance remote CAD workstations and interactive 3D simulations, or a passionate gamer seeking a pristine, lag-free remote experience, this setup represents the pinnacle of modern streaming deployment.