From patchwork Mon Nov 3 03:26:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Liang Z" X-Patchwork-Id: 406011 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D3A07140081 for ; Mon, 3 Nov 2014 14:28:59 +1100 (AEDT) Received: from localhost ([::1]:60131 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xl8KA-0007WE-0E for incoming@patchwork.ozlabs.org; Sun, 02 Nov 2014 22:28:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xl8Iy-0006CA-Pk for qemu-devel@nongnu.org; Sun, 02 Nov 2014 22:27:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xl8Iu-0002Is-5R for qemu-devel@nongnu.org; Sun, 02 Nov 2014 22:27:44 -0500 Received: from mga14.intel.com ([192.55.52.115]:60586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xl8It-0002Im-Se for qemu-devel@nongnu.org; Sun, 02 Nov 2014 22:27:40 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 02 Nov 2014 19:21:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,305,1413270000"; d="scan'208";a="615779362" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by fmsmga001.fm.intel.com with ESMTP; 02 Nov 2014 19:27:37 -0800 Received: from pgsmsx106.gar.corp.intel.com (10.221.44.98) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 3 Nov 2014 11:26:40 +0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by pgsmsx106.gar.corp.intel.com (10.221.44.98) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 3 Nov 2014 11:26:40 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.156]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.174]) with mapi id 14.03.0195.001; Mon, 3 Nov 2014 11:26:39 +0800 From: "Li, Liang Z" To: "qemu-devel@nongnu.org" Thread-Topic: [PATCH 2/2] docs: Add a document about multiple compression threads Thread-Index: AQHP9M4aAQ3busAXtkqh5E6AfMHjUpxOQi7Q Date: Mon, 3 Nov 2014 03:26:39 +0000 Message-ID: References: <1414734028-16045-1-git-send-email-liangx.z.li@intel.com> In-Reply-To: <1414734028-16045-1-git-send-email-liangx.z.li@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.115 Cc: "Zhang, Yang Z" , "Wang, Yong Y" , "armbru@redhat.com" , "lcapitulino@redhat.com" Subject: Re: [Qemu-devel] [PATCH 2/2] docs: Add a document about multiple compression threads X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This is a RFC version. -----Original Message----- From: Li, Liang Z Sent: Friday, October 31, 2014 1:40 PM To: qemu-devel@nongnu.org Cc: lcapitulino@redhat.com; eblake@redhat.com; armbru@redhat.com; Li, Liang Z Subject: [PATCH 2/2] docs: Add a document about multiple compression threads From: Li Liang Give some details about how to use the multiple compress threads feature in live migration. Signed-off-by: Li Liang --- docs/multiple-compression-threads.txt | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 docs/multiple-compression-threads.txt -- 1.9.1 diff --git a/docs/multiple-compression-threads.txt b/docs/multiple-compression-threads.txt new file mode 100644 index 0000000..83e9e5b --- /dev/null +++ b/docs/multiple-compression-threads.txt @@ -0,0 +1,57 @@ +Use multiple compression(decompression) threads in live migration +================================================================= +Instead of sending the guest memory directly, this solution will +compress the ram page before sending, after receiving, the data how to +us will be decompressed. Using compression in live migration can help +to reduce the data transferred about 60%, this is very useful when the +bandwidth is limited, and the migration time can also be reduced about +80% in a typical case. + +The process of compression will consume additional CPU cycles, and the +extra CPU cycles will increase the migration time. In another hand, the +amount of data transferred will reduced, this factor can reduce the +migration time. If the process of the compression is quickly enough, +then the total migration time can be reduced, multiple compression +threads can be used to accelerate the compression process. + +Compression level can be used to control the compression speed and the +compression ratio. High compression ratio will take more time, level 0 +stands for no compression, level 1 stands for the best compression +speed,and level 9 stands for the best compression ratio. Users can +select a level number between 0 and 9. + + +When to use the multiple compression threads in live migration +============================================================== +Compression of data will consume lot of extra CPU cycles, in a system +with high overhead of CPU, avoid using this feature. When the network +bandwidth is very limited and the CPU resource is adequate, use the +multiple compression threads will be very helpful. If both the CPU and +the network bandwidth are adequate, use multiple compression threads +can still help to reduce the migration time. + + +Usage +====== +1. Verify the destination QEMU version is able to support the multiple +compression threads migration: + {qemu} info_migrate_capablilites + {qemu} ... compress: off ... + +2. Activate compression on the souce: + {qemu} migrate_set_capability compress on + +3. Set the compression thread count on source: + {qemu} migrate_set_compress_threads 10 + +4. Set the compression level on the source: + {qemu} migrate_set_compress_level 1 + +5. Set the decompression thread count on destination: + {qemu} migrate_set_decompress_threads 5 + +6. Start outgoing migration: + {qemu} migrate -d tcp:destination.host:4444 + {qemu} info migrate + Capablilties: ... compress: on + ...