Article View: muc.lists.freebsd.hackers
Article #117Re: AMD performance profiling on FreeBSD: introduction and call for review, testing and feedback
From: Eva Winterschön
Date: Mon, 23 Nov 2026 21:02
Date: Mon, 23 Nov 2026 21:02
133 lines
13256 bytes
13256 bytes
Hello Osvaldo, I'm glad this is finally receiving the focus it deserves. While I was the Principal Systems Architect at Fastly, having built the Performance Engineering Team, working under former SVP Laura Thompson, the several thousand AMD systems we deployed globally had such severely limited insight on critical tooling for performance diagnostics vs Intel that I suggested we stop purchasing AMD systems entirely. There were still ~900 nodes in integrated OCP racks waiting on pallets to ship so there was no going back. It absolutely affected the share price. These mostly ran Linux but my performance lab was strongly focused on comparative analytics with automated testing across multiple generations of Zen2,3,4 with FreeBSD included expressely to show how FreeBSD would offer better perf metrics per watt vs Intel in certain use cases - especially critical when moving from dual socket Xeon to single socket AMD. Interesting years, though ones I have no interest in repeating. Later, while building an Ai/LLM startup I thought - ok, lets make sure that at least the lower TDP revised EPYC (4564P) has had improvements and we can use them for edge GPU nodes. This was the final straw, and while it ran FreeBSD 14-15 better than my then-low expectations had expected, its PCIe subsystem was so unstable and unreliable that its deployments resulted in net-negative workload processing in the HPC edge clusters (SLURM nodes on connected fabric via RoCE-v2 using 1x Bluefield2 + 1x Ampere series GPU, each with 128GB ECC on Supermicro boards). I keep one for the overly-often released firmware updates, and with each new fix are introduced new regressions. So it's mostly a box who's entire purpose is to remind me to only spec ARM64, POWER9+, and Xeons. Really hope the team renews the once stellar reputation of Opteron glory years. Sincerely, Eva Winterschön On Mon, Nov 23, 2026, at 21:28, Janeri Filho, Osvaldo wrote: > Hi all, > > My name is Osvaldo. I am currently at AMD, with a team of very skilled > engineers > (Andre Silva, Anderson Nascimento and Davi C.A) working on > performance monitoring and profiling for AMD processors on FreeBSD, and > with > help and mentorship of Professor Ali. > We have been posting our work on Phabricator for a few months, and I > would like to introduce the project to a wider audience and invite > you to take part. > > The goal is to make performance analysis on current AMD hardware > (Zen 4, Zen 5 and Zen 6) work well on FreeBSD, with the same kind of > tooling people use on other systems. Most of the work is in > hwpmc(4), libpmc and pmcstat(8), together with Ali Mashtizadeh's new > pmc(8) tool. The test suite runs in the FreeBSD CI and skips on > systems without the hardware. > > Some of what has already landed in main: > > - PerfMonV2 global control for the core counters > https://reviews.freebsd.org/D58256 > - RAPL energy counters and the PERF class (APERF, MPERF, IRPERF) > https://reviews.freebsd.org/D58028 > https://reviews.freebsd.org/D59554 > - IBS fixes and Zen 6 IBS filters > https://reviews.freebsd.org/D6000 > https://reviews.freebsd.org/D56914 > - Core counters are now serviced when IBS claims the NMI > https://reviews.freebsd.org/D61451 > - Uncore fixes for the Data Fabric and the memory controller (UMC) > https://reviews.freebsd.org/D60769 > https://reviews.freebsd.org/D60771 > - About 80 ATF test cases in tests/sys/pmc and tests/sys/pmc/amd > https://reviews.freebsd.org/D59549 > https://reviews.freebsd.org/D61062 > https://reviews.freebsd.org/D61063 > > And some of what is in review: > > - Event grouping and multiplexing, so that more events can be > measured than there are counters > https://reviews.freebsd.org/D57630 > https://reviews.freebsd.org/D57633 > - IBS behaviour under high sample rates: stalled units, minimum > periods, rate limits and drop records > https://reviews.freebsd.org/D61365 > https://reviews.freebsd.org/D61371 > - AMD LBR v2 branch sampling, on top of Ali's branch history > interface > https://reviews.freebsd.org/D58698 > https://reviews.freebsd.org/D60570 > - AMD IOMMU performance counters > https://reviews.freebsd.org/D60548 > - Large Increment per Cycle events > https://reviews.freebsd.org/D61053 > > We would welcome help in any of these ways: > > - Bug reports. If you see a problem with hwpmc, pmcstat or pmc on > AMD hardware, please file it in Bugzilla. We watch Bugzilla for > PMC and AMD-related reports and try to send fixes quickly. > Replying on this list or adding us to a review works too. > - Reviews and design discussion, especially on the grouping and > multiplexing ABI, which is the largest change. > - Testing on hardware we have less access to: Zen 1 to Zen 3, > two-socket systems, and Intel or arm64 machines to catch > regressions. The tests run with: > kyua test -k /usr/tests/sys/pmc/Kyuafile > - Suggestions. If you profile on FreeBSD today, or gave up and used > another system, we would like to know what was missing. > > We plan to keep the community updated through this list as larger > pieces land or when we need input on a design decision. > > Thanks to Mitchell Horne, Ali Mashtizadeh, Mark Jonhston, Konstantin Belousov, > Adrian Chadd and Warner Losh for the reviews and commits so far. > > Along the way we also found and fixed bugs outside of PMC, mostly > while testing on AMD hardware or reading code next to ours. > We will keep sending these as we find them. > > Best regards, > Osvaldo Janeri Filho -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<94fdb84e-97ff-4861-81f6-aa21114d90f3@app.fastmail.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mailReferences:
<PH9PR12MB145095BA9FE736E642598E4821E0452@PH9PR12MB145095.namprd12.prod.outlook.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: Eva Winterschön <freebsd-virt.eva@winterschon.com>
Newsgroups: muc.lists.freebsd.hackers
Subject: Re: AMD performance profiling on FreeBSD: introduction and call for review,
testing and feedback
Date: Mon, 23 Nov 2026 23:02:39 +0200
Organization: Newsgate at muc.de e.V.
Approved: news-admin@muc.de
Distribution: world
Message-ID: <94fdb84e-97ff-4861-81f6-aa21114d90f3@app.fastmail.com>
References: <PH9PR12MB145095BA9FE736E642598E4821E0452@PH9PR12MB145095.namprd12.prod.outlook.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
logging-data="91204"; mail-complaints-to="news-admin@muc.de"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1795467789;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:list-id:list-help:
list-owner:list-unsubscribe:list-subscribe:list-post;
bh=rLxmxUyO/KPIHWV5M3R/nx1L+/AbmbsOtEkoMoch/ts=;
b=TYehNcy/ZyQsodmlZPB8IVreUhxIENcWn/5Z8okyff/ORnZiWAtjD4w+etCeV18Khj92Gx
V3lDidfm1/ngM+kSgS0LncB2Jkz73CEIfMNMe5iCANRFuy9RI+TG1V+dKt1F9nQSZB0FNO
c+9idcr/pSYjKVouS2qI6yX/3lfQ3p26GtZ4afrf9d4MuhEXza6CFL6ro8OSEG3grZaZWm
zoYBj0fRFajym2n0TSo7ij9vSXK2DTLV/yYYDmXf6IM68JwA9amcNac9aGI1o3TDCpv5EW
l2EWutWQNe9uV+V/7w+t0dEueOLqvII6XjIEZda+AcxQyNs+iTiFwzKbBSMqLQ==
X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org
Authentication-Results: mx1.freebsd.org;
dkim=pass header.d=winterschon.com header.s=fm2 header.b=KwXeBp1J;
dkim=pass header.d=messagingengine.com header.s=fm3 header.b=j39lFPBX;
spf=pass (mx1.freebsd.org: domain of freebsd-virt.eva@winterschon.com designates 103.168.172.145 as permitted sender) smtp.mailfrom=freebsd-virt.eva@winterschon.com;
dmarc=pass (policy=quarantine) header.from=winterschon.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=winterschon.com;
h=cc:content-transfer-encoding:content-type:content-type:date
:date:from:from:in-reply-to:in-reply-to:message-id:mime-version
:references:reply-to:subject:subject:to:to; s=fm2; t=1795467783;
x=1795554183; bh=rLxmxUyO/KPIHWV5M3R/nx1L+/AbmbsOtEkoMoch/ts=; b=
KwXeBp1J5VF80dxakX1WmByuk/RoF9uMKUjUGvrMV6ZVQz8EUGBvsHTCSdtcivDE
Jg+1iUSXA0Bx3S8zTfqJbf/FAgAGfe0fuMdN5pdi0hGPGcJBPvrZpv/v8e6P5aHY
LCizgLAZIgE1xSAY7iMEGAfkEZTPj72zJLe1enXnDEVLz+wM6KdEyIcKh4sdXTJP
EysIY1xUjaVHwATdUVVfyp1iM5E/YP4HV9RgpnFHwRN2HHKh4AJ+ZgU2SCmjWL3M
anjmpwyECwuwIxONyfxi6HoSqnBTXvTUQxLmic0gcvQUGboSC/r6mTB1s34lcWSc
TMimNYr0ZjpanvgZA+I76w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
messagingengine.com; h=cc:content-transfer-encoding:content-type
:content-type:date:date:feedback-id:feedback-id:from:from
:in-reply-to:in-reply-to:message-id:mime-version:references
:reply-to:subject:subject:to:to:x-me-proxy:x-me-sender
:x-me-sender:x-sasl-enc; s=fm3; t=1795467783; x=1795554183; bh=r
LxmxUyO/KPIHWV5M3R/nx1L+/AbmbsOtEkoMoch/ts=; b=j39lFPBXOrt9AMx/R
AvmQNmGWzAiCwHIx+Rj+skyOVqK++bW6a3cLxzJeBqqSXkaYOZKxPTZ5iTF2spLI
pY+32DdecvZjGCJ57M7tKKcSWggQ6X35kT/eGP4dFc1R9WYpvyhL85y5NDfEuIAZ
CpvZCj9vurTJrF6VQLbyk7FD49wDqlRAPHSpueYGVD6Osff4NlHZ9wlx6VJzB+GC
g03jpcbNz3G2PAKhgYVb8Zv2FrIA6x0XBtanyzHYFxiY7sVvw3wAPQUoCvQkiQQZ
RXouia/LZ8kIvQSAPsJvjuqKlMX9212mA6DxiatdWcK6tEkd1i0uBdd8bm8bk6Sl
7Q67g==
X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09;
repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox;
action=sign d=winterschon.com a=rsa-sha256;
DKIM2-Signature: i=1; m=1; t=1795467783; d=winterschon.com;
mf=PGZyZWVic2QtdmlydC5ldmFAd2ludGVyc2Nob24uY29tPg==;
rt=PGZyZWVic2QtaGFja2Vyc0BGcmVlQlNELm9yZz4=;
s=fm2:rsa-sha256:aX5yqV//qB+jY8kaxlxFrkKtMMxsGiBguN4kQzwOiZZpC8t
lAh9ImlAp53HAFBedvFUdU+u+jgkFIs7kEvlDrwm/Qpn/R/TdXBjm4Sv3fFLVS60
cB3Ve69kLGAUwmMZ/BvoNNy8IKL+lrNiI1w6D/s5RUquNjzmS7qq8VfN11ccyFsN
tXsbw4Yh0wiUAJQcRedmKepVMZfISglIgvGfC0bRYEm+JP7ffLMyNv+oLFH6Q0ig
NBKzVuEYOnEgofkzL3/lg6qbo+wZR9WeK0n3eIBz8N8w7L/8fDBDQgiD1ateLz58
lQ8udFYRWVvqCUYd2g+Xvpgt5O13/JQGwegxoJA==;
X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09;
repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox;
action=mi-m=1; hc=11;
hn=content-transfer-encoding,content-type,date,feedback-id,from,
in-reply-to,message-id,mime-version,references,subject,to;
Message-Instance: m=1; h=sha256:lGEb7vAoCB9Bl8pV4vuzXhO6DXGSshwyKi4MNq3oNw0=:AjlPo1Q4RM3oVpKb8rvYLZUl6IaG6fzhHL8dzAIgBFA=;
X-ME-Sender: <xms:BKoEa653UIxGTQn7kYs1xur1BAa8egwgf7e7VAWYPRT0Zu9RZvYU8w>
<xme:BKoEa-scwB3Q0AhNl9cMMIJWk-fLLk-YX90RDZhdy71Ywib5cPJtJ3kkwM6lZouO6
Yuob3bw5DmmQavU0FyPNfpQLkdWzDgKCYCmdARTSkz0ZCeTOz_KWDs>
X-ME-Proxy-Cause: dmFkZTEwRCKWB/RfMuRSq+T9+4tFoJdumKLUH9KCtyZMlIHM25ouYJu4EJleJpBZT26ly2
IG8pRawxwxHDEas1Jg0CCAdtAZnSJ7NhWREUezA20AIikIIOdJFjGToV1wYc1RvTR/ga1V
CZ79E9wTdWFBVmjzHan9XQ2iNh4Zvxh0+og5IF+QPTfMw9VPagb1czKVAkL1Rr1t7Xoh4Q
X3bCSNBun4tbp8XnActJpDjZ7OpBqERhA8x6py7OvrffjIL9uLLHprRwxtIkxxwcRPznIB
BQYlyn/1JQ50xiA+YA88qV9xfY7VhHfCT+WxwrTUXgkUIXrUpFc43MaRS10VaVgp0GgglF
sqceycxJrN0yyjmH+g6n9ZX9oolQn8NTDpJqT9al/9QfsBbpEwz1mIFzhXuzYmknVkZW0r
dL36XhK9G0HDWtpNsMskmLqpIB50IG42Je9mUCzBFfdDT2QPFo3skJANhQwFUM5hBNm0Js
vh8nrztpbOxcdg4mGXTHarJO6PJ3bx0BL9mDFA8tUUFM9Fl49Rds+Aqgfgbm7yYVEMDbeP
0daTvFw1aYNA5y47S7ymfnx7km0O1A9QDkTnCjWuzf+t148P777QJ6YzrfYgrwDaWSYUq8
t/RjyNLee4qsIvckhEmCNfBvqg0Pw6Q52HHDFX/EqSrAyQvtNcjLgW5qhjaQ
X-ME-Proxy: <xmx:BaoEa4dKOFu0vNaQ3LsN6BmfvKdAR-54v-iIs5uP-JWknwYKFhSD5Q>
<xmx:BaoEaxIaAddgrbTKPpCnQGL4HAqCN3sJertZ6Yx6A6M7FHAyaATWPQ>
<xmx:BaoEa_KwnqnS_SXX5OjBGpa4Zhn2oRUH3MAdwFcGc6l9gifb5hvTdg>
<xmx:BaoEazFEGC8qM5RHUP4nnMYDn4anFgVLyfZwo9kFR9jmzXRRLV1ljg>
<xmx:B6oEa3jNsojOl3Zp8tMSnqlveyiTYeZ1AIEdAst61af7U-T8aVRFxyCL>
Feedback-ID: ic82e4800:Fastmail
Precedence: list
In-Reply-To: <PH9PR12MB145095BA9FE736E642598E4821E0452@PH9PR12MB145095.namprd12.prod.outlook.com>
X-Rspamd-Queue-Id: 4jYJLd17WQz4nr4
X-Spamd-Bar: +
X-Spamd-Result: default: False [1.01 / 15.00];
INTRODUCTION(2.00)[];
DMARC_POLICY_ALLOW(-0.50)[winterschon.com,quarantine];
R_DKIM_ALLOW(-0.20)[winterschon.com:s=fm2,messagingengine.com:s=fm3];
R_SPF_ALLOW(-0.20)[+ip4:103.168.172.128/27];
MIME_GOOD(-0.10)[text/plain];
XM_UA_NO_VERSION(0.01)[];
RCPT_COUNT_ONE(0.00)[1];
ASN(0.00)[asn:151847, ipnet:103.168.172.0/24, country:AU];
MIME_TRACE(0.00)[0:+];
DWL_DNSWL_NONE(0.00)[messagingengine.com:dkim];
ARC_NA(0.00)[];
RCVD_TLS_LAST(0.00)[];
MLMMJ_DEST(0.00)[freebsd-hackers@FreeBSD.org];
RCVD_IN_DNSWL_NONE(0.00)[103.168.172.145:from];
FROM_EQ_ENVFROM(0.00)[];
FROM_HAS_DN(0.00)[];
TO_DN_ALL(0.00)[];
TO_MATCH_ENVRCPT_ALL(0.00)[];
RCVD_COUNT_THREE(0.00)[3];
PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org];
DKIM_TRACE(0.00)[winterschon.com:+,messagingengine.com:+]
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes