qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Jason J. Herne" <jjherne@linux.vnet.ibm.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Zhangbo (Oscar)" <oscar.zhangbo@huawei.com>
Cc: "zhouyimin Zhou(Yimin)" <zhouyimin@huawei.com>,
	Zhanghailiang <zhang.zhanghailiang@huawei.com>,
	"Wangyufei (James)" <james.wangyufei@huawei.com>,
	Yanqiangjun <yanqiangjun@huawei.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"Huangpeng (Peter)" <peter.huangpeng@huawei.com>,
	Linqiangmin <linqiangmin@huawei.com>,
	Huangzhichao <huangzhichao@huawei.com>,
	"Herongguang (Stephen)" <herongguang.he@huawei.com>
Subject: Re: [Qemu-devel] What's the advantages of POSTCOPY over CPU-THROTTLE?
Date: Wed, 6 Jan 2016 14:43:23 -0500	[thread overview]
Message-ID: <568D6E5B.1040206@linux.vnet.ibm.com> (raw)
In-Reply-To: <20160106095731.GB2528@work-vm>

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)

  reply	other threads:[~2016-01-06 19:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06  9:41 [Qemu-devel] What's the advantages of POSTCOPY over CPU-THROTTLE? Zhangbo (Oscar)
2016-01-06  9:57 ` Dr. David Alan Gilbert
2016-01-06 19:43   ` Jason J. Herne [this message]
2016-01-07  3:39     ` [Qemu-devel] 答复: " Zhangbo (Oscar)
2016-01-07  9:14       ` Dr. David Alan Gilbert
2016-01-07 14:52         ` Dr. David Alan Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=568D6E5B.1040206@linux.vnet.ibm.com \
    --to=jjherne@linux.vnet.ibm.com \
    --cc=dgilbert@redhat.com \
    --cc=herongguang.he@huawei.com \
    --cc=huangzhichao@huawei.com \
    --cc=james.wangyufei@huawei.com \
    --cc=linqiangmin@huawei.com \
    --cc=oscar.zhangbo@huawei.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yanqiangjun@huawei.com \
    --cc=zhang.zhanghailiang@huawei.com \
    --cc=zhouyimin@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).