From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqSXk-0007VB-Vq for qemu-devel@nongnu.org; Mon, 08 Aug 2011 12:19:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqSXj-0000Kf-QV for qemu-devel@nongnu.org; Mon, 08 Aug 2011 12:19:08 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:51379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqSXj-0000KM-Nw for qemu-devel@nongnu.org; Mon, 08 Aug 2011 12:19:07 -0400 Received: by ywf9 with SMTP id 9so453114ywf.4 for ; Mon, 08 Aug 2011 09:19:06 -0700 (PDT) Message-ID: <4E400C78.1020104@codemonkey.ws> Date: Mon, 08 Aug 2011 11:19:04 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <4E3FF6AE.8030004@redhat.com> <4E3FF705.9080009@redhat.com> <4E3FFC7A.3090000@codemonkey.ws> <4E3FFD76.4010804@redhat.com> In-Reply-To: <4E3FFD76.4010804@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4] XBZRLE delta for live migration of large memory apps List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Blue Swirl , Stefan Hajnoczi , "Shribman, Aidan" , qemu-devel Developers On 08/08/2011 10:15 AM, Avi Kivity wrote: > On 08/08/2011 06:10 PM, Anthony Liguori wrote: >> On 08/08/2011 09:47 AM, Avi Kivity wrote: >>> On 08/08/2011 05:46 PM, Avi Kivity wrote: >>>> >>>> Please provide documentation in docs/ of the compression format. >>>> >>>> IMO it should be disabled by default (with an option to disable it, >>>> via, sat, migrate-set-options, so we can migrate to older hosts). >>>> >>>> The protocol should allow XBZRLE to turn itself off if it detects that >>>> it isn't effective. >>>> >>> >>> IOW, this should be part of the standard migration protocol, not some >>> side option that is enabled if the user remembers. It should not be >>> mutually exclusive with future migration extensions, including >>> compression. >> >> Are you thinking of a static decision or a dynamic decision? >> > > Dynamic. If the cache hit rate is too low, disable XBZRLE and eliminate > the overhead of copying pages to the history buffer. > >> I think feature negotiation would address static decision making. For >> dynamic decision making, you could look to something like the VNC >> protocol and how it encodes pixel data. The flow looks something like: >> >> 1) All clients/servers must support raw encoding >> >> 2) Client presents list of support encodings >> >> 3) Server takes intersection of client supported encodings and server >> supported encodings. >> >> 4) Server can choose to encode updates using any encoding supported by >> client and server. > > Feature negotiation in the migration protocol itself would break exec: > migration (and any existing single duplex proxies). > > We can do a poor man's feature negotiation via capabilities, relying on > management to disable features which don't exist on the other side. It > isn't pretty, but it's the best we can do at this point. I think the above can be done via capabilities too fwiw. In this case, the source and destination advertise the compression formats they support, and the management tool takes the interaction and sets the capability mask on the source and destination appropriately. There's no need for a full duplex protocol because the source just sends compressed data in whatever format it thinks is appropriate at any given point in time. > Real feature negotiation will likely have to wait until the next version > of the migration protocol. Since we're talking about moving to ASN.1 for 1.0, I think we should think also include memory compression and wait until we rev the protocol before introducing any type of compression. Regards, Anthony Liguori