From nobody Sat Apr 5 01:39:31 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=suse.de ARC-Seal: i=1; a=rsa-sha256; t=1739583511; cv=none; d=zohomail.com; s=zohoarc; b=YD+iVbEljRa6vXhDgKlV+6LF1iWlAgC1Q30OoTN0B8GcOGv38JKqNCdeqeye6N4BjxdNOm0yKV08SMHZij16b0LgJIykqNy3wz7gJt6eg+jP5wZ0H3V1VGUIABT7eRV62Y+SPEgh5h4rQyQOGDVY99K98oo2iJPtPoYvexaIzS0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1739583511; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=eQh8sI+kCzbFwwHvCWXBzG2ovyzZMFf40klEDt6MXs8=; b=Jf/xYN4WBf8x5EYt7yjrU2ycNXt8Y9v7bx5V6k41gfXfbx3BxRCw1K1Rek3qw6ULSYYKOSuEsZUq8J93O5xTVQTNnv9tdYu4wy8l9FvMum6PdjGemeXm44B3NM9d6NTgBSRn+EQ1KiGEHLxyN3jVauEkV4BL3rrAtsYaKOlUjAI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1739583511327275.66812195897285; Fri, 14 Feb 2025 17:38:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tj74u-000471-R2; Fri, 14 Feb 2025 20:34:46 -0500 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 1tj2NI-0007Cn-O6 for qemu-devel@nongnu.org; Fri, 14 Feb 2025 15:33:26 -0500 Received: from smtp-out1.suse.de ([2a07:de40:b251:101:10:150:64:1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tj2NG-0002IB-Ca for qemu-devel@nongnu.org; Fri, 14 Feb 2025 15:33:24 -0500 Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8231221181; Fri, 14 Feb 2025 20:32:41 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id DAB9C13AEB; Fri, 14 Feb 2025 20:32:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id GJyoJWeor2cgEgAAD6G6ig (envelope-from ); Fri, 14 Feb 2025 20:32:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1739565161; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eQh8sI+kCzbFwwHvCWXBzG2ovyzZMFf40klEDt6MXs8=; b=0yMoyLeK28ggmzI+vAbJ/gpZqNFXqs8lYtQQOTXGegPIquP8ORqzYvx1KdKgN0zegegnGf 5bWLj5+VKJ0Wa4K++gVgKqwxKFNW8NYKD8kK/JhHZonHL2ts2sGPskpQ7cgG3TduXWjc8U qU1L7Z09PQenNoRIfSnW/M2g2S9Y+XM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1739565161; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eQh8sI+kCzbFwwHvCWXBzG2ovyzZMFf40klEDt6MXs8=; b=pAKE+b+//bndH2c1MefjpXtTs9b2NfK8sNh+B0R6JDNJJ3QhtAB62EDhCUNQNFqzXycY+K ds68H9VSMZyMTdDA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1739565161; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eQh8sI+kCzbFwwHvCWXBzG2ovyzZMFf40klEDt6MXs8=; b=0yMoyLeK28ggmzI+vAbJ/gpZqNFXqs8lYtQQOTXGegPIquP8ORqzYvx1KdKgN0zegegnGf 5bWLj5+VKJ0Wa4K++gVgKqwxKFNW8NYKD8kK/JhHZonHL2ts2sGPskpQ7cgG3TduXWjc8U qU1L7Z09PQenNoRIfSnW/M2g2S9Y+XM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1739565161; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eQh8sI+kCzbFwwHvCWXBzG2ovyzZMFf40klEDt6MXs8=; b=pAKE+b+//bndH2c1MefjpXtTs9b2NfK8sNh+B0R6JDNJJ3QhtAB62EDhCUNQNFqzXycY+K ds68H9VSMZyMTdDA== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Peter Xu , Hyman Huang , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PULL 21/22] guestperf: Introduce multifd compression option Date: Fri, 14 Feb 2025 17:31:58 -0300 Message-Id: <20250214203159.30168-22-farosas@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20250214203159.30168-1-farosas@suse.de> References: <20250214203159.30168-1-farosas@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-3.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCPT_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid] X-Spam-Score: -3.30 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a07:de40:b251:101:10:150:64:1; envelope-from=farosas@suse.de; helo=smtp-out1.suse.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @suse.de) X-ZM-MESSAGEID: 1739583512299019000 From: Hyman Huang Guestperf tool does not cover the multifd compression option currently, it is worth supporting so that developers can analysis the migration performance with different compression algorithms. Multifd support 4 compression algorithms currently: zlib, zstd, qpl, uadk To request that multifd with the specified compression algorithm such as zlib: $ ./tests/migration-stress/guestperf.py \ --multifd --multifd-channels 4 --multifd-compression zlib \ --output output.json To run the entire standardized set of multifd compression comparisons, with unix migration: $ ./tests/migration-stress/guestperf-batch.py \ --dst-host localhost --transport unix \ --filter compr-multifd-compression* --output outputdir Signed-off-by: Hyman Huang Reviewed-by: Daniel P. Berrang=C3=A9 Message-ID: Signed-off-by: Fabiano Rosas --- tests/migration-stress/guestperf/comparison.py | 13 +++++++++++++ tests/migration-stress/guestperf/engine.py | 14 ++++++++++++++ tests/migration-stress/guestperf/scenario.py | 7 +++++-- tests/migration-stress/guestperf/shell.py | 3 +++ 4 files changed, 35 insertions(+), 2 deletions(-) diff --git a/tests/migration-stress/guestperf/comparison.py b/tests/migrati= on-stress/guestperf/comparison.py index 40e9d2eb1d..dee3ac25e4 100644 --- a/tests/migration-stress/guestperf/comparison.py +++ b/tests/migration-stress/guestperf/comparison.py @@ -158,4 +158,17 @@ def __init__(self, name, scenarios): Scenario("compr-dirty-limit-50MB", dirty_limit=3DTrue, vcpu_dirty_limit=3D50), ]), + + # Looking at effect of multifd with + # different compression algorithms + Comparison("compr-multifd-compression", scenarios =3D [ + Scenario("compr-multifd-compression-zlib", + multifd=3DTrue, multifd_channels=3D2, multifd_compression= =3D"zlib"), + Scenario("compr-multifd-compression-zstd", + multifd=3DTrue, multifd_channels=3D2, multifd_compression= =3D"zstd"), + Scenario("compr-multifd-compression-qpl", + multifd=3DTrue, multifd_channels=3D2, multifd_compression= =3D"qpl"), + Scenario("compr-multifd-compression-uadk", + multifd=3DTrue, multifd_channels=3D2, multifd_compression= =3D"uadk"), + ]), ] diff --git a/tests/migration-stress/guestperf/engine.py b/tests/migration-s= tress/guestperf/engine.py index 4b15322e8d..e11f6a8496 100644 --- a/tests/migration-stress/guestperf/engine.py +++ b/tests/migration-stress/guestperf/engine.py @@ -31,6 +31,8 @@ '..', '..', '..', 'python')) from qemu.machine import QEMUMachine =20 +# multifd supported compression algorithms +MULTIFD_CMP_ALGS =3D ("zlib", "zstd", "qpl", "uadk") =20 class Engine(object): =20 @@ -191,6 +193,12 @@ def _migrate(self, hardware, scenario, src, scenario._compression_xbzrle_cache)) =20 if scenario._multifd: + if (scenario._multifd_compression and + (scenario._multifd_compression not in MULTIFD_CMP_ALGS)): + raise Exception("unsupported multifd compression " + "algorithm: %s" % + scenario._multifd_compression) + resp =3D src.cmd("migrate-set-capabilities", capabilities =3D [ { "capability": "multifd", @@ -206,6 +214,12 @@ def _migrate(self, hardware, scenario, src, resp =3D dst.cmd("migrate-set-parameters", multifd_channels=3Dscenario._multifd_channels) =20 + if scenario._multifd_compression: + resp =3D src.cmd("migrate-set-parameters", + multifd_compression=3Dscenario._multifd_compression) + resp =3D dst.cmd("migrate-set-parameters", + multifd_compression=3Dscenario._multifd_compression) + if scenario._dirty_limit: if not hardware._dirty_ring_size: raise Exception("dirty ring size must be configured when " diff --git a/tests/migration-stress/guestperf/scenario.py b/tests/migration= -stress/guestperf/scenario.py index 154c4f5d5f..4be7fafebf 100644 --- a/tests/migration-stress/guestperf/scenario.py +++ b/tests/migration-stress/guestperf/scenario.py @@ -30,7 +30,7 @@ def __init__(self, name, auto_converge=3DFalse, auto_converge_step=3D10, compression_mt=3DFalse, compression_mt_threads=3D1, compression_xbzrle=3DFalse, compression_xbzrle_cache=3D10, - multifd=3DFalse, multifd_channels=3D2, + multifd=3DFalse, multifd_channels=3D2, multifd_compressio= n=3D"", dirty_limit=3DFalse, x_vcpu_dirty_limit_period=3D500, vcpu_dirty_limit=3D1): =20 @@ -61,6 +61,7 @@ def __init__(self, name, =20 self._multifd =3D multifd self._multifd_channels =3D multifd_channels + self._multifd_compression =3D multifd_compression =20 self._dirty_limit =3D dirty_limit self._x_vcpu_dirty_limit_period =3D x_vcpu_dirty_limit_period @@ -85,6 +86,7 @@ def serialize(self): "compression_xbzrle_cache": self._compression_xbzrle_cache, "multifd": self._multifd, "multifd_channels": self._multifd_channels, + "multifd_compression": self._multifd_compression, "dirty_limit": self._dirty_limit, "x_vcpu_dirty_limit_period": self._x_vcpu_dirty_limit_period, "vcpu_dirty_limit": self._vcpu_dirty_limit, @@ -109,4 +111,5 @@ def deserialize(cls, data): data["compression_xbzrle"], data["compression_xbzrle_cache"], data["multifd"], - data["multifd_channels"]) + data["multifd_channels"], + data["multifd_compression"]) diff --git a/tests/migration-stress/guestperf/shell.py b/tests/migration-st= ress/guestperf/shell.py index 046afeb84e..63bbe3226c 100644 --- a/tests/migration-stress/guestperf/shell.py +++ b/tests/migration-stress/guestperf/shell.py @@ -131,6 +131,8 @@ def __init__(self): action=3D"store_true") parser.add_argument("--multifd-channels", dest=3D"multifd_channels= ", default=3D2, type=3Dint) + parser.add_argument("--multifd-compression", dest=3D"multifd_compr= ession", + default=3D"") =20 parser.add_argument("--dirty-limit", dest=3D"dirty_limit", default= =3DFalse, action=3D"store_true") @@ -167,6 +169,7 @@ def get_scenario(self, args): =20 multifd=3Dargs.multifd, multifd_channels=3Dargs.multifd_channels, + multifd_compression=3Dargs.multifd_compression, =20 dirty_limit=3Dargs.dirty_limit, x_vcpu_dirty_limit_period=3D\ --=20 2.35.3