Thursday, August 22nd 2024

AMD Works with Microsoft to Improve Zen 3 thru Zen 5 Performance in Windows 11 24H2

AMD Ryzen 9000 "Granite Ridge" desktop processors have been out for a couple of weeks now, and the "Zen 5" based processors have fallen short of gaming performance expectations, set mainly by some of the numbers AMD put out in its Computex 2024 reveal for the processors. The consensus among the tech press is that these processors are roughly 3-5% faster than Ryzen 7000 series "Raphael," but with noteworthy improvements in energy efficiency. AMD set out to study why there are such vast deltas in performance between its numbers and those of reviews, and arrived a few possible explanations. The company also stated that it is working with Microsoft to fix this in the next major update to Windows 11.

One of them is that AMD's testing was done on Windows 11 23H2 with Admin mode (i.e. a local system administrator account was used), while some reviewers tested with a regular user account that has some admin privileges. Apparently this affects the way the branch prediction units of "Zen 5" processors work. "Our automated test methodology was run in "Admin" mode which produced results that reflect branch prediction code optimizations not present in the version of Windows reviewers used to test Ryzen 9000 Series," AMD said in a statement.
AMD also pointed out that in its first-party tests that compare Ryzen 9000 series processor models to Intel's, the company ran the 14th Gen Core chips with the same DDR5-6000 memory speed with the same timings, and used Intel's baseline power profile that uses stock power limits for these processors (125 W base- and 252 W maximum turbo power in case of the Core i9-14900K and the i7-14700K, for example).

AMD said that it's working with Microsoft to bring the "correct" branch prediction behavior seen in admin mode to regular Windows 11 user accounts. These updates will be incorporated in the retail release of Windows 24H2, although you won't have to wait until then. Microsoft will release this as an "optional update" sooner than that, so it could be implemented on Windows 11 23H2. Here's the best part—it turns out that the admin mode discrepancy even affects "Zen 4" and "Zen 3" processors, which means even Ryzen 5000 thru Ryzen 7000 series processors should get a performance uplift in regular Windows 11 user accounts.
Source: AMD
Add your own comment

83 Comments on AMD Works with Microsoft to Improve Zen 3 thru Zen 5 Performance in Windows 11 24H2

#76
unwind-protect
From a technical standpoint: why would branch prediction be different for root and users?

I am asking both "how" and "why".
Posted on Reply
#77
R0H1T
I've tried a few benches under WinPE & the difference is there, even for AIDA64, roughly in the same ballpark of at least 2-5% over regular admin account. I haven't checked default admin in a long time but it could have something to do with default "Exploit protection" settings under Windows which includes DEP, CFG, SEHOP, ASLR et al.

Posted on Reply
#78
ValenOne
Optional Windows 11 23H2's KB5041587 has a similar uplift.
Posted on Reply
#79
chrcoluk
unwind-protectFrom a technical standpoint: why would branch prediction be different for root and users?

I am asking both "how" and "why".
They not, the gains on the admin account have been misinterpreted, I think @Solaris17 mentioned this in a recent post, and his comment wasnt a mile off a suggestion I made as well. This is also why when HUB tested the Windows build his results were different to when he tested the admin account.
Posted on Reply
#80
Solaris17
Super Dainty Moderator
chrcolukThey not, the gains on the admin account have been misinterpreted, I think @Solaris17 mentioned this in a recent post, and his comment wasnt a mile off a suggestion I made as well. This is also why when HUB tested the Windows build his results were different to when he tested the admin account.
It also just happens to be something that is repeated in a news post we recently posted. You can see they dont directly say they are the same but they dont clarify the statement given by AMD.

This is not related to the recent announcement, but anyone interested can see how branch predictors are not only primarily silicon tools, they only operate at the kernel level (outside of user space)

www.amd.com/system/files/documents/technical-guidance-for-mitigating-branch-type-confusion.pdf

That is a short document going over a different issue from another time Zen 3 I think but the branch predictors are similar even today. Its pretty dry, but you can just skim it to get the idea pretty quickly.
Posted on Reply
#81
Wirko
unwind-protectFrom a technical standpoint: why would branch prediction be different for root and users?

I am asking both "how" and "why".
There's a more fundamental question to be asked: how is it possible to write code that undermines (to an extent) the operation of branch predictors?

I'm not saying there aren't valid explanations for that, maybe related to security. But it's unclear. Modern hardware is designed to chew through many kinds of unoptimised code with great performance. That's in part because history (Itanium is history) has shown that compile-time optimisations aren't very effective because you can't predict which CPU resources will be available at runtime.
Solaris17This is not related to the recent announcement, but anyone interested can see how branch predictors are not only primarily silicon tools, they only operate at the kernel level (outside of user space)

www.amd.com/system/files/documents/technical-guidance-for-mitigating-branch-type-confusion.pdf
Thanks, although this goes over my head (by far). So kernel code can clear branch prediction buffers, with a surprisingly high penalty? Could that reduce the performance with normal user accounts more than with admin accounts? Because of more frequent context switching?
Posted on Reply
#82
SL2
WirkoThere's a more fundamental question to be asked: how is it possible to write code that undermines (to an extent) the operation of branch predictors?

I'm not saying there aren't valid explanations for that, maybe related to security.
Spectre mitigation?

That's the only speculation I've heard, and I have no problem believing it for now.

It can probably be checked by running some benches with an older Windows version, non-updated of course. I dunno if there's any point in doing that, as those updates did affect performance.
Posted on Reply
#83
KLMR
You're losing the point here.
It runs faster on 24H2 because they patched it, not because anything else.
Will they patch W10 scheduler? Probably not. That's the point.

This has been known for years and they decided to work on this after release, knowing older zen will benefit as well.
Posted on Reply
Add your own comment
Nov 2nd, 2024 01:22 EDT change timezone

New Forum Posts

Popular Reviews

Controversial News Posts