Set them per project in
proofpod.toml, or per shell
with PROOFPOD_CPU, PROOFPOD_MEMORY and PROOFPOD_TIMEOUT.
Limits are not reservations
--cpu and --memory are ceilings. You are billed for what the command
uses underneath them, per second, and nothing for the headroom.
This matters for Lean because its resource use is very uneven. Elaborating one
file uses one core. lake build uses as many cores as there are modules ready
to compile, which is many at the start of a build and one at the end of a
dependency chain. Paying for a 16-core reservation through the single-threaded
parts is most of what makes cloud builds expensive. Here you do not.
The trade-off: cores are not reserved either. A command can always use its
limit when the hardware has it free, which is the normal case, but sixteen
cores are not held idle on your behalf while your command uses one.
CPU
A core is a physical core, equivalent to two vCPUs on most clouds. The sandbox reports your limit as its CPU count, so Lake’s default parallelism matches--cpu without any extra flags.
Memory
SIZE is binary: 16G means 16 GiB. M, G, GiB and so on are accepted; a
bare number is MiB.
The limit applies to memory your command allocates. Compiled libraries that
Lean memory-maps do not count, toward the limit or the bill. Importing all of
Mathlib maps about 8 GB of .olean files; with ProofPod that is free and does
not eat into --memory. A file that imports all of Mathlib and proves a few
lemmas allocates a few hundred megabytes.
If a command allocates more than the limit it is stopped:
Timeouts
DURATION accepts 90 (seconds), 90s, 30m, 2h, 1h30m or 1d. When the
timeout is reached the command receives SIGTERM, then SIGKILL five seconds
later, and pp exits with 124.
Warm sandboxes
After a command finishes, its sandbox stays warm for two minutes. A command that arrives in that window starts in about a second and finds file caches already populated. You are not billed for warm time. A sandbox is reused when the next command in the same workspace asks for the same versions and the same--cpu and --memory. Changing any of those starts
a fresh sandbox, which is slower for the first command. If you alternate
between two sets of limits, put the larger one in proofpod.toml and use it
for everything: unused headroom is free.
Cold starts are noticeable for Mathlib projects: the first lake build in a new
sandbox spends 15 to 30 seconds reading Mathlib’s build metadata before it
compiles anything. See Troubleshooting.
One command at a time per workspace
A workspace runs one command at a time. A second command started while the first is still running waits for it:pp cancel.
Different workspaces (different projects, or different machines) run
independently. An account can run 8 commands at once.