Thread View: muc.lists.freebsd.hackers
2 messages
2 total messages
Started by Janeri Filho, Osvaldo
Mon, 23 Nov 2026 19:28
AMD performance profiling on FreeBSD: introduction and call for review, testing and feedback
Author: Janeri Filho, Osvaldo
Date: Mon, 23 Nov 2026 19:28
Date: Mon, 23 Nov 2026 19:28
91 lines
12041 bytes
12041 bytes
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/D60004
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
Re: AMD performance profiling on FreeBSD: introduction and call for review, testing and feedback
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads