New Instructions

Cache and Memory Bandwidth QoS Control

As with most new x86 microarchitectures, there is a drive to increase performance through new instructions, but also try for parity between different vendors in what instructions are supported. For Zen 2, while AMD is not catering to some of the more exotic instruction sets that Intel might do, it is adding in new instructions in three different areas.

The first one, CLWB, has been seen before from Intel processors in relation to non-volatile memory. This instruction allows the program to push data back into the non-volatile memory, just in case the system receives a halting command and data might be lost. There are other instructions associated with securing data to non-volatile memory systems, although this wasn’t explicitly commented on by AMD. It could be an indication that AMD is looking to better support non-volatile memory hardware and structures in future designs, particularly in its EPYC processors.

The second cache instruction, WBNOINVD, is an AMD-only command, but builds on other similar commands such as WBINVD. This command is designed to predict when particular parts of the cache might be needed in the future, and clears them up ready in order to accelerate future calculations. In the event that the cache line needed isn’t ready, a flush command would be processed in advance of the needed operation, increasing latency – by running a cache line flush in advance while the latency-critical instruction is still coming down the pipe helps accelerate its ultimate execution.

The final set of instructions, filed under QoS, actually relates to how cache and memory priorities are assigned.

When a cloud CPU is split into different containers or VMs for different customers, the level of performance is not always consistent as performance could be limited based on what another VM is doing on the system. This is known as the ‘noisy neighbor’ issue: if someone else is eating all the core-to-memory bandwidth, or L3 cache, it can be very difficult for another VM on the system to have access to what it needs. As a result of that noisy neighbor, the other VM will have a highly variable latency on how it can process its workload. Alternatively, if a mission critical VM is on a system and another VM keeps asking for resources, the mission critical one might end up missing its targets as it doesn’t have all the resources it needs access to.

Dealing with noisy neighbors, beyond ensuring full access to the hardware as a single user, is difficult. Most cloud providers and operations won’t even tell you if you have any neighbors, and in the event of live VM migration, those neighbors might change very frequently, so there is no guarantee of sustained performance at any time. This is where a set of dedicated QoS (Quality of Service) instructions come in.

As with Intel’s implementation, when a series of VMs is allocated onto a system on top of a hypervisor, the hypervisor can control how much memory bandwidth and cache that each VM has access to. If a mission critical 8-core VM requires access to 64 MB of L3 and at least 30 GB/s of memory bandwidth, the hypervisor can control that the priority VM will always have access to that amount, and either eliminate it entirely from the pool for other VMs, or intelligently restrict the requirements as the mission critical VM bursts into full access.

Intel only enables this feature on its Xeon Scalable processors, however AMD will enable it up and down its Zen 2 processor family range, for consumers and enterprise users.

The immediate issue I had with this feature is on the consumer side. Imagine if a video game demands access to all the cache and all the memory bandwidth, while some streaming software would get access to none – it could cause havoc on the system. AMD explained that while technically individual programs can request a certain level of QoS, however it will be up to the OS or the hypervisor to control if those requests are both valid and suitable. They see this feature more as an enterprise feature used when hypervisors are in play, rather than bare metal installations on consumer systems.

Windows Optimizations and Security CCX Size, Packaging, and Routing: 7nm Challenges
Comments Locked

216 Comments

View All Comments

  • Gastec - Wednesday, June 19, 2019 - link

    I'm 95% convinced that your micro-stuttering is caused by the GPU/drivers. Disable SLI or Crossfire if that's what you have (you never said what video card you use). And please stop trolling.
  • wurizen - Thursday, June 20, 2019 - link

    Really? After all that I said about this... you think that you're 95% sure it's caused by GPU drivers and you want me to disable SLI or Crossfire? Really?
  • Qasar - Thursday, June 20, 2019 - link

    have you even mentioned which vid card you are using, or what version the drivers are, or if they are up to date ??
  • Gastec - Wednesday, June 19, 2019 - link

    It could also be related to G-sync/FreeSync and your monitor. When debugging the best way is to reduce everything to a minimum.
  • wurizen - Thursday, June 20, 2019 - link

    Really, dude? You think it's related to Gsyng and Freesync?
  • Qasar - Thursday, June 20, 2019 - link

    it very well could be.. a little while ago.. there was a whole issue with micro stuttering and the fix.. was in new drivers after a certain revision...
  • wurizen - Thursday, June 20, 2019 - link

    This is gonna be my last comment regarding my comment about Infinity Fabric High memory latency issue... an objective response would be "It could;" or, "it's quit possible;" or, "110 nanoseconds latency via cross-ccx-memory-performance is nothing to sneeze at or disregard or a non-issue;"

    instead, i get the replies above; which doesn't need to be repeated since one can just read them. but, just in case, the replies basically say I am trolling such as the most recent from user Gastec; and someone prior I jumped to my conclusion of pointing my scrawny little finger at Infinity Fabric high memory latency; someone plain said I didn't know what I was talking about; etc!

    So, I just wanna say that as my one last piece. It's odd no one has aired to the caution of objectivity and just plain responded with "It's possible..."

    Instead, we get the usual techligious/fanboyish responses.
  • Qasar - Thursday, June 20, 2019 - link

    it doesnt help, you also havent cited any links or other proof of this other then your own posts... and i quote " And, there are people having head-scratching issues similar to me with Ryzen CPU. " oh.. and where are these other people ?? where are the links and URLs that show this ??? lastly.. IF you have a spare hdd ( ssd or mechanical ) that isnt in use that you could install windows on to, so you wont have to touch the current one you are using, try installing windows on to that, update windows as much as you can via windows update, update all drivers, and do the same things you are doing to get this issue.. and see if you still get it.. if you do.. then it isnt your current install of windows, and it is something else.
  • Carmen00 - Friday, June 21, 2019 - link

    Qasar, Gastec et al, I appreciate that you're trying to educate wurizen but when you get responses like "bruh!" and "Really?", I think it's time to call it quits. Like HStewart, feeding wurizen will just encourage him and that makes it difficult to go through the comments and see the important ones. Trust that the majority of Anandtech's readership is indeed savvy enough to know pseudo-technical BS when we encounter it!
  • Qasar - Friday, June 21, 2019 - link

    well.. the fact that he didnt cite any one else with this problem, or links to forums/web pages.. kind of showed he was just trolling.. but i figured... was worth a shot to give him some sort of help....

Log in

Don't have an account? Sign up now