[pve-devel] qemu : add disk option for physical/logical block (could improve windows guest performance wit ceph)

Alexandre DERUMIER aderumier at odiso.com
Thu May 16 05:24:58 CEST 2019


Hi,

A guy have reported on ceph mailing, a feature which is helping windows guest with ceph

https://review.opendev.org/#/c/658283/ 

"Add support for configuring the physical_block_size and
logical_block_size hints of Cinder RBD volumes using the new
'disk_geometry' configuration option.

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. When hinted with physical_block_size=4096 Windows
guests will switch to submitting most I/O as 4k-aligned based on both
testing and information from Microsoft KB 2510009.
...

"

the qemu command line options are

physical_block_size
logical_block_size

-device virtio-blk-pci,id=data1,drive=data_image1,bus=pci.0,physical_block_size=4096,logical_block_size=512 


in openstack,they propose to make a combo option "disk_geometry".



https://review.opendev.org/#/c/658283/2/releasenotes/notes/rbd-disk-geometry-7753e2e3bc44cc3d.yaml 

cfg.StrOpt('disk_geometry', default='512e', choices=['512', '512e', '4k'], 
help='Configure the reported geometry (physical, logical) ' 
'block size as 512 native (512/512), ' 
'512e emulated (4096/512) or 4k native (4096/4096). ' 
'This hints to the operating system the desired size ' 
'of I/O updates submitted to the disk. Windows systems ' 
'send 512b-aligned I/O by default (unlike Linux which ' 
'typically submits 4k-aligned I/O). Setting this option ' 
'to 512e may allow the operating system to submit a 4k ' 
'operation instead which will prevent Ceph needing to do ' 
'an expensive read-modify-write of the smaller operation. ' 
'512e is the recommended setting as 4k native can cause ' 
'compatability issues with some software and operating ' 
'system versions according to Microsoft KB 2510009.'), 




could we add this as disk option ?  (not defined by default).

I'm going to do some benchmark next week.




More information about the pve-devel mailing list