Skip to content

Sizes and limits

Sizes

A machine has one of six sizes. A size is the machine's memory. In the API a size is its memory in MiB: 128, 256, 512, 1024, 2048 or 4096. Disk is a number of GiB. The default is 128 MiB with 2 GiB of disk.

Size Swap Disk (default) Suited to
128 MiB 128 MiB 1-5 GiB (2) Scripts, HTTP calls, cron-like work
256 MiB 256 MiB 1-5 GiB (2) Light Python or Go, small tools
512 MiB 512 MiB 1-5 GiB (2) Heavier scripts, small installs
1 GiB 1 GiB 2-20 GiB (5) npm install, tests, small frontend builds
2 GiB 2 GiB 2-20 GiB (5) Frontend builds, Go builds, batch work
4 GiB 4 GiB 2-40 GiB (10) Large builds, test suites, data jobs
  • CPU is shared. A machine may use up to 1 vCPU (2 from 1 GiB, 4 at 4 GiB), shared and not guaranteed: Kiln does not promise dedicated CPU or a share of a physical core. CPU is included in the price of the memory.
  • Memory and disk are always yours. Other machines never take them.
  • Swap lets a machine use up to its own size again on disk. A job that needs more memory than the size gets slower instead of being killed. Swap is usually available up to the size; a machine may get less or none, so check swap_max_bytes in the machine's status. Swap is part of the size and costs nothing extra.
  • Node.js and swap. Node sizes its heap from memory and ignores swap, so the machine's default environment sets NODE_OPTIONS=--max-old-space-size to leave room for swap. You can override it in env.
  • Cloning big repositories. A git clone of a few hundred MB needs at least 256 MiB, and is slow there because it swaps. Use 512 MiB or more for it.
  • /tmp is in memory. Files written to /tmp count against the machine's memory. Write big files under your own folder or your home directory, which live on the machine's disk.
  • Out of memory. When a machine uses up its memory and swap, the whole machine ends: it is exited with code 137 and oom: true. The log and the kiln.machine.exited event say so. Take a bigger size and run it again.
  • Running short of memory. Kiln stops a machine that keeps running short of memory for about 3 minutes (heavy swapping, or stalled waiting for memory), like running out of memory: it is exited with code 137 and thrashed: true. Its job needs more memory than the size, so choose a bigger size and run it again; the same size will stop the same way.
  • Resize a machine's size or disk only while it is exited or saved, only upward, and only within your tier's largest size. See Machines.

Read the sizes with GET /v1/kiln/sizes. Each has size, swap, vcpu_max (the most CPU a machine of that size may use, shared and not guaranteed), disk_min, disk_max, disk_default and allowed, which says whether your tier may use it. Read the images with GET /v1/kiln/images: ubuntu-24.04 (the default) and debian-12.

When Kiln is out of capacity

A machine is usually ready in seconds. When Kiln needs to add capacity first, it can take about 2 minutes.

A start or lease that Kiln has no room for is refused with 503 no_capacity. The message names the largest size available now, so you can lease that size or smaller, or try again in a minute. Nothing is charged for a refused lease.

Tiers

Kiln comes in three tiers: Standard, Premium and Business. Buying one turns Kiln on for the project. The current price of each tier is shown when you choose it.

