** Description changed:

  [ Impact ]
  
  Ceph performs much better when I/O is 4k-aligned otherwise it has to
  read the 4k from disk, modify and write it again. Linux guests generally
  submit 4k-aligned I/O, however Windows guests generally submit
  512b-aligned I/O. This can lead to significantly degraded performance
  for Openstack Windows guests when using the Ceph RBD backend.
  
  This SRU backports upstream patches[0-2] which enable hinting the
  logical block size of cinder devices to Nova and which in turn allows
  the Windows guest to perform 4k-aligned I/O.
  
  [ Test Plan ]
  
- 1. Deploy openstack with cinder enabled and the ceph backend
+ 1. Deploy OpenStack with Cinder enabled and the Ceph backend.
  
- 2. Create a new volume and ensure that the blocksize is not passed to
- libvirt
+ 2. Create a test volume and a test VM, then attach the volume:
+ ------
+ openstack volume create testvol --size 2
+ openstack server create testvm \
+     --image jammy --flavor m1.small \
+     --network private --wait
+ openstack server add volume testvm testvol
+ ------
  
- 3. Create a new volume with the disk_geometry option and ensure that the
- block size is properly passed to libvirt
+ 3. Get the libvirt domain name of the VM:
+ ------
+ openstack server show testvm -f value -c OS-EXT-SRV-ATTR:instance_name
+ ------
+ 
+ 4. Check the disk block size. On the nova-compute machine
+ ------
+ sudo cat /var/run/libvirt/qemu/<instance_name>.xml | \
+     yq -p xml '.domstatus.domain.devices.disk[1].blockio'
+ ------
+ 
+ Expected Output
+ ---------------
+ The output is empty showing that the volume disk has no blockio element, so 
no block size is passed to libvirt.
+ This is the current behavior and the patch should not change it.
+ ---------------
+ 
+ 5. On the cinder-volume machine, set disk_geometry for the Ceph backend and 
restart the service:
+ ------
+ sudo crudini --set /etc/cinder/cinder.conf cinder-ceph disk_geometry 512e
+ sudo systemctl restart cinder-volume
+ ------
+ 
+ 6. Detach and reattach the volume so that the libvirt XML is regenerated:
+ ------
+ openstack server remove volume testvm testvol
+ openstack server add volume testvm testvol
+ ------
+ 
+ 7. Repeat the check from step 4 on the nova-compute machine:
+ ------
+ sudo cat /var/run/libvirt/qemu/<instance_name>.xml | \
+     yq -p xml '.domstatus.domain.devices.disk[1].blockio'
+ ------
+ 
+ Expected Output
+ ------
+ +@logical_block_size: "512"
+ +@physical_block_size: "4096"
+ ------
+ 
+ Output without patch
+ -----
+ -----
  
  [ Where problems could occur ]
  
  * Virtual disks may not support setting block size [0]. As a result, setting 
the disk_geometry on LUN drives may cause errors in Nova. This is mitigated by 
leaving the disk_geometry option unset by default and allowing users to opt in 
on a driver by driver basis.
-     * This has already been surfaced and addressed by the second patch of the 
series [2].
+     * This has already been surfaced and addressed by the second patch of the 
series [2].
  
  [ Other Info ]
  
  * As noted in [0], for existing volumes, the libvirt xml will need to be 
regenerated for the effects to be seen e.g., by reattaching the volume. See the 
release-notes for the patch [1] for more details.
-     * A corollary of the above, after some discussion with @mruffell, its 
probably best to backport this to interim releases as well as LTS, to minimize 
the number of times this detach/re-attach process needs to be carried out.
+     * A corollary of the above, after some discussion with @mruffell, its 
probably best to backport this to interim releases as well as LTS, to minimize 
the number of times this detach/re-attach process needs to be carried out.
  
  [0]: https://bugs.launchpad.net/bugs/2127196
  [1]: https://review.opendev.org/c/openstack/cinder/+/658283
  [2]: https://review.opendev.org/c/openstack/cinder/+/975540

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2165345

Title:
  [SRU] Allow 4k aligned IO for windows guests

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/2165345/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to