----- Original Message ----- > From: "Alberto Garcia" <be...@igalia.com> > To: "qemu-discuss" <qemu-discuss@nongnu.org> > Sent: Wednesday, September 25, 2019 8:05:50 AM > Subject: Re: Large qcow2 performance
> On Tue, Sep 24, 2019 at 02:45:10PM -0500, Andrew Martin wrote: >> Hi Berto, >> >> Thank you for the detailed explanation! It is also worth noting that >> I am planning on hosting this qcow2 on a ZFS dataset (and ZFS does >> some in-memory caching with the ARC as well); does that have an >> impact on performance? >> >> Moreover, would setting the cluster_size to match the ZFS recordsize >> be advisable? >> https://jrs-s.net/2018/03/13/zvol-vs-qcow2-with-kvm/ > > I don't have much experience with ZFS so I'm not the best to provide > advice, but for the record I see that the ZFS recordsize is at most > 128KB, whereas qcow2 supports clusters up to 2MB. > > A 6TB qcow2 image can hold up to 384MB of L2 metadata if you use 128KB > clusters. 384MB would be the largest possible size of the L2 cache, > although in practice you'll probably be fine with much less, but how > much less depends on your usage pattern. > > Doubling the cluster size halves the size of the L2 metadata (and > therefore the maximum needed cache size) but, as I said earlier, it > makes allocation slower and increases the disk usage. > > Berto Hi Berto, That makes sense, thanks for the additional details. Andrew