crc-org / crc

CRC is a tool to help you run containers. It manages a local OpenShift 4.x cluster, Microshift or a Podman VM optimized for testing and development purposes
https://crc.dev
Apache License 2.0
1.27k stars 243 forks source link

Hyperkit: use raw disk format instead of qcow2 #1341

Open guillaumerose opened 4 years ago

guillaumerose commented 4 years ago

Few years ago, Apple started to ship macOS with APFS. It supports sparse files allowing us to use raw file format.

According to Docker Desktop release notes, we can expect a factor 2 for disk performance:

For systems running APFS on SSD on High Sierra, use raw format VM disks by default. This improves disk throughput (from 320MiB/sec to 600MiB/sec in dd on a 2015 MacBook Pro) and disk space handling.

Needed changes:

cfergeau commented 4 years ago

There was a short attempt in snc which was then reverted https://github.com/code-ready/snc/commit/34ca27cf5cbd84deaf8900639d47397d67eb2be6 Apart from minor snc/machine-driver-hyperkit bugs, there were issues with crc not dealing correctly with sparseness, in particular during the VM image copy we do on start, which made startup much longer than before, in addition to losing sparseness benefits.

gbraad commented 4 years ago

The PR and revert is recorded as: https://github.com/code-ready/snc/issues/206 an https://github.com/code-ready/snc/issues/208. I mentioned them in the previous snc related issue. It was unfortunate to see an optmistic merge which then gets reverted without clearly recording the cause and what is needed in future to solve this. This is why I added this notes and issues.