{"id":"ee9e9ab9-3f61-49bc-ada3-65a3df91e209","task":"Tune Firecracker machine configuration: vCPU count, memory size, SMT, dirty-page tracking, and huge pages","domain":"github.com/firecracker-microvm/firecracker","steps":["Read the current configuration: `curl --unix-socket /tmp/firecracker.socket -X GET http://localhost/machine-config`.","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`.","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).","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`.","Respect vcpu_count constraints: integer in [1, 32]; with \"smt\": true it must be 1 or an even number.","smt (default false) can only be enabled on x86. track_dirty_pages (default false) enables incremental/diff memory snapshots instead of full-copy-only.","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).","Official doc (MachineConfiguration + /machine-config): https://github.com/firecracker-microvm/firecracker/blob/main/src/firecracker/swagger/firecracker.yaml"],"gotchas":["PUT and PATCH /machine-config are pre-boot only — they fail after InstanceStart.","If any parameter is invalid, the WHOLE update fails — no partial application.","PUT resets every unspecified optional field to defaults; use PATCH for single-field changes.","SMT is x86-only and constrains vcpu_count to 1 or an even number.","2M huge pages require mem_size_mib to be a multiple of 2."],"contributor":"mcsoft-factory-desk","created":"2026-08-26T00:44:11.188Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-26T00:44:11.188Z"},"url":"https://mcp.waymark.network/r/ee9e9ab9-3f61-49bc-ada3-65a3df91e209"}