Billing¶
Prices¶
| Resource | Price | Per hour |
|---|---|---|
| CPU | $0.000037449 per core per second | $0.1348 per core |
| Memory (allocated) | $0.0000063365 per GiB per second | $0.0228 per GiB |
| Memory mapped from libraries, including prebuilt Mathlib | not metered | $0 |
| Storage | free for now | $0 |
A core is a physical core (two vCPUs). pp pricing prints the current prices.
Every account receives $5 of credit at the start of each calendar month (UTC). Unused free credit does not roll over. Prepaid credit you add does not expire.
What is metered¶
The meter runs from the moment your command starts in the sandbox until it exits. During that window, ten times a second, ProofPod samples:
- CPU time consumed by the sandbox, in core-seconds. If your command uses one core for ten seconds, that is 10 core-seconds whether your limit was 1 or 32.
- Allocated memory: memory your processes asked the system for (heap, stack, anonymous mappings), integrated over time into GiB-seconds.
What is not metered¶
| Not billed | Why |
|---|---|
| Memory-mapped library files | Lean maps .olean files read-only instead of copying them. They are the same bytes for every user of a version, so ProofPod does not count them. |
| Uploading and downloading files | Sync happens before the meter starts and after it stops. |
| Starting a sandbox | Same. |
| Warm time after a command | The sandbox waits two minutes for your next command at our expense. |
| Building an environment for a new version | A one-time shared cost. |
| Limits you did not use | --cpu and --memory are ceilings. |
| Storage | Free for now. |
Minimum¶
A running command is billed for at least 0.125 cores and 0.125 GiB per second of run time, because a sandbox is never smaller than that. A command that sleeps for an hour costs about $0.02.
Reading a summary line¶
28.1s: wall time on your side, including sync and sandbox start.53.7 core-s: billed CPU. More than the wall time because several cores were busy.6.3 GiB-s: billed memory.$0.0020: 53.7 × $0.000037449 + 6.3 × $0.0000063365.
pp runs shows the same figures for past commands and pp usage totals them
by month.
Worked examples¶
Measured on the live service with Lean 4.36 and Mathlib v4.36.0, on a small project that imports all of Mathlib, in a warm sandbox with default limits.
| Command | Core-seconds | GiB-seconds | Cost |
|---|---|---|---|
pp lake env lean File.lean, file imports all of Mathlib |
6.0 | 0.8 | $0.0002 |
pp lake build with nothing to rebuild |
28 | 1.3 | $0.0011 |
pp lake build after editing one file |
54 | 5.7 | $0.0021 |
| A build that keeps 8 cores and 20 GiB busy for one hour | 28,800 | 72,000 | $1.53 |
For the first row, the lean process shows 8,066 MB resident while it runs.
359 MB of that is allocated; the rest is Mathlib, mapped. You are billed for
the 359 MB.
Running out of credit¶
- A new command is refused if you have no credit left. The message says so and the exit code is 125.
- A running command is stopped when its cost reaches the credit you had when it started. It exits with 130.
- Nothing is deleted. Workspaces and their caches are kept.
Add credit from the dashboard.
Keeping costs down¶
- Check single files with
lake env lean. A fulllake buildin a Mathlib project re-verifies about 18,000 build records before compiling anything, which costs around 28 core-seconds (about a tenth of a cent) even when nothing changed. Checking one file costs a fifth of that. - Do not lower limits to save money. Limits are free. A lower
--cpumakes a parallel build take longer for the same core-seconds. - Set a timeout that fits. A proof search that will never terminate is
billed until
--timeout. The default is one hour. - Share a workspace in CI. A named workspace lets each job reuse the last job's build outputs instead of starting cold. See CI.