On Sat, Jan 18, 2020 at 12:08:48PM +0100, Gionatan Danti wrote: > Il 18-01-2020 00:42 Darrick J. Wong ha scritto: > > How many fragments, and how big of a sparse file? > > A just installed CentOS 8 guest using a 20 GB sparse file vdisk had about > 2000 fragments. > > After running "fio --name=test --filename=test.img --rw=randwrite --size=4G" 4GB / 1M extents == 4096, which is probably the fs blocksize :) I wonder, do you get different results if you set an extent size hint on the dir before running fio? I forgot(?) to mention that if you're mostly dealing with sparse VM images then you might as well set a extent size hint and forego delayed allocation because it won't help you much. --D > for about 30 mins, it ended with over 1M fragments/extents. At that point, > reflinking that file took over 2 mins, and unlinking it about 4 mins. > > I understand fio randwrite pattern is a worst case scenario; still, I think > the results are interesting and telling for "aged" virtual machines. > > As a side note, a just installed Win2019 guest backed with an 80 GB sparse > file had about 18000 fragments. > Thanks. > > -- > Danti Gionatan > Supporto Tecnico > Assyoma S.r.l. - www.assyoma.it > email: g.danti@xxxxxxxxxx - info@xxxxxxxxxx > GPG public key ID: FF5F32A8