Skip to content
GigadriveDocs

Limits and pricing

microVM sizes, timeouts and per-plan limits, and how active CPU and provisioned memory are metered and priced.

A microVM is billed for the CPU it actually uses and for the memory it holds while it runs, at the same rates as Functions. Your plan sets how large a microVM can be, how long it can live and how many run at once.

Pricing

MetricKeyWhat it measuresPrice
Active CPUmicrovm_active_cpu_msCPU time your commands use, summed across vCPUs€0.13 per CPU-hour
Provisioned memorymicrovm_memory_mb_msThe memory you chose, for as long as the microVM is starting or running€0.012 per GiB-hour
Snapshot storagemicrovm_snapshot_bytes_hoursThe stored size of paused microVMs and snapshots, over time€0.02 per GB-month after 5 GB-months included

Each billing period includes 4 CPU-hours and 360 GiB-hours of microVM usage, separate from the Function allowances. On Pro, both scale with the number of seats, like every other allowance on Plans.

A paused microVM accrues no CPU and no memory, only snapshot storage.

Active CPU follows the same rule as for Functions: a microVM that waits for input, a download or a timer accrues almost none. Provisioned memory accrues on the clock, busy or idle, so a microVM you forget to stop costs memory until its timeout ends it. There is no separate charge for the disk.

microVM usage appears on its own invoice lines, separate from Function usage. Usage metrics explains how usage is aggregated, and Spend caps how a cap stops spending.

When an organization's compute is paused by a spend cap, or on Starter once the microVM allowance is used up, its running microVMs stop with stopReason: "billing_suspended" and new creates and image builds answer 402 with billing_suspended. A used-up microVM allowance stops only microVMs; Functions keep serving.

Example

Past the included allowance, a microVM with 2 GiB of memory that runs for 10 minutes and uses one minute of CPU costs:

  • Memory: 2 GiB for 1/6 of an hour is 0.33 GiB-hours, or €0.004.
  • CPU: 1/60 of a CPU-hour, or €0.0022.

About €0.006 in total.

Sizes

Set these when you create the microVM. Only the timeout can change afterwards, by extending it.

SettingFieldAllowedDefault
vCPUsvcpus1, 2 or 41
MemorymemoryMb512 MiB to 8 GiB2048 (2 GiB)
DiskdiskMb1 GiB to 50 GiB10240 (10 GiB)
TimeouttimeoutMs (REST), timeout (TypeScript)Up to your plan's maximum lifetime5 minutes

Your plan can cap each of these lower; see the next section. The disk holds everything written in the microVM, including installed packages, and is deleted when the microVM stops.

Plan limits

LimitStarterProEnterprise
microVMs running at once550500
vCPUs per microVM244
Memory per microVM4 GiB8 GiB8 GiB
Disk per microVM10 GiB50 GiB50 GiB
Maximum lifetime1 hour5 hours24 hours
Custom images350500
Snapshots101001000
Snapshot retention7 days30 days90 days
Paused microVM retention1 day7 days30 days

microVMs running at once count across your whole organization, including those still waiting to start. A create that would go past a limit is refused, and nothing is billed for it:

  • A size or timeout above your plan's limit answers 403 with plan_limit_exceeded.
  • One microVM more than your plan runs at once answers 429 with quota_exceeded. Stop microVMs you no longer need to make room.

Timeouts

Every microVM stops on its own when its timeout ends. Extend it while it runs with vm.extendTimeout(), gigadrive microvms extend or POST /microvms/{id}/timeout:

curl -X POST https://api.gigadrive.network/microvms/0199a7c4-5b1e-7c3d-9f20-333333333333/timeout \
  -H "Authorization: Bearer $GIGADRIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"timeoutMs":1800000}'

The new timeout counts from the moment you extend, not from the old expiry, and the response carries the new expiresAt. In TypeScript, extendTimeout also takes a string such as '30m'. Only a running microVM can be extended, and an extension cannot take its running time past your plan's maximum lifetime. Time a microVM spends paused does not count toward it.

Pause instead of stop

Create the microVM with onTimeout: "pause" to keep its state when the timeout ends. It is then paused instead of stopped: its memory, processes and files are kept for your plan's pause retention, and it accrues only snapshot storage.

curl -X POST https://api.gigadrive.network/microvms \
  -H "Authorization: Bearer $GIGADRIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"image": "node22", "timeoutMs": 600000, "onTimeout": "pause"}'

When you resume it, it runs for its full timeoutMs again, as long as its running time stays within your plan's maximum lifetime. If its pause cannot complete, it stops at the timeout as usual. The response shows the setting as onTimeout, and stop is the default.

Other limits

LimitValue
Exposed ports per microVM8
Environment variables at create256
Metadata64 entries, keys up to 64 characters, values up to 512
A command you wait for over REST60 seconds by default, 10 minutes at most
Output returned by a waited command1 MiB of each of stdout and stderr
Output kept per commandThe last 8 MiB of each of stdout and stderr
Commands kept per microVM256
One wait call on a detached command60 seconds
Open preview connections256 HTTP requests and 256 WebSocket connections per microVM
Dockerfile for a custom image256 KiB

Command and file calls count against the larger budget that File Storage uploads and queue messages use, rather than the general API budget. Creating, listing and stopping microVMs use the general budget. See Rate limits.