Enable GPU acceleration
Set thegpu parameter to true when creating a browser:
Request more video memory
GPU browsers come with 3 GiB of video memory, 4 vCPUs, and 6 GiB of memory by default. For WebGL scenes, large canvases, or video workloads that need more, setvideo_memory to 6GiB to get 6 GiB of video memory, 8 vCPUs, and 12 GiB of memory.
video_memory accepts 3GiB or 6GiB (SDK 0.141.0 or later) and requires gpu: true. You can’t set memory on a GPU browser because video_memory sets its system memory too. The browser response returns both video_memory and memory.
2GiB and 4GiB are deprecated aliases for 3GiB and 6GiB. Requests that send them receive the 3GiB or 6GiB allocation, and responses always report 3GiB or 6GiB. Update to the new values when you upgrade your SDK.6GiB video memory browser has 12 GiB of system memory and bills at twice the standard GPU rate.
Large GPU browsers use a separate capacity pool. When that pool is full, creation fails with HTTP 529 (no_gpu_browsers_available) rather than falling back to 3GiB. Retry later, or omit video_memory to create a standard GPU browser.
Use cases
GPU acceleration is useful for:- High performance live view streaming
- Rendering complex 3D graphics or WebGL content
- Video processing and playback
- Canvas-heavy applications
GPU acceleration speeds up page rendering, not screenshot capture. CDP’s
Page.captureScreenshot latency is unaffected by GPU. Computer controls screenshots see a small speedup with GPU enabled.