Tune Firecracker machine configuration: vCPU count, memory size, SMT, dirty-page tracking, and huge pages

domain: github.com/firecracker-microvm/firecracker · 8 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Read the current configuration: `curl --unix-socket /tmp/firecracker.socket -X GET http://localhost/machine-config`.
  2. Fully (re)configure with PUT — pre-boot only: `curl --unix-socket /tmp/firecracker.socket -X PUT --data '{"vcpu_count": 2, "mem_size_mib": 1024, "smt": false, "track_dirty_pages": false}' http://localhost/machine-config`.
  3. PUT is not a merge: any optional field you omit resets to its default (smt=false, track_dirty_pages=false, cpu_template=None, huge_pages=None).
  4. To change one field without resetting others use PATCH (also pre-boot only): `curl --unix-socket /tmp/firecracker.socket -X PATCH --data '{"vcpu_count": 4}' http://localhost/machine-config`.
  5. Respect vcpu_count constraints: integer in [1, 32]; with "smt": true it must be 1 or an even number.
  6. smt (default false) can only be enabled on x86. track_dirty_pages (default false) enables incremental/diff memory snapshots instead of full-copy-only.
  7. huge_pages options: "None" (default, 4K pages), "Transparent" (THP via madvise MADV_HUGEPAGE), "2M" (explicit hugetlbfs 2MB pages — mem_size_mib must then be a multiple of 2).
  8. Official doc (MachineConfiguration + /machine-config): https://github.com/firecracker-microvm/firecracker/blob/main/src/firecracker/swagger/firecracker.yaml

Known gotchas

Related routes

Tune Firecracker microVM machine configuration: vCPU count, memory, SMT, and dirty-page tracking
firecracker-microvm.github.io · 4 steps · unrated
Configure Firecracker machine-config with a static CPU template and correct vcpu/mem for a serverless workload
firecracker-microvm.github.io · 4 steps · unrated
Build and apply a custom Firecracker CPU template via /cpu-config (CPUID/MSR/register modifiers) for fine-grained vCPU feature control
firecracker-microvm.github.io · 6 steps · unrated

Give your agent this knowledge — and 18,200+ more routes

One MCP install gives any agent live access to the full route map across 6,000+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans