Guides

Cores and memory

Give a machine up to 512 cores and more than 16 GiB of RAM, and see which core module Warm64 picks for each size.

Cores

warm-system-aarch64 ... -smp 4

-smp works as in QEMU, with its topology options (sockets, clusters, cores, threads) and its limits. The virt machine takes up to 512 CPUs, and more than 8 need a GICv3 (-M virt,gic-version=3), which QEMU picks on its own if you don't name one. With more than one core, each guest core runs on its own host thread, so a four-core guest keeps four host cores busy. Linux starts the extra cores through PSCI.

Note In a browser, more than one core needs shared memory, which browsers give only to cross-origin-isolated pages. Serve the page with Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp. See Embedding in a web page.

Extra cores speed up parallel work, up to the number of cores the host has. They don't make a Linux boot faster, since the boot runs mostly on one core. Guest cores beyond the host's count have to share its cores, and they slow each other down. Linux does bring up 64 cores on an 8-core Mac, but they run slowly enough that it reports soft lockups.

Memory

warm-system-aarch64 ... -m 2G

The default is QEMU's 128 MiB, and most distributions want 512 MiB or more. Warm64 chooses a core module from the RAM and the number of cores, and the host loads it by name (Core modules):

MachineCore
One core, RAM up to about 1.5 GiBwarm64
One core, more RAMwarm64-memory64: 64-bit WebAssembly memory.
More than one core, up to about 1.5 GiB in allwarm64-threads: one host thread per guest core.
More than one core, more RAMwarm64-memory64-threads

"In all" means the RAM plus about 34 MiB for each core. The 32-bit cores are the faster ones.

Beyond 16 GiB

In V8, a single WebAssembly memory holds at most 16 GiB. Beyond that, Warm64 puts the rest of the RAM in additional memories, and the guest still sees one contiguous block of RAM. A 20 GiB guest boots Alpine.

Warning Safari supports neither 64-bit WebAssembly memory nor multiple memories. In Safari, keep guests within the 32-bit cores (about 1.5 GiB); larger guests need Chrome, Firefox or Node.

The CPU

Every core presents the model -cpu names. The models are QEMU's, each with the identity and features QEMU gives it, and cortex-a76 suits most guests. max offers the guest every feature the core has, including pointer authentication and SVE, at a small cost in speed. See CPU.

Exception levels

Linux boots at EL1, as in QEMU. -M virt,virtualization=on boots it at EL2 with the Virtualization Host Extensions.

See also