From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGtzZ-0003Zb-RU for qemu-devel@nongnu.org; Wed, 06 Jan 2016 14:43:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGtzW-0007Lk-LL for qemu-devel@nongnu.org; Wed, 06 Jan 2016 14:43:33 -0500 Received: from e37.co.us.ibm.com ([32.97.110.158]:59234) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGtzW-0007LG-Eu for qemu-devel@nongnu.org; Wed, 06 Jan 2016 14:43:30 -0500 Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 6 Jan 2016 12:43:27 -0700 Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id B91BE1FF0042 for ; Wed, 6 Jan 2016 12:31:36 -0700 (MST) Received: from d01av05.pok.ibm.com (d01av05.pok.ibm.com [9.56.224.195]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u06JhP4B27721958 for ; Wed, 6 Jan 2016 19:43:25 GMT Received: from d01av05.pok.ibm.com (localhost [127.0.0.1]) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u06JdMvu029255 for ; Wed, 6 Jan 2016 14:39:22 -0500 References: <0259E1C966E8C54AA93AA2B1240828E650F34EC8@szxema507-mbs.china.huawei.com> <20160106095731.GB2528@work-vm> From: "Jason J. Herne" Message-ID: <568D6E5B.1040206@linux.vnet.ibm.com> Date: Wed, 6 Jan 2016 14:43:23 -0500 MIME-Version: 1.0 In-Reply-To: <20160106095731.GB2528@work-vm> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] What's the advantages of POSTCOPY over CPU-THROTTLE? Reply-To: jjherne@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" , "Zhangbo (Oscar)" Cc: "zhouyimin Zhou(Yimin)" , Zhanghailiang , "Wangyufei (James)" , Yanqiangjun , "qemu-devel@nongnu.org" , "Huangpeng (Peter)" , Linqiangmin , Huangzhichao , "Herongguang (Stephen)" On 01/06/2016 04:57 AM, Dr. David Alan Gilbert wrote: > * Zhangbo (Oscar) (oscar.zhangbo@huawei.com) wrote: >> Hi all: >>   Postcopy is suitable for migrating guests which have large page change rates. It >> 1 makes the guest run at the destination ASAP. >> 2 makes the downtime of the guest small enough. >> If we don't take the 1st advantage into account, then, its benefit seems similar with CPU-THROTTLE: both of them make the guest's downtime small during migration. >> >> CPU-THROTTLE would make the guest's dirtypage rate *smaller than the network bandwidth*, in order to make the to_send_page_number in each iteration convergent and achieve the small-enough downtime during the last iteration. >> If we adopt POST-COPY here, the guest's dirtypage rate would *become equal to the bandwidth*, because we have to fetch its memory from the source side, via the network. >> Both of them would introduce performance degradations of the guest, which may in turn cause downtime larger. >> >> So, here comes the question: If we just compare POSTCOPY with CPU-THROTTLE for their advantages in decreasing downtime, POSTCOPY seems has no pos over CPU-THROTTLE, is that right? >> >> Meanwhile, Are there any other benifits of POSTCOPY besides the 2 mentioned above? > > It's a good question and they do both try and help solve the same problem. > One problem with cpu-throttle is whether you can throttle the CPU enough to > get the dirty-rate below the rate of the network, and the answer to that is > very workload dependent. On a large, many-core VM, even a little bit of CPU > can dirty a lot of memory. Postcopy is guaranteed to finish migration, > irrespective of the workload. > > Postcopy is pretty fine-grained, in that only threads that are accessing > pages that are still on the source are blocked, since it allows the use > of async page faults, that means it's even finer grained than the vCPU level, > so many threads come back up to full performance pretty quickly > even if there are a few pages left. > Good answer Dave. FWIW, I completely agree. Using cpu throttling can help the situation depending on workload. Postcopy will *always* work. One possible side effect of Postcopy is loss of the guest if the network connection dies during the postcopy phase of migration. This should be a very rare occurrence however. So both methods have their uses. -- -- Jason J. Herne (jjherne@linux.vnet.ibm.com)