On Wed, 2022-05-18 at 12:17 +0200, Igor Mammedov wrote: > On Tue, 17 May 2022 20:46:50 +0200 > Paolo Bonzini <pbonz...@redhat.com> wrote: > > > diff --git a/backends/hostmem.c b/backends/hostmem.c > > > index a7bae3d713..624bb7ecd3 100644 > > > --- a/backends/hostmem.c > > > +++ b/backends/hostmem.c > > > @@ -274,7 +274,7 @@ static void host_memory_backend_init(Object > > > *obj) > > > backend->merge = machine_mem_merge(machine); > > > backend->dump = machine_dump_guest_core(machine); > > > backend->reserve = true; > > > - backend->prealloc_threads = 1; > > > + backend->prealloc_threads = machine->smp.cpus; > > > } > > > > > > static void host_memory_backend_post_init(Object *obj) > > > > Queued, thanks. > > PS: > There is no good default in this case (whatever number is picked > it could be good or bad depending on usecase). > That is fair enough. What we observed, however, is that, with QEMU 5.2, starting a 1024G VM takes ~34s.
Then you just update QEMU to > 5.2 (and don't do/changing anything else) and the same VM now takes ~4m30s to start. If users are managing QEMU via Libvirt *and* have _at_least_ Libvirt 8.2, they can indeed set, e.g., <allocation mode='immediate' threads='NNN'/> (provided they can understand where the problem is, and figure out that this is the solution). If they have Libvirt < 8.2 (e.g., people/distros that have, say, QEMU 6.2 and Libvirt 8.0.0, or something like that), there's basically nothing they can do... Except perhaps command line passthrough [1], but that's really rather tricky! So, I personally don't know where any default should be set and how, but the above situation is not nice for users to have to handle. [1] https://libvirt.org/kbase/qemu-passthrough-security.html Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ ------------------------------------------------------------------- <<This happens because _I_ choose it to happen!>> (Raistlin Majere)
signature.asc
Description: This is a digitally signed message part