From patchwork Mon Jul 8 17:53:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuan Liu X-Patchwork-Id: 13728260 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F0DD2C2BD09 for ; Tue, 9 Jul 2024 15:34:21 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sRCqf-0000ne-EH; Tue, 09 Jul 2024 11:33:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sRCqc-0000bx-6c for qemu-devel@nongnu.org; Tue, 09 Jul 2024 11:33:42 -0400 Received: from mgamail.intel.com ([198.175.65.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sRCqZ-0007me-Lz for qemu-devel@nongnu.org; Tue, 09 Jul 2024 11:33:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720539219; x=1752075219; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=KrLTwNlzo01QEff6U6k8t106ll2vENByCwV80gL6fDQ=; b=OAbXRUB+PiQZz+MYzaslL9fvYVh9rmr89SKeQAcxCZE/pYEq3rSLRIGN opGjILgsCKkS6P7EPpMujpXfrfpS0xWRVWUYFta+ImE7PsOmSn+VpTTny F/P28/PSm/2zaeYxOy4Ekuf2yV56E7Zb2tayx+p/P7vamnyXE0XFKr3bh BSDvIymwpOJggDISqpC6bI8JdPEPuxqd2vhRR1VSgynW0tB3ikoZHThDa gSz1FLzMQX++XoXeG3+K+BD3Kl2Mnx0Q/06qbPGx3GC7YFnjNz8OiIBMy mcKQuz7D47BNiI+ku93nJNqrHjRxIZ9evjn8E17PpPe4Ymdsn4h9pBhTA g==; X-CSE-ConnectionGUID: rDSnVks8QWWrBJKdrHVLoQ== X-CSE-MsgGUID: bWqvMjxjSDCxwEHTLPhy3w== X-IronPort-AV: E=McAfee;i="6700,10204,11128"; a="17943900" X-IronPort-AV: E=Sophos;i="6.09,195,1716274800"; d="scan'208";a="17943900" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2024 08:33:35 -0700 X-CSE-ConnectionGUID: oRcyBD6vQYCyqRbp+uMWTg== X-CSE-MsgGUID: fm7DCs00SsK8fmaC1zZpDg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,195,1716274800"; d="scan'208";a="71110715" Received: from sae-gw02.sh.intel.com (HELO localhost) ([10.239.45.110]) by fmviesa002.fm.intel.com with ESMTP; 09 Jul 2024 08:33:33 -0700 From: Yuan Liu To: yichen.wang@bytedance.com, peterx@redhat.com, farosas@suse.de Cc: qemu-devel@nongnu.org, yuan1.liu@intel.com, nanhai.zou@intel.com Subject: [PATCH] docs/migration: add qatzip compression feature Date: Tue, 9 Jul 2024 01:53:59 +0800 Message-ID: <20240708175359.1104493-1-yuan1.liu@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.18; envelope-from=yuan1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_12_24=1.049, DKIMWL_WL_HIGH=-0.144, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org add Intel QATzip compression method introduction Signed-off-by: Yuan Liu Reviewed-by: Nanhai Zou Reviewed-by: Peter Xu --- docs/devel/migration/features.rst | 1 + docs/devel/migration/qatzip-compression.rst | 112 ++++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 docs/devel/migration/qatzip-compression.rst diff --git a/docs/devel/migration/features.rst b/docs/devel/migration/features.rst index 58f8fd9e16..8f431d52f9 100644 --- a/docs/devel/migration/features.rst +++ b/docs/devel/migration/features.rst @@ -14,3 +14,4 @@ Migration has plenty of features to support different use cases. CPR qpl-compression uadk-compression + qatzip-compression diff --git a/docs/devel/migration/qatzip-compression.rst b/docs/devel/migration/qatzip-compression.rst new file mode 100644 index 0000000000..8e2137652c --- /dev/null +++ b/docs/devel/migration/qatzip-compression.rst @@ -0,0 +1,112 @@ +================== +QATzip Compression +================== +In scenarios with limited network bandwidth, the ``QATzip`` solution can help +users save a lot of host CPU resources by accelerating compression and +decompression through the Intel QuickAssist Technology(``QAT``) hardware. + +``QATzip`` is a user space library which builds on top of the Intel QuickAssist +Technology user space library, to provide extended accelerated compression and +decompression services. + +For more ``QATzip`` introduction, please refer to `QATzip Introduction +`_ + +QATzip Compression Framework +============================ + +:: + + +----------------+ + | MultiFd Thread | + +-------+--------+ + | + | compress/decompress + +-------+--------+ + | QATzip library | + +-------+--------+ + | + +-------+--------+ + | QAT library | + +-------+--------+ + | user space + --------+--------------------- + | kernel space + +------+-------+ + | QAT Driver | + +------+-------+ + | + +------+-------+ + | QAT Devices | + +--------------+ + + +QATzip Installation +------------------- + +The ``QATzip`` installation package has been integrated into some Linux +distributions and can be installed directly. For example, the Ubuntu Server +24.04 LTS system can be installed using below command + +.. code-block:: shell + + #apt search qatzip + libqatzip-dev/noble 1.2.0-0ubuntu3 amd64 + Intel QuickAssist user space library development files + + libqatzip3/noble 1.2.0-0ubuntu3 amd64 + Intel QuickAssist user space library + + qatzip/noble,now 1.2.0-0ubuntu3 amd64 [installed] + Compression user-space tool for Intel QuickAssist Technology + + #sudo apt install libqatzip-dev libqatzip3 qatzip + +If your system does not support the ``QATzip`` installation package, you can +use the source code to build and install, please refer to `QATzip source code installation +`_ + +QAT Hardware Deployment +----------------------- + +``QAT`` supports physical functions(PFs) and virtual functions(VFs) for +deployment, and users can configure ``QAT`` resources for migration according +to actual needs. For more details about ``QAT`` deployment, please refer to +`Intel QuickAssist Technology Documentation +`_ + +For more ``QAT`` hardware introduction, please refer to `intel-quick-assist-technology-overview +`_ + +How To Use QATzip Compression +============================= + +1 - Install ``QATzip`` library + +2 - Build ``QEMU`` with ``--enable-qatzip`` parameter + + E.g. configure --target-list=x86_64-softmmu --enable-kvm ``--enable-qatzip`` + +3 - Set ``migrate_set_parameter multifd-compression qatzip`` + +4 - Set ``migrate_set_parameter multifd-qatzip-level comp_level``, the default +comp_level value is 1, and it supports levels from 1 to 9 + +How To Choose Between QATzip and QPL +==================================== +Starting from Intel 4th Gen Intel Xeon Scalable processors, codenamed Sapphire +Rapids processor(``SPR``), it supports multiple build-in accelerators including +``QAT`` and ``IAA``, the former can accelerate ``QATzip``, and the latter is +used to accelerate ``QPL``. + +Here are some suggestions: + +1 - If your live migration scenario is limited network bandwidth and ``QAT`` +hardware resources exceed ``IAA``, then use the ``QATzip`` method, which +can save a lot of host CPU resources for compression. + +2 - If your system cannot support shared virtual memory(SVM) technology, please +use ``QATzip`` method because ``QPL`` performance is not good without SVM +support. + +3 - For other scenarios, please use the ``QPL`` method first.