Skip to content
Railway Sandbox: How to verify effective CPU/RAM limits per VM?
edmundtohir
OP

5 days ago

Hello Railway team,

We are using the official Railway TypeScript SDK to create PRIVATE Linux Sandboxes with the following resource configuration:

resources: {
  cpu: 0.5,
  memoryGB: 0.5
}

In two test sessions, both /sys/fs/cgroup/cpu.max and /sys/fs/cgroup/memory.max returned "No such file or directory" (exit code 1). Both Sandboxes were subsequently destroyed.

We would appreciate clarification on the following:

  1. Are Sandbox CPU and memory limits enforced using cgroup v1, cgroup v2, or VM/hypervisor-level controls?
  2. Are the requested 0.5 vCPU and 500,000,000 bytes enforced from the start of provisioning? Is the RAM limit a hard cap?
  3. Is there an authenticated SDK/API method to verify the effective CPU/RAM limits for a specific sandbox_id, including the time at which those limits became effective?
  4. If guest cgroups do not expose these limits, is there an authoritative provider-side verification or attestation method tied to the individual Sandbox VM?

We specifically need evidence of effective resource enforcement, not merely confirmation that the resource request was accepted.

No Sandboxes are currently active. We have paused further testing pending clarification.

Thank you.

Awaiting User Response

3 Replies

Railway
BOT

5 days ago

Each sandbox is its own Linux VM, and the resources value you pass (cpu, memoryGB, fractional vCPU allowed) sets that VM's size when it is created. That size is the ceiling the sandbox can use, not a reservation, and requests above your plan's maximum are rejected with an error rather than silently reduced. See Sandbox size.

Because the size is set on the VM itself at creation, the cgroup limit files you checked inside the guest are not where that ceiling would show up, so their absence does not mean no limit applied.

We can't give you more detail on the enforcement mechanism, whether fractional vCPU is throttled or rounded inside the guest, or the exact hard-cap behavior for memory. We also can't point to an SDK or API call that reads back a sandbox's effective CPU and memory with a timestamp, or to a per-VM attestation of enforced limits.

Sandboxes are currently in beta, and the SDK and API may change in breaking ways between releases.


Status changed to Awaiting User Response Railway • 5 days ago


edmundtohir
OP

5 days ago

Thank you for the explanation.

Could a Railway engineer please confirm whether the CPU and RAM limits configured at Sandbox creation are hard-enforced from provisioning, including the exact semantics of 0.5 vCPU and 500,000,000 bytes of memory?

Most importantly, is there an authenticated, verifiable method to prove these effective limits for a specific sandbox ID and provisioning timestamp?

If no such verification or attestation is available, please explicitly confirm that limitation.

We need to distinguish general product guarantees from verifiable per-VM evidence before proceeding with our security gate.

Thank you.


Status changed to Awaiting Railway Response Railway • 5 days ago


Railway
BOT

5 days ago

The resources value you pass to Sandbox.create sets the VM's size when it is created, and that size is the ceiling the sandbox can use. Requests above your plan's maximum are rejected with an error rather than reduced.

To answer your direct question: we can't give you an authenticated method or a per-VM attestation that proves the effective CPU and memory limits for a specific sandbox ID and provisioning timestamp. The SDK reads back a sandbox's status, region, network isolation and domains, but not its effective enforced CPU and memory. What we can confirm is how the product handles your request: the size you asked for is applied at creation as the VM's ceiling. We can't give you per-VM evidence of how that ceiling is enforced.


Status changed to Awaiting User Response Railway • 5 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...