How fast is a macOS VM, and how small could it be?

How fast is a macOS VM, and how small could it be?

macOS 虚拟机运行速度有多快?最小配置要求是多少?

In my review of macOS virtualisation on Apple silicon, I quoted performance figures that were obtained some time ago, and didn’t consider minimum specifications for a usable VM. Given current interest in running a VM on a MacBook Neo, I thought it would be worth examining these afresh, from macOS Tahoe. 在我之前关于 Apple Silicon 上 macOS 虚拟化的评测中,我引用的性能数据是较早前获取的,且未考虑可用虚拟机的最低配置要求。鉴于目前人们对在 MacBook Neo 上运行虚拟机的兴趣,我认为有必要基于 macOS Tahoe 对这些数据进行重新审视。

How fast? Using the same host, a Mac mini M4 Pro, this time running macOS 26.4.1 on its 14 cores (10 P + 4 E) with 48 GB RAM and a 2 TB internal SSD, Geekbench 6.7.1 scores are slightly faster, on both the host and a guest given 5 virtual cores and 16 GB of virtual RAM: single-core CPU VM 3,855, host 3,948 multi-core CPU VM 13,222, host 23,342 GPU Metal VM 106,896, host 111,970 Neural engine CoreML VM 5,291, 8,577, 6,877; host 5,973, 41,251, 56,616 The last of those gives single precision, half-precision and quantised test results, in that order. 速度如何?使用同一台主机 Mac mini M4 Pro(搭载 14 核 CPU:10 个性能核 + 4 个能效核,48 GB 内存,2 TB 内置 SSD),运行 macOS 26.4.1,Geekbench 6.7.1 的测试分数略有提升。在分配 5 个虚拟核心和 16 GB 虚拟内存的情况下,虚拟机与主机的对比数据如下:单核 CPU 虚拟机 3,855 分,主机 3,948 分;多核 CPU 虚拟机 13,222 分,主机 23,342 分;GPU Metal 虚拟机 106,896 分,主机 111,970 分;神经网络引擎 CoreML 虚拟机分别为 5,291、8,577、6,877 分,主机分别为 5,973、41,251、56,616 分。最后这组数据依次代表单精度、半精度和量化测试结果。

Comparing CPU single-core figures, the VM runs effectively at 98% of the speed of the host. Comparison between the multi-core CPU results is difficult, as the host has more than twice the number of cores, although four of them are E cores. However, given that the host has twice the number of P cores alone, the VM appears to perform rather better than the host on this test. GPU performance isn’t quite as good, with the VM delivering performance of 95% of that of the host, when the latter isn’t contending for the GPU as well. The only real disappointment here is the virtual neural engine, which performs far slower than the host on half-precision and quantised tests. We might hope that macOS would process AI tasks using the CPU and GPU rather than the neural engine, when running in a VM. 对比 CPU 单核数据,虚拟机的运行速度实际上达到了主机的 98%。多核 CPU 结果的对比则较为复杂,因为主机的核心数是虚拟机的两倍多(尽管其中 4 个是能效核)。然而,考虑到主机仅性能核的数量就是虚拟机的两倍,虚拟机在此项测试中的表现似乎比主机更好。GPU 性能稍逊一筹,在主机未占用 GPU 资源的情况下,虚拟机的性能约为宿主机的 95%。唯一令人失望的是虚拟神经网络引擎,其在半精度和量化测试中的表现远慢于主机。我们或许可以期待,当 macOS 在虚拟机中运行时,系统能更多地利用 CPU 和 GPU 来处理 AI 任务,而非依赖神经网络引擎。

How small? With the arrival of the MacBook Neo, some wondered whether it would be able to run VMs. While there’s no doubt it should make a good host for Linux, I doubted whether it would be able to do anything useful with macOS in a VM. I was wrong. To assess how small a macOS VM could be, I ran the same VM of macOS 26.4.1 on progressively smaller CPU core and memory allocations, using my virtualiser Viable. The VM’s display window was set to a standard 1600 x 1000, and I ran Safari through its paces and performed some lightweight everyday tasks, including Storage analysis in Settings. 配置能有多小?随着 MacBook Neo 的发布,一些人好奇它是否能运行虚拟机。虽然毫无疑问它能成为 Linux 的优秀宿主机,但我曾怀疑它是否能流畅运行 macOS 虚拟机。我错了。为了评估 macOS 虚拟机的最小配置,我使用我的虚拟化工具 Viable,在逐步减少 CPU 核心数和内存分配的情况下运行了同一个 macOS 26.4.1 虚拟机。虚拟机的显示窗口设置为标准的 1600 x 1000,我对其进行了 Safari 压力测试,并执行了一些轻量级的日常任务,包括在“设置”中进行存储空间分析。

Starting with 4 virtual cores and 8 GB vRAM, where the VM ran perfectly briskly with around 5 GB of memory used, I stepped down to 3 cores and 6 GB, to discover that memory usage fell to 3.9 GB and everything worked well. With just 2 cores and 4 GB of memory only 3.1 GB of that was used, and the VM continued to handle those lightweight tasks normally. 从 4 个虚拟核心和 8 GB 虚拟内存开始,虚拟机运行非常流畅,内存占用约为 5 GB;随后我将其降至 3 个核心和 6 GB 内存,发现内存占用降至 3.9 GB,且一切运行良好。在仅分配 2 个核心和 4 GB 内存的情况下,内存占用仅为 3.1 GB,虚拟机依然能正常处理这些轻量级任务。

The only thing to be careful of when creating VMs on Macs with small internal SSDs is their size. Any macOS VM significantly smaller than 50 GB isn’t going to be able to update its macOS, and for comfort and safety you should aim for at least 60 GB. Fortunately, APFS comes to your aid here, as VMs are stored as sparse files, and a basic 100 GB VM should only require about 54 GB on disk. That would be better accommodated on the MacBook Neo with a 512 GB SSD. Although not the place to try running your LLM, a macOS VM given only 2 virtual cores and 4 GB of memory, as should be feasible in a MacBook Neo, is thoroughly usable and capable of everyday tasks. 在内置 SSD 容量较小的 Mac 上创建虚拟机时,唯一需要注意的是磁盘空间大小。任何远小于 50 GB 的 macOS 虚拟机都将无法更新系统,为了稳妥起见,建议至少预留 60 GB。幸运的是,APFS 文件系统在此提供了帮助,因为虚拟机以稀疏文件(sparse files)形式存储,一个基础的 100 GB 虚拟机在磁盘上实际仅占用约 54 GB。这对于配备 512 GB SSD 的 MacBook Neo 来说更容易容纳。虽然它不适合运行大语言模型(LLM),但仅分配 2 个虚拟核心和 4 GB 内存的 macOS 虚拟机(在 MacBook Neo 上完全可行)已经非常实用,足以胜任日常任务。