From 364a9bfc9d26734de78c57b1609c20e62d1d9f22 Mon Sep 17 00:00:00 2001 From: Alexander Noskov Date: Fri, 28 Feb 2020 10:10:38 -0600 Subject: [PATCH] Add unsafe profile for disk VM's Change-Id: Ia6666ea124bf0f238addba56bb6466318903206b --- tools/deployment/seaworthy-virt/README.rst | 1 + tools/deployment/seaworthy-virt/airship_gate/lib/virsh.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tools/deployment/seaworthy-virt/README.rst b/tools/deployment/seaworthy-virt/README.rst index 77348e4a1..471bce61d 100644 --- a/tools/deployment/seaworthy-virt/README.rst +++ b/tools/deployment/seaworthy-virt/README.rst @@ -156,6 +156,7 @@ that will be created as file-backed volumes. * io_profile - One of the below I/O configurations * fast - In the case of a VM disruption, synchronous I/O may be lost. Better throughput. * safe - Synchronous I/O fully written to disk, slower throughput. + * unsafe - Host are caching all disk IO, and sync requests from VM are ignored. Maximum performance. * bootstrap - For VMs that are bootstrapped by the framework, not Airship, use this disk * format - For VMs that are bootstrapped by the framework, describe how the disk should be formatted and mounted when desired. diff --git a/tools/deployment/seaworthy-virt/airship_gate/lib/virsh.sh b/tools/deployment/seaworthy-virt/airship_gate/lib/virsh.sh index f5371046b..c5302495f 100644 --- a/tools/deployment/seaworthy-virt/airship_gate/lib/virsh.sh +++ b/tools/deployment/seaworthy-virt/airship_gate/lib/virsh.sh @@ -444,6 +444,9 @@ vm_create_vols(){ elif [[ "$io_prof" == "safe" ]] then DISK_OPTS="bus=virtio,cache=directsync,discard=unmap,format=qcow2,io=native" + elif [[ "$io_prof" == "unsafe" ]] + then + DISK_OPTS="bus=virtio,cache=unsafe,format=qcow2" else DISK_OPTS="bus=virtio,format=qcow2" fi