From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI0ZS-0002gs-Il for qemu-devel@nongnu.org; Tue, 19 Mar 2013 13:43:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UI0ZR-0004Sy-64 for qemu-devel@nongnu.org; Tue, 19 Mar 2013 13:43:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI0ZQ-0004Sb-UT for qemu-devel@nongnu.org; Tue, 19 Mar 2013 13:43:33 -0400 Message-ID: <5148A3BF.8050005@redhat.com> Date: Tue, 19 Mar 2013 11:43:27 -0600 From: Eric Blake MIME-Version: 1.0 References: <1363362619-3190-1-git-send-email-pl@kamp.de> <1363362619-3190-10-git-send-email-pl@kamp.de> In-Reply-To: <1363362619-3190-10-git-send-email-pl@kamp.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2TXFATEDNNEQTXWLQGMEI" Subject: Re: [Qemu-devel] [PATCHv2 9/9] migration: use XBZRLE only after bulk stage List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2TXFATEDNNEQTXWLQGMEI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/15/2013 09:50 AM, Peter Lieven wrote: > at the beginning of migration all pages are marked dirty and > in the first round a bulk migration of all pages is performed. >=20 > currently all these pages are copied to the page cache regardless > if there are frequently updated or not. this doesn't make sense > since most of these pages are never transferred again. >=20 > this patch changes the XBZRLE transfer to only be used after > the bulk stage has been completed. that means a page is added > to the page cache the second time it is transferred and XBZRLE > can benefit from the third time of transfer. >=20 > since the page cache is likely smaller than the number of pages > its also likely that in the second round the page is missing in the > cache due to collisions in the bulk phase. >=20 > on the other hand a lot of unneccssary mallocs, memdups and frees s/unneccssary/unnecessary/ > are saved. >=20 > the following results have been taken earlier while executing > the test program from docs/xbzrle.txt. (+) with the patch and (-) > without. (thanks to Eric Blake for reformatting and comments) Hey - I know that guy :) >=20 > + total time: 22185 milliseconds > - total time: 22410 milliseconds >=20 > Shaved 0.3 seconds, better than 1%! >=20 > + downtime: 29 milliseconds > - downtime: 21 milliseconds >=20 > Not sure why downtime seemed worse, but probably not the end of the wor= ld. >=20 > + transferred ram: 706034 kbytes > - transferred ram: 721318 kbytes >=20 > Fewer bytes sent - good. >=20 > + remaining ram: 0 kbytes > - remaining ram: 0 kbytes > + total ram: 1057216 kbytes > - total ram: 1057216 kbytes > + duplicate: 108556 pages > - duplicate: 105553 pages > + normal: 175146 pages > - normal: 179589 pages > + normal bytes: 700584 kbytes > - normal bytes: 718356 kbytes >=20 > Fewer normal bytes... >=20 > + cache size: 67108864 bytes > - cache size: 67108864 bytes > + xbzrle transferred: 3127 kbytes > - xbzrle transferred: 630 kbytes >=20 > ...and more compressed pages sent - good. >=20 > + xbzrle pages: 117811 pages > - xbzrle pages: 21527 pages > + xbzrle cache miss: 18750 > - xbzrle cache miss: 179589 >=20 > And very good improvement on the cache miss rate. >=20 > + xbzrle overflow : 0 > - xbzrle overflow : 0 >=20 > Signed-off-by: Peter Lieven > --- > arch_init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2TXFATEDNNEQTXWLQGMEI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRSKO/AAoJEKeha0olJ0NqDVEIAJRLjJmT+eCsmwK4+CMCiz3D Xe1Jaftw0Hyrm+gJJCBnfjWM90YRD7v4s3UDYaf9503OGmVVwOybRrC5lHzmjpbb g8EjtI1DeypAB4qfOTknq0ytamagWBglJzVPkh7KtC0siGvbGBFdBLSOPniy3ykG p+YcMyiCIKHL1X7BhuOgiZ/ZkDcwUgCBgxJZl5tnvzHmZaGqeHmgEpsxfWml201v K66mQPmOk+4o+EX2MuvtZ09Ew4QVcdfB1/QuK+AfbT3cSMS6N+XYpuWKoT4NNFES 4kZW6ziR4DA3xBrLz2JFGVSRfn0Cr3Z7KMB9a+YktNNnNNw69zYGk91dey7I5S0= =ubze -----END PGP SIGNATURE----- ------enig2TXFATEDNNEQTXWLQGMEI--