Description of problem: Preallocation of images is slow as zero'es are written to the image that is created. "qemu-img create" supports flags 'falloc', 'metadata' and 'full' Users should be provided option to pass these flags while preallocating the images Version-Release number of selected component (if applicable): 4.0 How reproducible: NA Steps to Reproduce: NA
From mailing list discussions seems the real value is in switching our 'dd' implementation to using 'falloc' in the qemu-img create command line. It is not exactly a 1:1 mapping (the fact the file system marked entries as allocated has nothing to do with what the underlying storage has performed) - but so is the case with writing zeros... The metadata allocation for qcow2 is discussed elsewhere (but also, unless file-based, may be of little value unfortunately).
This RFE has come in very late. Can you give some background on this request? Do you expect this to happen for 4.1?
(In reply to Yaniv Dary from comment #2) > This RFE has come in very late. Can you give some background on this request? > Do you expect this to happen for 4.1? Customer was experiencing poor performance in pre-allocating disk images and on digging further, we realise the preallocation flags are not used. If not feasible for 4.1, please move it to another release
Hi Sahina, How can we test that this new option to pass flags to qemu-img?
(In reply to Raz Tamir from comment #7) > Hi Sahina, > > How can we test that this new option to pass flags to qemu-img? I don't this fix uses qemu-img create, but calls posix_fallocate to preallocate. Denis can provide more info
Raz, we should test this feature by timing creation of a new preallocated disk on file storage. The result differ, based on the underlying file system: - NFS 3,4,4.1 - use emulation, should be about 1.5X faster compared with older version using dd (we cannot guarantee exact number). - NFS 4.2,glusterfs,localfs - should take no time, using fallocate() This is basically a user experience thing, so we should test this from the point of view of a user.
(In reply to Sahina Bose from comment #8) > (In reply to Raz Tamir from comment #7) > > Hi Sahina, > > > > How can we test that this new option to pass flags to qemu-img? > > I don't this fix uses qemu-img create, but calls posix_fallocate to > preallocate. Yes, we use posix_fallocate here. Nir provided a good approach to test that issue.
(In reply to Denis Chaplygin from comment #14) > Could you please try nfsv4, glusterfs or any local fs? Nfsv3 doesn't > supports that syscall. > > It definitely works with gluster, so i recommend verifying on it. Created the same 10G with Glusterfs and the latest code: >>>>>> It took 7 seconds Verified with the following code: --------------------------------------------------- ovirt-engine-4.2.0-0.0.master.20170813134654.gitaee967b.el7.centos.noarch vdsm-4.20.2-77.gite43f776.el7.centos.x86_64 Moving to VERIFIED!
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017. Since the problem described in this bug report should be resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.