Description of problem:
If qemu is configured with large amounts of hotpluggable memory (say > 256G) it takes a very long time to start the guest.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Start qemu with
/usr/libexec/qemu-kvm -M pseries -m 512M,maxmem=XXXXX ...
For maxmem=512G, 1024G, 2048G
2. Time how long until qemu starts booting the guest
<10s startup in all cases.
The root cause is that qemu constructs a DR connector object internally for every 256M of hotpluggable memory. The current algorithm for doing so is O(n^3).
I've posted a patch upstream which improves adding the connectors to O(n^2). This brings startup with 2048G to an acceptable 4s, unfortunately 4096G (RHEV's usual limit) is still ~35s.
I have a patch for this in the works, but I'll need a bunch of ack flags ASAP if I'm to get it in for the next snapshot.
I've made draft brew build with the partial fix for slow startup at:
(In reply to David Gibson from comment #5)
> I've made draft brew build with the partial fix for slow startup at:
Test with the above build, boot guest with the following configuration:
256G: ~ 10s
2048G: After 5s, hit the issue in bug 1263039 comment 4.
And this bug could be reproduced on the official build qemu-kvm-rhev-2.3.0-22.el7.ppc64le:
256G: ~ 10s
1024G: 2~3 mins
2048G: after about 27 mins, hit bug 1263039.
Anyway, this qemu-kvm build fixes the original issue in this bug.
Fix included in qemu-kvm-rhev-2.3.0-24.el7
Verified this bug with the following version:
Test with the same command line with comment 2 and the result is:
256G: ~ 10s
512G: ~10s without guest desktop (with guest desktop, it consumes 20+ seconds)
1024G: ~10s without guest desktop (with guest desktop, it consumes 20+ seconds)
According to bug 1263039 comment6, we limit the maxmem to 1T.
So according to comment 8 and the above result, I will set the status to VERIFIED.
------- Comment From firstname.lastname@example.org 2015-11-30 15:17 EDT-------
reverse mirror of RHBZ 1262143 - VM startup is very slow with large amounts of hotpluggable memory
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.