qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Dor Laor <dlaor@redhat.com>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: benoit.hudzia@gmail.com, aarcange@redhat.com,
	Anthony Liguori <aliguori@us.ibm.com>,
	kvm@vger.kernel.org, quintela@redhat.com, stefanha@gmail.com,
	t.hirofuchi@aist.go.jp, satoshi.itoh@aist.go.jp,
	qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com,
	yoshikawa.takuya@oss.ntt.co.jp,
	Orit Wasserman <owasserm@redhat.com>,
	avi@redhat.com, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 00/41] postcopy live migration
Date: Tue, 05 Jun 2012 14:23:18 +0300	[thread overview]
Message-ID: <4FCDEC26.2040603@redhat.com> (raw)
In-Reply-To: <20120604133816.GB4033@valinux.co.jp>

On 06/04/2012 04:38 PM, Isaku Yamahata wrote:
> On Mon, Jun 04, 2012 at 08:37:04PM +0800, Anthony Liguori wrote:
>> On 06/04/2012 05:57 PM, Isaku Yamahata wrote:
>>> After the long time, we have v2. This is qemu part.
>>> The linux kernel part is sent separatedly.
>>>
>>> Changes v1 ->   v2:
>>> - split up patches for review
>>> - buffered file refactored
>>> - many bug fixes
>>>     Espcially PV drivers can work with postcopy
>>> - optimization/heuristic
>>>
>>> Patches
>>> 1 - 30: refactoring exsiting code and preparation
>>> 31 - 37: implement postcopy itself (essential part)
>>> 38 - 41: some optimization/heuristic for postcopy
>>>
>>> Intro
>>> =====
>>> This patch series implements postcopy live migration.[1]
>>> As discussed at KVM forum 2011, dedicated character device is used for
>>> distributed shared memory between migration source and destination.
>>> Now we can discuss/benchmark/compare with precopy. I believe there are
>>> much rooms for improvement.
>>>
>>> [1] http://wiki.qemu.org/Features/PostCopyLiveMigration
>>>
>>>
>>> Usage
>>> =====
>>> You need load umem character device on the host before starting migration.
>>> Postcopy can be used for tcg and kvm accelarator. The implementation depend
>>> on only linux umem character device. But the driver dependent code is split
>>> into a file.
>>> I tested only host page size == guest page size case, but the implementation
>>> allows host page size != guest page size case.
>>>
>>> The following options are added with this patch series.
>>> - incoming part
>>>     command line options
>>>     -postcopy [-postcopy-flags<flags>]
>>>     where flags is for changing behavior for benchmark/debugging
>>>     Currently the following flags are available
>>>     0: default
>>>     1: enable touching page request
>>>
>>>     example:
>>>     qemu -postcopy -incoming tcp:0:4444 -monitor stdio -machine accel=kvm
>>>
>>> - outging part
>>>     options for migrate command
>>>     migrate [-p [-n] [-m]] URI [<prefault forward>   [<prefault backword>]]
>>>     -p: indicate postcopy migration
>>>     -n: disable background transferring pages: This is for benchmark/debugging
>>>     -m: move background transfer of postcopy mode
>>>     <prefault forward>: The number of forward pages which is sent with on-demand
>>>     <prefault backward>: The number of backward pages which is sent with
>>>                          on-demand
>>>
>>>     example:
>>>     migrate -p -n tcp:<dest ip address>:4444
>>>     migrate -p -n -m tcp:<dest ip address>:4444 32 0
>>>
>>>
>>> TODO
>>> ====
>>> - benchmark/evaluation. Especially how async page fault affects the result.
>>
>> I don't mean to beat on a dead horse, but I really don't understand the
>> point of postcopy migration other than the fact that it's possible.  It's
>> a lot of code and a new ABI in an area where we already have too much
>> difficulty maintaining our ABI.
>>
>> Without a compelling real world case with supporting benchmarks for why
>> we need postcopy and cannot improve precopy, I'm against merging this.
>
> Some new results are available at
> https://events.linuxfoundation.org/images/stories/pdf/lcjp2012_yamahata_postcopy.pdf


It does shows dramatic improvement over pre copy. As stated in the docs, 
async page faults may help lots of various loads and turn post copy into 
a viable solution over today's code.

In addition, the sort of 'demand pages' approach on the destination can 
help us for other usages - For example, we can use this implementation 
to live snapshot VMs w/ RAM (post live migration into a file that leave 
the source active) and live resume VMs from file w/o reading the entire 
RAM from disk.

I didn't go over the api for the live migration part but IIUC, the only 
change needed for the live migration 'protocol' is w.r.t guest pages and 
we need to do it regardless when we'll merge the page ordering optimization.

Cheers,
Dor

