Skip to content

Commit 4ea2fc5

Browse files
committed
Document video_memory for GPU browsers
1 parent fce8acf commit 4ea2fc5

4 files changed

Lines changed: 26 additions & 9 deletions

File tree

‎browsers/gpu-acceleration.mdx‎

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ func main() {
5959

6060
You can also enable GPU acceleration in the dashboard when deploying a browser under **Advanced Configuration**.
6161

62-
## Large GPU browsers
62+
## Request more video memory
6363

64-
A standard GPU browser runs with 4 vCPUs, 6 GiB of memory, and a 2 GiB vGPU frame buffer. For graphics-heavy pages, request the large GPU browser by setting `memory` to `12GiB`. It doubles CPU, memory, and frame buffer: 8 vCPUs, 12 GiB of memory, and a 4 GiB frame buffer.
64+
A GPU browser gets 2 GiB of video memory by default, with 4 vCPUs and 6 GiB of memory. For WebGL scenes, large canvases, or video that run out of video memory, set `video_memory` to `4GiB`. That browser gets 4 GiB of video memory, 8 vCPUs, and 12 GiB of memory.
6565

6666
<CodeGroup>
6767
```typescript Typescript/Javascript
@@ -71,7 +71,7 @@ const kernel = new Kernel();
7171

7272
const kernelBrowser = await kernel.browsers.create({
7373
gpu: true,
74-
memory: '12GiB',
74+
video_memory: '4GiB',
7575
});
7676
```
7777

@@ -82,7 +82,7 @@ kernel = Kernel()
8282

8383
kernel_browser = kernel.browsers.create(
8484
gpu=True,
85-
memory="12GiB",
85+
video_memory="4GiB",
8686
)
8787
```
8888

@@ -100,20 +100,26 @@ func main() {
100100
client := kernel.NewClient()
101101

102102
kernelBrowser, err := client.Browsers.New(ctx, kernel.BrowserNewParams{
103-
GPU: kernel.Bool(true),
104-
Memory: "12GiB",
103+
GPU: kernel.Bool(true),
104+
VideoMemory: kernel.BrowserVideoMemory4GiB,
105105
})
106106
if err != nil {
107107
panic(err)
108108
}
109109
_ = kernelBrowser
110110
}
111111
```
112+
113+
```bash CLI
114+
kernel browsers create --gpu --video-memory 4GiB
115+
```
112116
</CodeGroup>
113117

114-
`12GiB` is the only `memory` value accepted together with `gpu: true`; omit `memory` to get the standard GPU browser. The `memory` field on the browser response reports the allocation you received.
118+
`video_memory` requires SDK version 0.123.0 or later, or CLI version 0.47.0 or later. It accepts `2GiB` or `4GiB` and requires `gpu: true`. You can't set `memory` on a GPU browser, because `video_memory` determines its memory. The browser response includes `video_memory` and `memory`, so you can confirm the allocation you received.
119+
120+
A browser with 4 GiB of video memory is billed for its 12 GiB of memory, so it costs twice the [standard GPU rate](/info/pricing#usage-rates).
115121

116-
Large GPU browsers come from their own capacity. When none is available, creation fails with HTTP 529 and the `no_gpu_browsers_available` code rather than falling back to a standard GPU browser, so retry later or omit `memory` to get a standard GPU browser instead.
122+
These browsers come from separate capacity. If none is available, creation fails with HTTP 529 and the `no_gpu_browsers_available` code instead of falling back to 2 GiB of video memory. Retry later, or omit `video_memory` to get a standard GPU browser.
117123

118124
## Use cases
119125

‎browsers/process-execution.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ Kernel doesn't expose a per-session memory metric in the API, CLI, or dashboard
240240

241241
### Read whole-session memory
242242

243-
`free` reports the memory allocated to your browser. A headless browser gets 1 GiB; a headful, non-GPU browser gets 8 GiB by default and 16 GiB when you set `memory` on [create](/api-reference/browsers/create-a-browser-session). A GPU browser gets 6 GiB, or 12 GiB as a [large GPU browser](/browsers/gpu-acceleration#large-gpu-browsers).
243+
`free` reports the memory allocated to your browser. A headless browser gets 1 GiB; a headful, non-GPU browser gets 8 GiB by default and 16 GiB when you set `memory` on [create](/api-reference/browsers/create-a-browser-session). A GPU browser gets 6 GiB, or 12 GiB when you [request 4 GiB of video memory](/browsers/gpu-acceleration#request-more-video-memory).
244244

245245
<CodeGroup>
246246
```typescript Typescript/Javascript

‎changelog.mdx‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ import { YouTubeVideo } from '/snippets/youtube-video.mdx';
99
For API library updates, see the [Node SDK](https://github.com/onkernel/kernel-node-sdk/blob/main/CHANGELOG.md), [Python SDK](https://github.com/onkernel/kernel-python-sdk/blob/next/CHANGELOG.md), and [Go SDK](https://github.com/onkernel/kernel-go-sdk/blob/main/CHANGELOG.md) changelogs.
1010
</Note>
1111

12+
<Update label="October 9" tags={["Product", "Docs"]}>
13+
## Product updates
14+
15+
- Added **`video_memory`** for [GPU browsers](/browsers/gpu-acceleration#request-more-video-memory). Set it to `4GiB` with `gpu: true` to get 4 GiB of video memory, 8 vCPUs, and 12 GiB of memory, double the default GPU browser. Available in the Node, Python, and Go SDKs from 0.123.0 and in the CLI from 0.47.0 as `--video-memory`.
16+
17+
## Documentation updates
18+
19+
- Documented [video memory](/browsers/gpu-acceleration#request-more-video-memory) on the GPU acceleration page and added its rate to [pricing](/info/pricing#usage-rates).
20+
</Update>
21+
1222
<Update label="October 6" tags={["Product", "Docs"]}>
1323
## Product updates
1424

‎info/pricing.mdx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ With Kernel, you only pay for what you use and nothing more. You don't pay for i
2020
| Headful browser | 0.0001333336 |
2121
| Headless browser | 0.0000166667 |
2222
| Headful browser + GPU acceleration | 0.0008000016 |
23+
| Headful browser + GPU acceleration, [4 GiB video memory](/browsers/gpu-acceleration#request-more-video-memory) | 0.0016000032 |
2324
| App invocation | 0.0000666668 |
2425

2526
> Included monthly credits apply to usage costs only.

0 commit comments

Comments
 (0)