From nobody Wed Nov 27 15:47:27 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1699013212; cv=none; d=zohomail.com; s=zohoarc; b=YPzoxc5BuZVuiTczDQT4+6Sj1Bjs2leZzvGpUpcY+9JPzXE29ymQIa66vcF2jrEwtIYjEM3XYvtFvaHdGwqJy/jqI/vE7JUOaeootRwO6NhB5Td1Nn5D7cXly2JrJd3T4imWFRGf7i+Dq0favO4+XAlxAZGeSBqDDq4+bWoUMHo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699013212; h=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=hRSHHwPnC2Z9YXzFyuFgbzYTpRZn4iKICC8SMLYuLFE=; b=azODQmS9GPEg+b8dVI3Fk8TiKeaJBsknXjjVEEjQTsV5lWptkJoqRw0WRAjjiZwJfeECXtND9/vfUTw+30+EXKLZrndBJ3eNAn6/PhPYLnamjz/ibhl/+AHWb5CXW5K8wBC8lGdddAneI8OwKEM2zFleoCEh3Lq5r/XopU688KI= 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 1699013212359243.228821925626; Fri, 3 Nov 2023 05:06:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qysvm-0007mk-NY; Fri, 03 Nov 2023 08:05:42 -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 1qysvB-0007R8-9C for qemu-devel@nongnu.org; Fri, 03 Nov 2023 08:05:17 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qysv9-0001X3-9P for qemu-devel@nongnu.org; Fri, 03 Nov 2023 08:05:05 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-536-mOSR6qidO6in4LrJJQIJmQ-1; Fri, 03 Nov 2023 08:05:01 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 12D8F828AC0; Fri, 3 Nov 2023 12:05:01 +0000 (UTC) Received: from secure.mitica (unknown [10.39.195.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 64401492BE0; Fri, 3 Nov 2023 12:04:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699013102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hRSHHwPnC2Z9YXzFyuFgbzYTpRZn4iKICC8SMLYuLFE=; b=YstK15IvBPuK0BrcjPYg0RhNukUjzYmacLPfpjrgEoPUX0Qm2NP3qp48Qwsohe0K2uWGXs rvyJ0nIDMtzxATb35ievpDoh2CWYgRQGrTXJW7rbNziydU6qakgwGiwK2yq+i8z+3r2GoI qhnuTOqyEnwQH3ICoki5Z8mUgFFE5dU= X-MC-Unique: mOSR6qidO6in4LrJJQIJmQ-1 From: Juan Quintela To: qemu-devel@nongnu.org Cc: Hyman Huang , Thomas Huth , Peter Xu , Paolo Bonzini , Fabiano Rosas , Laurent Vivier , Juan Quintela , Leonardo Bras Subject: [PULL 5/7] tests/migration: Introduce dirty-limit into guestperf Date: Fri, 3 Nov 2023 13:04:46 +0100 Message-ID: <20231103120448.58428-6-quintela@redhat.com> In-Reply-To: <20231103120448.58428-1-quintela@redhat.com> References: <20231103120448.58428-1-quintela@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 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=170.10.133.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.47, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 @redhat.com) X-ZM-MESSAGEID: 1699013214512100007 Content-Type: text/plain; charset="utf-8" From: Hyman Huang Currently, guestperf does not cover the dirty-limit migration, support this feature. Note that dirty-limit requires 'dirty-ring-size' set. To enable dirty-limit, setting x-vcpu-dirty-limit-period as 500ms and x-vcpu-dirty-limit as 10MB/s: $ ./tests/migration/guestperf.py \ --dirty-ring-size 4096 \ --dirty-limit --x-vcpu-dirty-limit-period 500 \ --vcpu-dirty-limit 10 --output output.json \ To run the entire standardized set of dirty-limit-enabled comparisons, with unix migration: $ ./tests/migration/guestperf-batch.py \ --dirty-ring-size 4096 \ --dst-host localhost --transport unix \ --filter compr-dirty-limit* --output outputdir Signed-off-by: Hyman Huang Reviewed-by: Fabiano Rosas Message-Id: <516e7a55dfc6e33d33510be37eb24223de5dc072.1697815117.git.yong.h= uang@smartx.com> Message-ID: Signed-off-by: Juan Quintela --- tests/migration/guestperf/comparison.py | 23 +++++++++++++++++++++++ tests/migration/guestperf/engine.py | 17 +++++++++++++++++ tests/migration/guestperf/progress.py | 16 ++++++++++++++-- tests/migration/guestperf/scenario.py | 11 ++++++++++- tests/migration/guestperf/shell.py | 18 +++++++++++++++++- 5 files changed, 81 insertions(+), 4 deletions(-) diff --git a/tests/migration/guestperf/comparison.py b/tests/migration/gues= tperf/comparison.py index c03b3f6d7e..42cc0372d1 100644 --- a/tests/migration/guestperf/comparison.py +++ b/tests/migration/guestperf/comparison.py @@ -135,4 +135,27 @@ def __init__(self, name, scenarios): Scenario("compr-multifd-channels-64", multifd=3DTrue, multifd_channels=3D64), ]), + + # Looking at effect of dirty-limit with + # varying x_vcpu_dirty_limit_period + Comparison("compr-dirty-limit-period", scenarios =3D [ + Scenario("compr-dirty-limit-period-500", + dirty_limit=3DTrue, x_vcpu_dirty_limit_period=3D500), + Scenario("compr-dirty-limit-period-800", + dirty_limit=3DTrue, x_vcpu_dirty_limit_period=3D800), + Scenario("compr-dirty-limit-period-1000", + dirty_limit=3DTrue, x_vcpu_dirty_limit_period=3D1000), + ]), + + + # Looking at effect of dirty-limit with + # varying vcpu_dirty_limit + Comparison("compr-dirty-limit", scenarios =3D [ + Scenario("compr-dirty-limit-10MB", + dirty_limit=3DTrue, vcpu_dirty_limit=3D10), + Scenario("compr-dirty-limit-20MB", + dirty_limit=3DTrue, vcpu_dirty_limit=3D20), + Scenario("compr-dirty-limit-50MB", + dirty_limit=3DTrue, vcpu_dirty_limit=3D50), + ]), ] diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestper= f/engine.py index aabf6de4d9..608d7270f6 100644 --- a/tests/migration/guestperf/engine.py +++ b/tests/migration/guestperf/engine.py @@ -102,6 +102,8 @@ def _migrate_progress(self, vm): info.get("expected-downtime", 0), info.get("setup-time", 0), info.get("cpu-throttle-percentage", 0), + info.get("dirty-limit-throttle-time-per-round", 0), + info.get("dirty-limit-ring-full-time", 0), ) =20 def _migrate(self, hardware, scenario, src, dst, connect_uri): @@ -203,6 +205,21 @@ def _migrate(self, hardware, scenario, src, dst, conne= ct_uri): resp =3D dst.cmd("migrate-set-parameters", multifd_channels=3Dscenario._multifd_channels) =20 + if scenario._dirty_limit: + if not hardware._dirty_ring_size: + raise Exception("dirty ring size must be configured when " + "testing dirty limit migration") + + resp =3D src.cmd("migrate-set-capabilities", + capabilities =3D [ + { "capability": "dirty-limit", + "state": True } + ]) + resp =3D src.cmd("migrate-set-parameters", + x_vcpu_dirty_limit_period=3Dscenario._x_vcpu_dirty_limit_p= eriod) + resp =3D src.cmd("migrate-set-parameters", + vcpu_dirty_limit=3Dscenario._vcpu_dirty_limit) + resp =3D src.cmd("migrate", uri=3Dconnect_uri) =20 post_copy =3D False diff --git a/tests/migration/guestperf/progress.py b/tests/migration/guestp= erf/progress.py index ab1ee57273..d490584217 100644 --- a/tests/migration/guestperf/progress.py +++ b/tests/migration/guestperf/progress.py @@ -81,7 +81,9 @@ def __init__(self, downtime, downtime_expected, setup_time, - throttle_pcent): + throttle_pcent, + dirty_limit_throttle_time_per_round, + dirty_limit_ring_full_time): =20 self._status =3D status self._ram =3D ram @@ -91,6 +93,10 @@ def __init__(self, self._downtime_expected =3D downtime_expected self._setup_time =3D setup_time self._throttle_pcent =3D throttle_pcent + self._dirty_limit_throttle_time_per_round =3D \ + dirty_limit_throttle_time_per_round + self._dirty_limit_ring_full_time =3D \ + dirty_limit_ring_full_time =20 def serialize(self): return { @@ -102,6 +108,10 @@ def serialize(self): "downtime_expected": self._downtime_expected, "setup_time": self._setup_time, "throttle_pcent": self._throttle_pcent, + "dirty_limit_throttle_time_per_round": + self._dirty_limit_throttle_time_per_round, + "dirty_limit_ring_full_time": + self._dirty_limit_ring_full_time, } =20 @classmethod @@ -114,4 +124,6 @@ def deserialize(cls, data): data["downtime"], data["downtime_expected"], data["setup_time"], - data["throttle_pcent"]) + data["throttle_pcent"], + data["dirty_limit_throttle_time_per_round"], + data["dirty_limit_ring_full_time"]) diff --git a/tests/migration/guestperf/scenario.py b/tests/migration/guestp= erf/scenario.py index de70d9b2f5..154c4f5d5f 100644 --- a/tests/migration/guestperf/scenario.py +++ b/tests/migration/guestperf/scenario.py @@ -30,7 +30,9 @@ 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, + dirty_limit=3DFalse, x_vcpu_dirty_limit_period=3D500, + vcpu_dirty_limit=3D1): =20 self._name =3D name =20 @@ -60,6 +62,10 @@ def __init__(self, name, self._multifd =3D multifd self._multifd_channels =3D multifd_channels =20 + self._dirty_limit =3D dirty_limit + self._x_vcpu_dirty_limit_period =3D x_vcpu_dirty_limit_period + self._vcpu_dirty_limit =3D vcpu_dirty_limit + def serialize(self): return { "name": self._name, @@ -79,6 +85,9 @@ def serialize(self): "compression_xbzrle_cache": self._compression_xbzrle_cache, "multifd": self._multifd, "multifd_channels": self._multifd_channels, + "dirty_limit": self._dirty_limit, + "x_vcpu_dirty_limit_period": self._x_vcpu_dirty_limit_period, + "vcpu_dirty_limit": self._vcpu_dirty_limit, } =20 @classmethod diff --git a/tests/migration/guestperf/shell.py b/tests/migration/guestperf= /shell.py index 7d6b8cd7cf..c85d89efec 100644 --- a/tests/migration/guestperf/shell.py +++ b/tests/migration/guestperf/shell.py @@ -131,6 +131,17 @@ def __init__(self): parser.add_argument("--multifd-channels", dest=3D"multifd_channels= ", default=3D2, type=3Dint) =20 + parser.add_argument("--dirty-limit", dest=3D"dirty_limit", default= =3DFalse, + action=3D"store_true") + + parser.add_argument("--x-vcpu-dirty-limit-period", + dest=3D"x_vcpu_dirty_limit_period", + default=3D500, type=3Dint) + + parser.add_argument("--vcpu-dirty-limit", + dest=3D"vcpu_dirty_limit", + default=3D1, type=3Dint) + def get_scenario(self, args): return Scenario(name=3D"perfreport", downtime=3Dargs.downtime, @@ -154,7 +165,12 @@ def get_scenario(self, args): compression_xbzrle_cache=3Dargs.compression_xbzrle= _cache, =20 multifd=3Dargs.multifd, - multifd_channels=3Dargs.multifd_channels) + multifd_channels=3Dargs.multifd_channels, + + dirty_limit=3Dargs.dirty_limit, + x_vcpu_dirty_limit_period=3D\ + args.x_vcpu_dirty_limit_period, + vcpu_dirty_limit=3Dargs.vcpu_dirty_limit) =20 def run(self, argv): args =3D self._parser.parse_args(argv) --=20 2.41.0