On Mon 17 Aug 2020 05:53:07 PM CEST, Kevin Wolf wrote: >> > Or are you saying that ZERO_RANGE + pwrite on a sparse file (= >> > cluster allocation) is faster for you than just the pwrite alone (= >> > writing to already allocated cluster)? >> >> Yes, 20% faster in my tests (4KB random writes), but in the latter >> case the cluster is already allocated only at the qcow2 level, not on >> the filesystem. preallocation=falloc is faster than >> preallocation=metadata (preallocation=off sits in the middle). > > Hm, this feels wrong. Doing more operations should never be faster > than doing less operations. > > Maybe the difference is in allocating 64k at once instead of doing a > separate allocation for every 4k block?
That's what I imagine, yes. I'll have a look at your patches and tell you. Berto