Firecracker.MachineConfig (firecracker v0.1.0)
View SourceConfigures the virtual machine's hardware specifications in Firecracker.
This module defines core hardware characteristics of the VM including CPU count, memory size, and various performance-related features.
Fields
:mem_size_mib- Required. Memory size in mebibytes (MiB):vcpu_count- Required. Number of virtual CPUs to allocate:smt- Optional. Whether to enable Simultaneous Multithreading:track_dirty_pages- Optional. Enable dirty page tracking for memory operations:huge_pages- Optional. Use huge pages for memory allocation ("None", "2M")
Post-boot Behavior
All configuration fields can be modified after boot.
Notes
- Memory size is specified in mebibytes (MiB), not megabytes
- vCPU count should match your workload requirements
- Disabling SMT can improve security at the cost of performance
- Dirty page tracking is useful for live migration scenarios
- Huge pages can improve memory performance for large VMs
Summary
Types
@type t() :: %Firecracker.MachineConfig{ applied?: boolean(), cpu_template: String.t() | nil, huge_pages: String.t() | nil, mem_size_mib: pos_integer(), smt: boolean() | nil, track_dirty_pages: boolean() | nil, vcpu_count: pos_integer() }