From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdIlr-0001vV-I3 for qemu-devel@nongnu.org; Wed, 21 Dec 2011 04:47:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdIll-0006hP-Th for qemu-devel@nongnu.org; Wed, 21 Dec 2011 04:47:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:30110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdIll-0006hE-N4 for qemu-devel@nongnu.org; Wed, 21 Dec 2011 04:47:29 -0500 Message-ID: <4EF1AB2B.8050800@redhat.com> Date: Wed, 21 Dec 2011 11:47:23 +0200 From: Ronen Hod MIME-Version: 1.0 References: <4EF0340C.9000005@redhat.com> <4EF09018.3010907@codemonkey.ws> In-Reply-To: <4EF09018.3010907@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] Migration convergence - a suggestion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On 12/20/2011 03:39 PM, Anthony Liguori wrote: > On 12/20/2011 01:06 AM, Ronen Hod wrote: >> Well the issue is not new, anyhow, following a conversation with Orit >> ... >> >> Since we want the migration to finish, I believe that the "migration >> speed" >> parameter alone cannot do the job. >> I suggest using two distinct parameters: >> 1. Migration speed - will be used to limit the network resources >> utilization >> 2. aggressionLevel - A number between 0.0 and 1.0, where low values >> imply >> minimal interruption to the guest, and 1.0 mean that the guest will be >> completely stalled. >> >> In any case the migration will have to do its work and finish given >> any actual >> migration-speed, so even low aggressionLevel values will sometimes >> imply that >> the guest will be throttled substantially. >> >> The algorithm: >> The aggressionLevel should determine the targetGuest%CPU (how much >> CPU time we >> want to allocate to the guest) > > QEMU has no way to limit the guest CPU time. Wouldn't any "yield" (sleep / whatever) limit the guest's CPU time, be it in qemu or in KVM. My intention is to suggest an algorithm that is based on guest throttling. Looking at the relevant BZs, I do not see how we can avoid it. I certainly have no claims regarding the architecture. Avi and mst, believe that it is better to continuously control the guest's CPU from the outside (libvirt) using cgroups. Although less responsive to changes, it should still work. In the meantime, I also discovered that everybody has a different point of view regarding the requirements. Regardless, I believe that the same basic mechanics (once decided), can do the work Some relevant configuration "requirements" are: 1. Max bandwidth 2. Min CPU per guest 3. Max guest stall time 4. Max migration time These requirements will often conflict, and may imply changes in behavior over time. I would also suggest that the management GUI will let the user select the aggression-level (or whatever), and display the implication on all the other parameters (total-time, %CPU) based on the current behavior of the guest and network. Regards, Ronen > > Regards, > > Anthony Liguori