summaryrefslogtreecommitdiff
path: root/nova
diff options
context:
space:
mode:
authorKashyap Chamarthy <kchamart@redhat.com>2019-03-14 14:28:12 +0100
committerKashyap Chamarthy <kchamart@redhat.com>2019-03-21 14:17:22 +0100
commit44edfa045c69b18b0a991475cb9c1d87b5941d52 (patch)
treea34af19d6bd2eb04d9a00bf6d6fefeb57de0d402 /nova
parentb9dc86d8d646472195070022ff7ae4c372bef4ca (diff)
downloadnova-44edfa045c69b18b0a991475cb9c1d87b5941d52.tar.gz
libvirt: vzstorage: Use 'writeback' QEMU cache mode
The 'writethrough' cache mode is terribly slow. Use the saner alternative, "writeback" cache mode. See further details in the documentation of change Ibe236988af2 ("libvirt: Use 'writeback' QEMU cache mode when 'none' is not viable). Related-Bug: #1818847 Change-Id: I5aae681bc8e8feb7703a89f91b942360dd69c35d Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
Diffstat (limited to 'nova')
-rw-r--r--nova/tests/unit/virt/libvirt/volume/test_vzstorage.py2
-rw-r--r--nova/virt/libvirt/volume/vzstorage.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/nova/tests/unit/virt/libvirt/volume/test_vzstorage.py b/nova/tests/unit/virt/libvirt/volume/test_vzstorage.py
index ec0596d7a4..822ba08d6b 100644
--- a/nova/tests/unit/virt/libvirt/volume/test_vzstorage.py
+++ b/nova/tests/unit/virt/libvirt/volume/test_vzstorage.py
@@ -110,4 +110,4 @@ class LibvirtVZStorageTestCase(test_volume.LibvirtVolumeBaseTestCase):
self.assertEqual('file', conf.source_type)
self.assertEqual(file_path, conf.source_path)
self.assertEqual('raw', conf.driver_format)
- self.assertEqual('writethrough', conf.driver_cache)
+ self.assertEqual('writeback', conf.driver_cache)
diff --git a/nova/virt/libvirt/volume/vzstorage.py b/nova/virt/libvirt/volume/vzstorage.py
index d8b971e954..85ffb45076 100644
--- a/nova/virt/libvirt/volume/vzstorage.py
+++ b/nova/virt/libvirt/volume/vzstorage.py
@@ -71,7 +71,7 @@ class LibvirtVZStorageVolumeDriver(fs.LibvirtBaseFileSystemVolumeDriver):
self).get_config(connection_info, disk_info)
conf.source_type = 'file'
- conf.driver_cache = 'writethrough'
+ conf.driver_cache = 'writeback'
conf.source_path = connection_info['data']['device_path']
conf.driver_format = connection_info['data'].get('format', 'raw')
return conf