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 785BE45A3C for ; Fri, 27 Sep 2024 05:03:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E37E7400EF; Fri, 27 Sep 2024 05:03:31 +0200 (CEST) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id 4D1574003C for ; Fri, 27 Sep 2024 05:03:30 +0200 (CEST) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-71798a15ce5so2085337b3a.0 for ; Thu, 26 Sep 2024 20:03:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727406209; x=1728011009; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=YHFcMjx/bqHWt0M02go1Ke3ySii35sRn7Iq1Yz4EwSk=; b=r3pxNFN/7eCTLYo7BLp8dlbrboBzcfCsp2mH2y8iH+cTUOnf4hSInaHK+HBfBJnTwf iJpvpq5h54tAkka5bFh8keFsd09xAQyqE2d1bboAu1XP0jxCcDBnR4iCN9PqJu8KfZ3y XCsrixrxTXRDUbnU9fA2jAJg0pRJFQGGs282U1xLjOrWQ0Awqkxi5L3C0n5WIU5mepWs ib4KDjmJ6kVYZjaXoa/v4qCs6KW0XscA7y+7l6m2DHq646iV0lcUU8pSfm94rcW0DY3d amKf9b0S3gxmRybjtO5TrD2yCbGIDmPcyLkwxQdHzePLdqnq2FMFeZgUty/EuzdchJag spPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727406209; x=1728011009; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YHFcMjx/bqHWt0M02go1Ke3ySii35sRn7Iq1Yz4EwSk=; b=qJU2vDgrxMG6l5QS+2Zi3QDjXR/PLjQsHUI6NfHAPbfERZMS/TyvDbi7t1onMK2Hg7 gmlhcJfTHfYaujfV+FNdWf+148+VgqgzG18KZHA0j8znUOSAZInRtd3NVeI6GbT2bOnx qwaL7o84ennFstmks8ca0rq+KBdjzBuKUF/BvAl0CXvahENSsqyNAtsZkIwAO0ZEobqO +pr53Sy4zl/0XkKNhiY+nglZrFToUVDn/4MZnVEqWq2LZF8zK9YRUBAQBYly0TRC45Le XvoF+4Tooq5EaAsYHd7zEaLqQ9rNSXrviOVsPwErMVQSbx03um9G9ADyGWXUHbtHXwWF sfYQ== X-Forwarded-Encrypted: i=1; AJvYcCWRSjYzKYtSWrPg0ESffE8dCVU9cbefxrGSVPGsDAGMjnb7+QR0RW6Bj2f/YiDJlNwD9YlZcg==@dpdk.org X-Gm-Message-State: AOJu0YxfAs2ghiI/Zs14u80QGXL5mS2Vttki6ayKdB3qo4Vd4PkaeqTK 5Is67B9osIKkdFJp7To8kCsclZv3JpjLLeZWZ45IVZYt/cHSGSYg7mJ9Flblb5VfUMrxApU7eG8 CRe4YNw== X-Google-Smtp-Source: AGHT+IEz7H7e2IyahXGVcrNLZVMlCIsZ/A69slyGZpHqQd+piqnL+iIz7BZqWjYYiut60yfb+/s6Ag== X-Received: by 2002:a05:6a21:8885:b0:1d4:f965:a6f8 with SMTP id adf61e73a8af0-1d4f965a86dmr3407869637.24.1727406209260; Thu, 26 Sep 2024 20:03:29 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7e6db61197bsm607098a12.87.2024.09.26.20.03.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 20:03:29 -0700 (PDT) Date: Thu, 26 Sep 2024 20:03:27 -0700 From: Stephen Hemminger To: amit sehas Cc: Nishant Verma , "users@dpdk.org" Subject: Re: core performance Message-ID: <20240926200327.6f74ae2d@hermes.local> In-Reply-To: <610700496.13049973.1727370197636@mail.yahoo.com> References: <1987164393.11670398.1727125003663.ref@mail.yahoo.com> <1987164393.11670398.1727125003663@mail.yahoo.com> <1299564509.11731667.1727133474900@mail.yahoo.com> <2025533199.11789856.1727143607670@mail.yahoo.com> <2042269904.11975457.1727188849962@mail.yahoo.com> <20240924093813.29a01783@fedora> <26643152.12164440.1727210825368@mail.yahoo.com> <810098753.12902128.1727353971978@mail.yahoo.com> <47151973.13053687.1727369764729@mail.yahoo.com> <610700496.13049973.1727370197636@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On Thu, 26 Sep 2024 17:03:17 +0000 (UTC) amit sehas wrote: > If there is a way to determine: >=20 > vCPU thread utilization numbers over a period of time, such as a few hours >=20 > or which processes are consuming the most CPU >=20 > top always indicates that the server is consuming the most CPU. >=20 > Now i am begining to wonder if 8 vCPU threads really are capable of runni= ng 6 high intensity threads or only 4 such threads? Dont know >=20 > Also tried to utilize=C2=A0pthread_setschedparam() explicitly on some of = the threads, it made no difference to the performance. But if we do it on m= ore than 1-2 threads then it hangs the whole system. >=20 > This is primarily a matter of CPU scheduling, and if we restirct context = switching on even 2 critical threads we have a win. >=20 >=20 Some other recommendations. - avoid CPU 0 you can't isolate it, and it has other stuff that has to ru= n there if you have main thread that sleeps, and worker threads that poll, then go ahead and put main on cpu 0. - don't put two active polling cores on shared hyper-thread. You can used DPDK's cpu_layout.py script to show this. For example: $ ./usertools/cpu_layout.py=20 =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=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 Core and Socket Information (as reported by '/sys/devices/system/cpu') =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=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 cores =3D [0, 1, 2, 3] sockets =3D [0] Socket 0 =20 -------- =20 Core 0 [0, 4] =20 Core 1 [1, 5] =20 Core 2 [2, 6] =20 Core 3 [3, 7]=20 On this system, don't poll on cores 0 and 4 (system activity). Use lcore 1, 2, 3=20