CPU Tests: Microbenchmarks

Core-to-Core Latency

As the core count of modern CPUs is growing, we are reaching a time when the time to access each core from a different core is no longer a constant. Even before the advent of heterogeneous SoC designs, processors built on large rings or meshes can have different latencies to access the nearest core compared to the furthest core. This rings true especially in multi-socket server environments.

But modern CPUs, even desktop and consumer CPUs, can have variable access latency to get to another core. For example, in the first generation Threadripper CPUs, we had four chips on the package, each with 8 threads, and each with a different core-to-core latency depending on if it was on-die or off-die. This gets more complex with products like Lakefield, which has two different communication buses depending on which core is talking to which.

If you are a regular reader of AnandTech’s CPU reviews, you will recognize our Core-to-Core latency test. It’s a great way to show exactly how groups of cores are laid out on the silicon. This is a custom in-house test built by Andrei, and we know there are competing tests out there, but we feel ours is the most accurate to how quick an access between two cores can happen.

AMD’s move from a dual 4-core CCX design to a single larger 8-core CCX is a key characteristic of the new Zen3 microarchitecture. Beyond aggregating the separate L3’s together for a large single pool in single-threaded scenarios, the new Cezanne-based mobile SoCs also completely do away with core-to-core communications across the SoC’s infinity fabric, as all the cores in the system are simply housed within the one shared L3.

What’s interesting to see here is also that the new monolithic latencies aren’t quite as flat as in the previous design, with core-pair latencies varying from 16.8ns to 21.3ns – probably due to the much larger L3 this generation and more wire latency to cross the CCX, as well as different boost frequencies between the cores. There has been talk as to the exact nature of the L3 slices, whether they are connected in a ring or in an all-to-all scenario. AMD says it is an 'effective' all-to-all, although the exact topology isn't quite. We have some form of mesh with links, beyond a simple ring, but not a complete all-to-all design. This will get more complex should AMD make these designs larger.

Cache-to-DRAM Latency

This is another in-house test built by Andrei, which showcases the access latency at all the points in the cache hierarchy for a single core. We start at 2 KiB, and probe the latency all the way through to 256 MB, which for most CPUs sits inside the DRAM (before you start saying 64-core TR has 256 MB of L3, it’s only 16 MB per core, so at 20 MB you are in DRAM).

Part of this test helps us understand the range of latencies for accessing a given level of cache, but also the transition between the cache levels gives insight into how different parts of the cache microarchitecture work, such as TLBs. As CPU microarchitects look at interesting and novel ways to design caches upon caches inside caches, this basic test proves to be very valuable.

As with the Ryzen 5000 Zen3 desktop parts, we’re seeing extremely large changes in the memory latency behaviour of the new Cezanne chip, with AMD changing almost everything about how the core works in its caches.

At the L1 and L2 regions, AMD has kept the cache sizes the same at respectively 32KB and 512KB, however depending on memory access pattern things are very different for the resulting latencies as the engineers are employing more aggressive adjacent cache line prefetchers as well as employing a brand-new cache line replacement policy.

In the L3 region from 512KB to 16 MB - well, the fact that we’re seeing this cache hierarchy quadrupled from the view of a single core is a major benefit of cache hit rates and will greatly benefit single-threaded performance. The actual latency in terms of clock cycles has gone up given the much larger cache structure, and AMD has also tweaked and changes the dynamic behaviour of the prefetchers in this region.

In the DRAM side of things, the most visible change is again this much more gradual latency curve, also a result of Zen3’s newer cache line replacement policy. All the systems tested here feature LPDDR4X-4266 memory, and although the new Cezanne platform has a slight advantage with the timings, it ends up around 13ns lower latency at the same 128MB test depth point into DRAM, beating the Renoir system and tying with Intel’s Tiger Lake system.

Frequency Ramping

Both AMD and Intel over the past few years have introduced features to their processors that speed up the time from when a CPU moves from idle into a high powered state. The effect of this means that users can get peak performance quicker, but the biggest knock-on effect for this is with battery life in mobile devices, especially if a system can turbo up quick and turbo down quick, ensuring that it stays in the lowest and most efficient power state for as long as possible.

Intel’s technology is called SpeedShift, although SpeedShift was not enabled until Skylake.

One of the issues though with this technology is that sometimes the adjustments in frequency can be so fast, software cannot detect them. If the frequency is changing on the order of microseconds, but your software is only probing frequency in milliseconds (or seconds), then quick changes will be missed. Not only that, as an observer probing the frequency, you could be affecting the actual turbo performance. When the CPU is changing frequency, it essentially has to pause all compute while it aligns the frequency rate of the whole core.

We wrote an extensive review analysis piece on this, called ‘Reaching for Turbo: Aligning Perception with AMD’s Frequency Metrics’, due to an issue where users were not observing the peak turbo speeds for AMD’s processors.

We got around the issue by making the frequency probing the workload causing the turbo. The software is able to detect frequency adjustments on a microsecond scale, so we can see how well a system can get to those boost frequencies. Our Frequency Ramp tool has already been in use in a number of reviews.

Our frequency ramp showcases that AMD does indeed ramp up from idle to a high speed within 2 milliseconds as per CPPC2. It does take another frame at 60 Hz (16 ms) to go up to the full turbo of the processor mind.

