Skip to content

Commit cc10787

Browse files
committed
docs: add memory & CPU overcommit section to containers quickstart (#2693)
Add documentation explaining Rivet's two-tier memory allocation system and CPU throttling behavior to help users understand resource limits and avoid container termination. Closes #2689 Generated with [Claude Code](https://claude.ai/code)
1 parent 1dd8527 commit cc10787

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

site/src/content/docs/containers.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,27 @@ USER rivet
250250
```
251251

252252
</CodeGroup>
253+
254+
## Runtime Details
255+
256+
### Memory & CPU Overcommit
257+
258+
Understanding Rivet's memory and CPU resource allocation helps you optimize performance and avoid unexpected container termination.
259+
260+
<Note>
261+
Monitor your container's resource usage through the Rivet dashboard to ensure you stay within your allocated limits and avoid performance issues or unexpected termination.
262+
</Note>
263+
264+
### Memory Limits
265+
266+
Rivet uses a two-tier memory allocation system:
267+
268+
- **Soft limit**: This is the memory amount you've reserved on the host machine for your container. This is the target amount you should stay under during normal operation.
269+
- **Hard limit**: This is set 50% higher than your reserved amount to provide a buffer for unexpected memory spikes. For example, if you reserved 1 GB, your hard limit would be approximately 1.5 GB. Exceeding this hard limit will likely cause your container to be killed.
270+
271+
#### CPU Throttling
272+
273+
CPU allocation works similarly to memory:
274+
275+
- The CPU percentage you see in monitoring represents what you should follow to avoid getting throttled during periods of resource contention on the host.
276+
- Like memory, the CPU has a mechanism that allows for temporary spikes above your allocated amount, but sustained high usage may result in throttling if there's resource contention.

0 commit comments

Comments
 (0)