Standard Premium Business
GiB-hours included per month 100 1,000 4,000
Machines at once 2 5 20
Largest machine 1 GiB 2 GiB 4 GiB
Longest lease 4 hours 24 hours 24 hours
  • GiB-hours are what a tier includes. A GiB-hour is 1 GiB of machine memory for an hour: a 2 GiB machine uses 2 an hour, a 256 MiB machine a quarter. So Standard's 100 GiB-hours are 100 hours of a 1 GiB machine, or 800 of a 128 MiB one. Premium's 1,000 are 500 hours of a 2 GiB machine, or 4,000 of a 256 MiB one. Business's 4,000 are 1,000 hours of a 4 GiB machine, or 2,000 of a 2 GiB one.
  • The count is exact. Kiln counts in MiB-minutes: 1 GiB-hour is 61,440 MiB-minutes. A lease of 30 minutes on a 512 MiB machine uses 15,360 MiB-minutes (0.25 GiB-hours). Only the machine's own memory counts.
  • How a lease uses them. A lease's minutes come out of the GiB-hours first, at each start, as whole minutes. If what is left covers only part of the lease, that many minutes come from the allowance and the rest from credits. They reset on the 1st of each month (UTC) and do not carry over. In the month you buy a tier, they are prorated by the days left.
  • Above the GiB-hours, credits. The minutes the allowance does not cover are paid from the project's credits when the machine starts, at the price per GiB-hour shown in the marketplace. CPU and disk are included: only the machine's memory and the time it is leased count. Kiln usage is never invoiced. If the credits do not cover it, there is no machine.
  • Machines at once counts leased machines, from the moment a start takes the lease until its end time, running or exited, because the machine keeps its room until then. A saved machine does not count.
  • Saved machines: a project keeps at most 100 machines. Past that, a create is refused with 403 limit_exceeded.
  • Limits are checked at each start, because your tier may have changed since the machine was saved. A start past a limit is refused. The answer is 403 limit_exceeded. It names the limit (max_machines, max_memory_mib, max_lease_minutes and so on), the value of the limit, what you requested, and upgrade: the lowest higher tier that allows the request, with its tier and value. upgrade is left out when no tier allows it. Sizes of 4 GiB need Business, so a request for one on Standard or Premium names business.
  • A tier that has ended or is unpaid means no new starts and no extensions. Leases already paid run to their end time.

Limits that apply to every tier

  • A lease is at least 5 minutes.
  • During the beta, the longest lease may be shorter than your tier's. The error names the limit that applied.

How a lease is paid

The length of a lease is given at each start, because it is what you pay for. A saved machine costs nothing. The API and the dashboard show the price before the start: how much comes from your GiB-hours, and what the rest costs in credits.

  • A lease pays its minutes up front, at the start, from the tier's GiB-hours first, then credits. Each start that takes minutes is its own charge, and a start while time is left takes none.
  • Unused minutes come back when a lease ends early. End the lease (the End lease button, POST /machines/{uuid}/end-lease, ptkl kiln end-lease <machine>, or kiln_end_lease), delete the machine, or let it end itself when the main process exits (end_on_exit), and the minutes you did not use are returned. Used time counts from when the machine was placed, rounded up to whole minutes, and at least 5: 5 minutes is the shortest a lease can cost.
  • Credits come back first, then the allowance. The unused minutes go back to where they were paid from, the latest payment first: credits, then GiB-hours, which return to the month they were taken in.
  • Jobs end their lease when the run's main process exits, so a run that finishes early is paid only for the time it used. Stop does not end a lease: a stopped machine keeps its lease and its minutes until you start it again, end the lease, or it expires. It shows as stopped and leased, with Start again and End lease.
  • Extending a lease follows the same rule, and a lease with its extensions never runs longer than your tier's longest lease.
  • When Kiln fails, you are not charged for the time lost. A machine that never started returns all its minutes, and a machine that was lost to a fault on Kiln's side returns the minutes from when it went away. GiB-hours return to the month the lease was taken in, and credits come back as a refund.

Read what you have used with GET /v1/kiln/usage and, per machine, GET /v1/kiln/machines/{uuid}/usage.

The Usage tab of Machines shows your month's GiB-hours and limits, and below them every lease of that month, past and current, for all machines (GET /v1/kiln/leases). Pick the month with the arrows. Each row names the machine (a machine you deleted stays in the list with its name and "deleted"), who leased it, when it started and ended or how long is left, how it ended (time ran out, ended early, main process exited, deleted, or Kiln could not run it so everything came back), the minutes used of those leased, the GiB-hours and credits it took, and what came back.

What happens at the end time

At expires_at the lease ends, whether the machine is running or has already exited. The machine is not deleted: it goes back to saved.

  • A main process or command still running is killed.
  • The files and the disk are gone, and the token stops working. Anything you did not export is lost.
  • Open streams and terminals end with a "lease expired" error.
  • The event kiln.machine.expired is sent.
  • The definition stays: name, size, disk, start sequence, start directory, environment names and run identity. Its default code (intake) is kept too. Start it again with new minutes.
  • The machine's log stays readable for 7 days after the lease ended (the last 10 MiB).

A job run is different: its machine is deleted when its lease ends, because the job is the saved definition.

To keep working, start the machine again. To keep results, export them before the end time.