Ryzen 5000 Mobile: SoC Upgrades Power Consumption
Comments Locked

218 Comments

View All Comments

  • Ptosio - Tuesday, January 26, 2021 - link

    ARM is not some magic silver bullet - MediaTech has vast experience with ARM but are their chromebook chips any way close to Apple M1? (or Zen3 for that matter?)

    And remember AMD is yet to get acess to the same TSMC process as Apple - maybe once they're on par, large part of that efficiency advantage dissapears?
  • ABR - Wednesday, January 27, 2021 - link

    AMD has K12, which Jim Keller also worked on, waiting in the wings. Most assuredly they have continued developing it. Whether it will play in the same league with M1 remains to be seen, but they also have the graphics IP to go with it so they could likely come out with a strong offering if it comes to that. Not sure what Intel will do..
  • Deicidium369 - Wednesday, January 27, 2021 - link

    ancient design, far exceeded by even 10 year old ARM designs.
  • Spunjji - Thursday, January 28, 2021 - link

    You say some really silly things
  • Spunjji - Thursday, January 28, 2021 - link

    "Apple will outclass everything x86 once they introduce their second gen silicon with much higher core count and other architectural improvements."

    I'll believe it when I see it. Their first move was far better than expected, but it doesn't come close to justifying the claims you're making here.
  • Glaurung - Saturday, January 30, 2021 - link

    M1 is Apple's replacement for ultra-low power, nominal 15w Intel chips. Later this year we will see their replacement for higher powered (35-65w) Intel chips. Nobody knows what those chips will be like yet, but it's pretty obvious they'll have 8 or 16 performance cores instead of just 4, with a similar scale up of the number of GPU cores. They'll add the ability to handle more than 16gb and two ports, and they will put it in their high end laptops and imac desktops. Potentially also on the menu would be a faster peak clock rate. That's not an "I'll believe it when I see it," that's a foregone conclusion. Also a foregone conclusion: next year they will have an even faster core with even better IPC to put in their phones, tablets, and computers.

    As of last year, Apple's chips had far better IPC and performance per watt than anything Intel or AMD could make, and they only fell short on overall performance due to only having 4 performance cores in their ultra-low power chips.

    (For the record, I use Windows. But there's no denying that Apple is utterly dominating in the contest to see who can make the fastest CPUs)
  • GeoffreyA - Sunday, January 31, 2021 - link

    Apple will release faster cores but so will AMD. And now that they've got an idea of what Apple's design is capable of, I'm pretty sure they could overtake it, if they wanted to.
  • GeoffreyA - Sunday, January 31, 2021 - link

    As much as I hate to say it, the M1 could be analogous to Core and K8 in the Netburst era. The return to lower clock speeds, higher IPC, and wider execution. Having Skylake and Sunny C. as their measure, AMD produced so and so (and brilliant stuff too, Zen 3 is). Perhaps the M1 will recalibrate the perf/watt measure, like Conroe did, like the Athlon 64 did.

    I've got a feeling, too, that ARM isn't playing the role in the M1 that people are thinking. It's possible the difference in perf/watt between Zen 3 and M1 is due not to x86 vs. ARM but rather the astonishing width of that core, as well as caches. How much juice ARM is adding, I doubt whether we can say, unless the other components were similar. My belief, it isn't adding much.
  • Farfolomew - Thursday, February 4, 2021 - link

    Very nice comment, and this little thread is a really fascinating read. I've not thought of the comparisons of the P4 -> Core2Duo Mhz regression, but I really think you're on to something here. The thing is, this isn't anything new with M1, Apple has been doing it since the A9 back in 2015, when it finally had IPC parity with the Core M chips. The M1 is just the evolution and scaling up to that of an equivalent TDP laptop chip that Intel has been producing.

    So the question, then, is, if it's not the "ARM" architecture giving the huge advantages, why haven't we seen a radical shift in the x86 technology back to ultra wide cores, and caches? Or maybe we are, incrementally, with Ice/Tiger Lake, and Zen 2/3/4?

    Very fascinating times!
  • GeoffreyA - Sunday, February 7, 2021 - link

    "Or maybe we are, incrementally, with Ice/Tiger Lake, and Zen 2/3/4?"

    I think that sums it up. As to why their scaling is going at a slower rate, there are a few possible explanations. Likely, truth is somewhere in between.

    Firstly, AMD and Intel have aimed for high-frequency designs, which is at loggerheads with widening of a core. Then, AMD has been targeting Haswell (and later) perf/watt with Zen. When one's measure is such, one won't go much beyond that (Zen 2 and 3 did, but there's still juice in the tank). Lastly, it could be owing to the main bottleneck in x86: the variable-length instructions, which make parallel decoding difficult. Adding more decoders helps but causes power to go up. So the front end could be limiting how much we can widen our resources down the line.

    Having said that, I still think that AMD's ~15% IPC increase each year has been impressive. "The stuff of legend." Intel, back when it was leading, had us believe such gains were impossible. It's going to be some interesting years ahead, watching the directions Intel, Apple, and AMD take. I'm confident AMD will keep up the good work.

Log in

Don't have an account? Sign up now