Skip to content

Commit e777817

Browse files
committed
perf(quickemu): improve disk I/O defaults (cache,aio)
- add cache=writeback and aio=threads to DRIVE_OPTIMISATIONS - retain existing optimisations: discard=unmap,detect-zeroes=unmap - improve write performance (host writeback caching) and async I/O parallelism via thread-based AIO - follows Proxmox/libvirt QEMU disk best practices; researched for macOS but applies to all guests Signed-off-by: Martin Wimpress <martin@wimpress.org>
1 parent 9b54b36 commit e777817

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

quickemu

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,8 +1887,9 @@ function vm_boot() {
18871887

18881888
# Add the disks
18891889
# - https://turlucode.com/qemu-disk-io-performance-comparison-native-or-threads-windows-10-version/
1890-
# Optimise disk I/O: enable TRIM/discard and zero detection for thin provisioning
1891-
DRIVE_OPTIMISATIONS="discard=unmap,detect-zeroes=unmap"
1890+
# Optimise disk I/O: enable TRIM/discard, zero detection for thin provisioning,
1891+
# writeback caching and threaded async I/O
1892+
DRIVE_OPTIMISATIONS="discard=unmap,detect-zeroes=unmap,cache=writeback,aio=threads"
18921893

18931894
if [[ "${boot}" == *"efi"* ]]; then
18941895
QCOW2CODE=$(is_firmware_qcow2 "${EFI_CODE}")

0 commit comments

Comments
 (0)