6 hours ago
We are qualifying an isolated test runner using native sandboxCreate requests with 2 CPU and 4, 7, 7.5 or 8 decimal GB. The submitted values are retained unchanged in our receipts. The cgroup limits follow those requests (page aligned), while guest /proc/meminfo and Docker report the following cold readings:
| CPU | Region | Request | Cgroup limit bytes | Guest/Docker total bytes |
| ---: | --- | --- | ---: | ---: |
| 2 | us-east4-eqdc4a | 4 GB | 3,999,997,952 | 2,104,131,584 |
| 2 | us-west2 | 7 GB | 6,999,998,464 | 3,714,744,320 |
| 2 | us-west2 | 7.5 GB | 7,499,997,184 | 3,714,744,320 |
| 2 | us-west2 | 8 GB | 8,000,000,000 | 3,983,179,776 |
| 2 | us-east4-eqdc4a | 8 GB | 8,000,000,000 | 3,983,179,776 |
| 8 | us-east4-eqdc4a | 8 GB | 8,000,000,000 | 3,983,179,776 |
A separate 2 CPU / 8 GB probe in us-east4-eqdc4a reported the same guest total. A further 8 CPU / 8 GB control in that region reported 8 CPUs in the guest and Docker, but still the same 3,983,179,776-byte guest memory total. All 30 observed memory blocks were online, auto_online_blocks was online, and the last logged virtio memory request was 0xe0000000 (3.5 GiB). Passive snapshots over 30 seconds showed no new request or guest-memory growth.
A later bounded anonymous-memory probe recorded 45 steps of 64 MiB (2.8125 GiB mapped and touched). It stopped at its 100-second deadline. It did not reach the 5 GiB target or trigger the 10-second headroom wait: final MemAvailable remained above the 832 MiB guard. MemTotal did not grow during that experiment. Memory was released and every sandbox was destroyed. We are not claiming exhaustion, failed pressure-driven autoscaling or a hard capacity ceiling.
Could you clarify:
- Is resources.memoryGB a minimum guest allocation, a cgroup ceiling, or an elastic maximum? Why is the cold virtio target 3.5 GiB for this 8 GB request?
- If memory is elastic, what supported mechanism and conditions make the remaining allowance available, and what delay should a client allow?
- What supported, bounded qualification method should a runner use when it needs 6 GiB available, without forcing OOM or writing sysfs settings?
Reference: https://docs.railway.com/sandboxes#sandbox-size and https://github.com/railwayapp/railway-ts-sdk/blob/a5bdd45d47b86418099aa736bc324d2dd56329fb/src/sandbox/engine.ts. The SDK and site wording appear to describe different guarantees, so an authoritative explanation would help.
Opaque sandbox IDs and raw receipts can be supplied privately if requested.
1 Reply
6 hours ago
resources.memoryGB sets the sandbox's size as a ceiling, in decimal gigabytes, and is not a guaranteed amount of memory the guest has at boot. Billing follows memory actually in use, not the size you request. That matches what you measured: the cgroup limit follows the request, while the guest starts with less.
We can't give you a supported mechanism, set of conditions, or delay for the guest's visible memory to grow toward that ceiling, and we can't explain the specific 3.5 GiB starting target you saw for an 8 GB request. Sandboxes are also still in beta, so sizing behavior isn't a stable contract yet and may change between releases.
Given that, a runner that needs 6 GiB available shouldn't treat the requested size as proof of it. The safe check is to read the guest's own MemTotal and MemAvailable after creation and gate the workload on what is actually there, instead of on the request value.
Status changed to Awaiting User Response Railway • about 6 hours ago