Understanding AMD Zen: The Basics of Cache Usage
AMD Zen Core: Big News
AMD is enthused about the release of their new processor architecture, and it appears they may have good reason to be. Starting this year, AMD expects to introduce “Zen” core-based computing products first for high-performance desktops, then for enterprise-class servers and then on down the line for laptops and embedded devices.
Understanding the Specs
Whenever new processors are discussed, there are a lot of performance revealing terms and numbers thrown around. For the technically uninitiated, it’s handy to periodically refresh on what these specifications mean. Today’s example – one of the advancements for the Zen core – is the caching system. This is an important aspect of any processor design. In brief, a cache is small amount of on-chip memory that the processor can access with low latency. Cache is much smaller than main memory but faster. As size, power needs, cost, and waste heat have dropped over the years, the size and number of on-chip caches have increased.
Mountain Dew Helps Explain
Here’s a puntastic example to illustrate what it does. Suppose you (in this example, analogous to the processor core) need to do millions of cash transactions at vending machines all over town. You probably need a lot of Mountain Dew and Doritos to keep going. But different vending machines require specific denominations of bills to operate. Like an L1 cache, having a wallet handy allows you to store several different denominations so you can quickly whip out the needed dollar bill or fiver. However, some vending machines will only take Benjamins. If you don’t happen to have one of those in your wallet, you’ll have to go to the bank (off-chip main memory) to get one. That takes a LONG time compared to just reaching into your wallet.
You’d like to then store as many different denominations as you can in your wallet, but unfortunately it just isn’t big enough for all of them. You can buy a bigger wallet, but that involves cost, weight and takes up more room in your pocket. Processor designers have to make similar design decisions with the on-chip cache. When you read specs for new processors, bigger is better with caches in general. Having a larger cache at any level usually means the processor can access more needed data faster because it will be forced to go out to main memory less often.
Final Tidbit – Architecture Nomenclature
The cache numbering system tells you how far removed the cache is from the main processor – the lower number cache is accessed first and is fastest. The Zen, like many modern cores, makes use of L1, L2, and L3 caches. L1 caches are often split between instruction and data memory as is the case here. The Zen makes an improvement upon Intel’s latest with an upgrade from 32KB of L1 instruction cache to 64KB.