Memory Auto Scaling
Runta can automatically adjust your agent’s memory as demand changes—scaling up for spikes and back down when demand falls, without requiring you to recreate the runtime.
Create an auto-scaling runtime
Section titled “Create an auto-scaling runtime”The following examples start with 1024 MiB and allow the runtime to grow to 8192 MiB.
If you omit the maximum, Runta uses the initial memory as the limit and automatic growth is disabled.
runta run \ --name memory-demo \ --cpus 2 \ --memory 1024 \ --memory-max 8192from runta import Runta
with Runta() as runta: runtime = runta.runtimes.create( "memory-demo", vcpus=2, memory_mib=1024, memory_max_mib=8192, )import { Runta } from "@runta/runta-sdk";
const runta = new Runta();const runtime = await runta.runtimes.create("memory-demo", { vcpus: 2, memoryMib: 1024, memoryMaxMib: 8192,});Choose a maximum
Section titled “Choose a maximum”Leave enough headroom for bursty workloads without setting an unnecessarily large ceiling. For example, a compiler or agent may usually fit in 1–2 GiB but briefly need 8 GiB while installing dependencies or building a project.
If the workload always needs a fixed allocation, omit the maximum or set it to the same value as the initial memory.
