From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E6DB041EC0; Fri, 17 Mar 2023 20:26:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C77A742FD8; Fri, 17 Mar 2023 20:26:01 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 2322442F98 for ; Fri, 17 Mar 2023 20:26:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679081160; h=from:from:reply-to:subject:subject: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=VX4KPRkoI7azRphDhRddw7lwGZSQlWcCSUMVGKmeoIA=; b=JWpbDjYXPoIHRfobUDPRb0Cwq35wiDg1iGhFgniZr5Y5FHGY/GTyF7Hge6PQlWevVkYyQ/ iiubxIUQTbZW4xSTTMAKTC1bPm7CjD3kXhZT8tBXMzlz3mE2+1UWggA2L82B/QUECv5+lD Xxxw/2F+Aw9t/gnCsfmY/ISzcJdmlxc= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-317-GjOQGpuSNr-s777voKClBQ-1; Fri, 17 Mar 2023 15:25:59 -0400 X-MC-Unique: GjOQGpuSNr-s777voKClBQ-1 Received: by mail-wm1-f69.google.com with SMTP id m28-20020a05600c3b1c00b003ed307fddadso4693723wms.4 for ; Fri, 17 Mar 2023 12:25:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679081158; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=VX4KPRkoI7azRphDhRddw7lwGZSQlWcCSUMVGKmeoIA=; b=ej075z5KzMDEAQiPx2bFcWZvNGjkrXosS3rhRIQhMU8qNPR7OEqGVIQDm/LLIQJcAK QW7oZZ3zrDBFPUQlGChzIDKg9nu3DWhruEKeCchfzWRZRE+pkxBoJ/tKtSrI4VDzp8nQ KXTKHXdiuotJCx2hsGkXFR0lgTutyOY8GjmjzdyK92JF9y7YtwhCpZmGSEaVXTcUGQvK x5QYuTFt+qFBSZ5wqBbNWDGRsfNWI99xwUTFLPV4ql5X/lGDlj8biklM3SwxL12tenat OzFYWL/NReHKDB8S5NqxrALwaEbAK/q9hqZchm6CBUDVZ5z+aL6lnYfrHuxEAiWxwday EjGw== X-Gm-Message-State: AO0yUKX3wE3Yd433rs5ilUqqIrOfL3nvDE01qxEJxEqe1omfMNc9F+Vh darnpgncGpvFSS8F73IQUIV3dLbKSU4epNfh3Q259OBxwtuZC/pnJzf3L3TjuwI0pXIi3aH56fc imOM= X-Received: by 2002:a05:6000:110a:b0:2ce:a93d:41a7 with SMTP id z10-20020a056000110a00b002cea93d41a7mr7700807wrw.40.1679081158170; Fri, 17 Mar 2023 12:25:58 -0700 (PDT) X-Google-Smtp-Source: AK7set97ZiKiNwHNk18SMfWGDsoRT82S3we69Iv0a/y+VKoZkr+Qr5Uras0EFIXoxE7o31mju6i6ug== X-Received: by 2002:a05:6000:110a:b0:2ce:a93d:41a7 with SMTP id z10-20020a056000110a00b002cea93d41a7mr7700796wrw.40.1679081157864; Fri, 17 Mar 2023 12:25:57 -0700 (PDT) Received: from localhost (2a01cb000f483e00b4815b62aee6aa5b.ipv6.abo.wanadoo.fr. [2a01:cb00:f48:3e00:b481:5b62:aee6:aa5b]) by smtp.gmail.com with ESMTPSA id a7-20020adff7c7000000b002c70ce264bfsm2661090wrq.76.2023.03.17.12.25.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Mar 2023 12:25:57 -0700 (PDT) Mime-Version: 1.0 Date: Fri, 17 Mar 2023 20:25:56 +0100 Message-Id: Cc: , , Subject: Re: [PATCH 2/2] app/testpmd: add testpmd based sleeping From: "Robin Jarry" To: "Anthony Harivel" , "Aman Singh" , "Yuying Zhang" X-Mailer: aerc/0.14.0-150-gd5198705bd18 References: <20230316151438.186241-1-aharivel@redhat.com> <20230316151438.186241-2-aharivel@redhat.com> In-Reply-To: <20230316151438.186241-2-aharivel@redhat.com> X-Mimecast-Spam-Score: 1 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Anthony Harivel, Mar 16, 2023 at 16:14: > Sleep for an incremental amount of time if the fwd engine has processed > less than at least half a burst of packets (i.e 16pkts with default > setting) on a polling iteration of testpmd. > > Upon detecting the threshold of >=3D 16 pkts on an Rxq, reset the sleep > time to zero (i.e. no sleep). > > Sleep time will be increased on each iteration where the low load > conditions remain up to a total of the max sleep time which is set by > the user with the "--max-sleep-us NUM" command line argument or when in > interactive "mode set max_sleep NUM". > > The default max_sleep value is 0, which means that no sleeps will occur > and the default behaviour is unchanged from previously. > > Testing has been performed on AMD EPYC 7702 server with --nb-cores 12. > The results were obtained via turbostat for each individual lcore: > > max_sleep 0 =3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D= =3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D > idle 4Mpps 16Mpps Bursts > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D > C1-state % 0 0 0 0 > C2-state % 0 0 0 0 > % usage 100 100 100 100 > Watt / core 1.14 1.18 1.19 1.14 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D > > max_sleep 500 =3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D= =3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D > idle 4Mpps 16Mpps Bursts > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D > C1-state % 99 85 74 98.6 > C2-state % 0 0 0 0 > % usage 1 15 26 1 > Watt / core 0.04 0.18 0.28 0 04 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D > > max_sleep 1000 =3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D= =3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D > idle 4Mpps 16Mpps Bursts > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D > C1-state % 0 85 74 0.3 > C2-state % 99 0 0 97.6 > % usage 1 15 25 1 > Watt / core 0.02 0.18 0.28 0 02 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D > > On most cases, the consumption of the cores is greatly improved while > still performing zero packet loss. > > Latency test has been performed on each tests above. The CPU has a C1 > latency of 1us and a C2 latency of 400us. On the worst case scenario, Tx > Burst of thousands packets every seconds, the following latency in us > (micro seconds) has been observed: > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D =3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D > max_sleep 0 500 1000 > ----------- ---- ----- ------ > max latency 14 560 1260 > min latency 5 5 6 > Avg latency 7 305 617 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D =3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D > > link: https://www.github.com/torvalds/linux/tree/master/tools/power/x86/t= urbostat > Signed-off-by: Anthony Harivel Given the amount of time testpmd is used in local development and automated testing, adding such an option is a great addition to save CPU power. Thanks Anthony. Reviewed-by: Robin Jarry