Memory Auto Scaling
Runta can increase the runtime allocation as memory pressure rises, without requiring you to recreate the runtime. This can be helpful at the building stage or agent setup. Configure two values:
- Initial memory
- Maximum memory
If you omit the maximum, Runta uses the initial memory as the limit and automatic growth is disabled.
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.
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.