> precopy assumes that the network bandwidth are wide enough and
> the number of dirty pages converges. But it doesn't always hold true.
>
> - planned migration
>    predictability of total migration time is important
>
> - dynamic consolidation
>    In cloud use cases, the resources of physical machine are usually
>    over committed.
>    When physical machine becomes over loaded, some VMs are moved to another
>    physical host to balance the load.
>    precopy can't move VMs promptly. compression makes things worse.
>
> - inter data center migration
>    With L2 over L3 technology, it has becoming common to create a virtual
>    data center which actually spans over multi physical data centers.
>    It is useful to migrate VMs over physical data centers as disaster recovery.
>    The network bandwidth between DCs is narrower than LAN case. So precopy
>    assumption wouldn't hold.
>
> - In case that network bandwidth might be limited by QoS,
>    precopy assumption doesn't hold.
>
>
> thanks,

  reply	other threads:[~2012-06-05 11:23 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04  9:57 [Qemu-devel] [PATCH v2 00/41] postcopy live migration Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 01/41] arch_init: export sort_ram_list() and ram_save_block() Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 02/41] arch_init: export RAM_SAVE_xxx flags for postcopy Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 03/41] arch_init/ram_save: introduce constant for ram save version = 4 Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 04/41] arch_init: refactor host_from_stream_offset() Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 05/41] arch_init/ram_save_live: factor out RAM_SAVE_FLAG_MEM_SIZE case Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 06/41] arch_init: refactor ram_save_block() Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 07/41] arch_init/ram_save_live: factor out ram_save_limit Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 08/41] arch_init/ram_load: refactor ram_load Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 09/41] arch_init: introduce helper function to find ram block with id string Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 10/41] arch_init: simplify a bit by ram_find_block() Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 11/41] arch_init: factor out counting transferred bytes Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 12/41] arch_init: factor out setting last_block, last_offset Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 13/41] exec.c: factor out qemu_get_ram_ptr() Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 14/41] exec.c: export last_ram_offset() Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 15/41] savevm: export qemu_peek_buffer, qemu_peek_byte, qemu_file_skip Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 16/41] savevm: qemu_pending_size() to return pending buffered size Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 17/41] savevm, buffered_file: introduce method to drain buffer of buffered file Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 18/41] QEMUFile: add qemu_file_fd() for later use Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 19/41] savevm/QEMUFile: drop qemu_stdio_fd Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 20/41] savevm/QEMUFileSocket: drop duplicated member fd Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 21/41] savevm: rename QEMUFileSocket to QEMUFileFD, socket_close to fd_close Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 22/41] savevm/QEMUFile: introduce qemu_fopen_fd Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 23/41] migration.c: remove redundant line in migrate_init() Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 24/41] migration: export migrate_fd_completed() and migrate_fd_cleanup() Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 25/41] migration: factor out parameters into MigrationParams Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 26/41] buffered_file: factor out buffer management logic Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 27/41] buffered_file: Introduce QEMUFileNonblock for nonblock write Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 28/41] buffered_file: add qemu_file to read/write to buffer in memory Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 29/41] umem.h: import Linux umem.h Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 30/41] update-linux-headers.sh: teach umem.h to update-linux-headers.sh Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 31/41] configure: add CONFIG_POSTCOPY option Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 32/41] savevm: add new section that is used by postcopy Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 33/41] postcopy: introduce -postcopy and -postcopy-flags option Isaku Yamahata
2012-06-08 10:52   ` Juan Quintela
2012-06-08 16:07     ` Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 34/41] postcopy outgoing: add -p and -n option to migrate command Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 35/41] postcopy: introduce helper functions for postcopy Isaku Yamahata
2012-06-14 21:34   ` Juan Quintela
2012-06-16  9:48     ` Isaku Yamahata
2012-06-16 13:19       ` Juan Quintela
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 36/41] postcopy: implement incoming part of postcopy live migration Isaku Yamahata
2012-06-14 21:56   ` Juan Quintela
2012-06-14 21:58   ` Juan Quintela
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 37/41] postcopy: implement outgoing " Isaku Yamahata
2012-06-14 22:12   ` Juan Quintela
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 38/41] postcopy/outgoing: add forward, backward option to specify the size of prefault Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 39/41] postcopy/outgoing: implement prefault Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 40/41] migrate: add -m (movebg) option to migrate command Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 41/41] migration/postcopy: add movebg mode Isaku Yamahata
2012-06-04 12:37 ` [Qemu-devel] [PATCH v2 00/41] postcopy live migration Anthony Liguori
2012-06-04 13:38   ` Isaku Yamahata
2012-06-05 11:23     ` Dor Laor [this message]
2012-06-07  7:46   ` Orit Wasserman
2012-06-08 10:16   ` Juan Quintela
2012-06-08 10:23     ` Avi Kivity
2012-06-14 21:07       ` Juan Quintela
2012-06-14 22:18 ` Juan Quintela

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=4FCDEC26.2040603@redhat.com \
    --to=dlaor@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=benoit.hudzia@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=owasserm@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=satoshi.itoh@aist.go.jp \
    --cc=stefanha@gmail.com \
    --cc=t.hirofuchi@aist.go.jp \
    --cc=yamahata@valinux.co.jp \
    --cc=yoshikawa.takuya@oss.ntt.co.jp \
    /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).