detachbox
PagesCPU, memory and disk

CPU, memory and disk

All your terminals share your Compute's CPU, memory and disk, and nobody else's build eats into them. The top bar of every page shows how much of each is in use; click it for a card with the terminal that uses the most and what to do when a resource runs out.

Watch the resource meter

The top bar carries three small gauges: CPU, memory and disk. Click them for the card:

  • each resource with its use now and its trend over the last hour, measured every minute
  • Using the most: the terminals taking the most CPU and memory right now
  • a warning when your terminals hit the plan's CPU limit and wait their turn, when memory is nearly full, or when the disk is full, with Change size next to it

The Compute page has the same figures in more detail under Resources: CPU with its trend, memory, disk, processes and network, refreshed every 5 seconds.

Clear caches

Package managers and build tools keep caches in every home folder, and they grow. To free the space:

  1. Click the resource meter and pick Clear caches under the disk.
  2. Clear package and build caches? lists what goes: the npm, pnpm, Yarn, Bun, pip, uv, Go, Cargo, Gradle and Maven caches, and the browsers your projects' Playwright downloaded. Your projects, agent conversations and settings stay.
  3. Pick Clear caches.

Cleanup runs on our side until every cache is gone, in every home folder at once, with or without a terminal running. The card counts "Freed 2.1 GB so far"; close it or the page and cleanup carries on. At the end it shows the space freed from each cache. If it stops early, it says how much it freed before it stopped, and Clear again frees the rest.

Tools fetch what they need again on their next run. A build or install running at that moment can fail; run it again afterwards. Activity records each clear with the space it freed.

How your disk is counted

Your disk holds your files at full size, the sizes ls -l shows: 50 GB on Start is 50 GB of your projects and home folders, byte for byte.

Inside a terminal, plain du -sh and df count blocks after compression and show less than your files take. To count a folder the way your plan does, add --apparent-size:

du -sh --apparent-size ~/* /work/* | sort -h

~ is the home folder of the terminal you run it in: every project has its own, and your shell terminals share another.

When the disk fills up

When your files reach your size, new writes stop. The Compute page and the meter show the disk as full, and an email tells you, at most once a day. Then:

  • Clear caches, as above, or delete what you no longer need. Writing picks up again once your files are 512 MiB under your size.
  • Or pick Change size for a bigger disk. It applies at once, with no restart.

When memory runs out

When your terminals together run out of memory, the system stops the largest program in a terminal. If that program was an agent, the terminal says so: "The agent was stopped: this Compute ran out of memory." Its row in the list reads Stopped: out of memory.

  • Pick Restart terminal in the notice. The agent starts again on its conversation; your home and the project's files stay.
  • Or pick Change size for more memory.

A terminal left without its agent closes by itself 3 hours later. You get a ping about the stop whatever events you picked, as Notifications explains.

When a terminal runs out of processes

Each terminal runs up to 32,768 processes. When they are all taken, nothing new starts in it, not a command and not the dashboard's connection. Its notice says how many are taken and, when it can tell, which program left finished processes behind without collecting them.

  • Pick Restart terminal to start it again in a fresh container, its conversation kept, or End terminal.
  • Every container in your terminals already runs under Docker's init, which collects finished processes. For a service that turns it off, set init: true on it in your compose file, as the notice suggests.

Builds and agents share the CPU

Docker and everything it runs have lower CPU and disk priority than the shell, tmux and the agent. A long image build or a test run in containers takes what is free and leaves the agent and your typing quick.