Am 02.11.2018 um 12:37 hat Nikolay Shirokovskiy geschrieben: > On 02.11.2018 13:23, Kevin Wolf wrote: > > Am 01.11.2018 um 12:32 hat Nikolay Shirokovskiy geschrieben: > >> Just set l2-cache-size to INT64_MAX for all format nodes of > >> qcow2 type in block node graph. > >> > >> AFAIK this is sane because *actual* cache size depends on size > >> of data being referenced in image and thus the total size of > >> all cache sizes for all images in disk backing chain will not > >> exceed the cache size that covers just one full image as in > >> case of no backing chain. > > > > This is not quite correct. > > > > Starting from qemu 3.1, INT64_MAX will add a cache that covers the whole > > image. Memory is only used if a cache entry is actually used, so if you > > never access the backing file, it doesn't really use any memory. > > However, the granularity isn't a single cluster here, but L2 tables. So > > if some L2 table contains one cluster in the overlay and another cluster > > in the backing file, and both are accessed, the L2 table will be cached > > in both the overlay and th backing file. > > So we can end up N times bigger memory usage for L2 cache in case > of backing chain comparing to single image? In the worst case, yes. Kevin -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list