[SOLVED] Technical explanation of fps spikes / what they mean?

Jul 22, 2020
12
0
10
Hi,

I have a question for all you more intelligent people out there about what is happening in my computer when I experience an fps spike. I have recently run out of explanations for why I may be experiencing fps issues when my hardware is not being fully utilized. For instance I may experience fps drops when my gpu is at 55-60 'C or when my CPU is less than 70' C, but those are well below the temperatures at which my hardware ought to throttle itself to avoid damage. What is technically the justification for an fps drop when the hardware is being under utilized? I'm trying to understand what is happening on a deeper level between say a games interface and a gpu/cpu being unable to render an image at a faster pace.

The common example I experience is say something like playing a game at 75-80 fps, experiencing an fps drop, but never falling below 45-50, while somehow managing to be very hard on the eyes. It is as if my computer is dropping 15-30 fps all in the span of 0.3 - 0.4 seconds, so that effectively my computer has 0 frames being rendered for some portion in a given second in time. At a glance it looks normal when I see the fps reads 50, but my intuition tells me that the 50 frames occurred as normal in the first half second, and the second half of the second produced some horribly low number, perhaps only 10 frames. I might be fudging the numbers in this example, but is this possible? How can I avoid an fps spike when my hardware is being under utilized? I'm at a loss more or less and random googling doesn't seem to help me much at all. I ordered more thermal paste after examining my cpu, but the paste on previously was still okay (last replaced around 3-4 years ago, but looked okay otherwise), and the temperatures were never near the range at which my cpu throttles itself.

Would someone more intelligent than me mind explaining this to me or perhaps point me in the right direction? Like I said I'm kind of at a loss right now.

My specs are:

i7 4790k 4.0 ghz
geforce gtx 1660 super
16 gigs of ram
and the O.S. is on an SSD
I use MSI afterburner and Core Temps to monitors my temperatures also.

I look forward to any replies. thanks guys ! 😀
 
Solution
Okay so this is actually exactly why I posted this thread lol Thank you so much for your reply. How can I learn more about this in a compactful and "cpu's for dummies" kind of way? I've dabbled in wikipedia articles, but my problem is sometimes the words go over my head and I find myself going to x number of articles without understanding what the preceding articles said in the first place. It's all rather inefficient. I'm currently studying civil engineering in school, but we have no comp sci classes required and I don't really think that this is something I want to spend a lot of money on. Do you have any books or resources you might recommend? I'd like to get to the point of being able to problem solve my way through things...
Temps was mentioned but what about cpu usage? Check total cpu usage (core without a number) in AB. Depends on game too, what game you playing?

Check background usage too in task manager while doing nothing. Check cpu and memory %.

How much space is left on the ssd?
 
What is technically the justification for an fps drop when the hardware is being under utilized?
There's simply too much to do at the moment in time that the hardware is capable for that instant.

Let's take the CPU for instance. Your Core i7 is a 4-core, 8-thread processor. You probably understand these specs at a basic level. The thing here is this CPU can't always handle 8 threads at once, even if 8 threads are ready to run. This sounds counter-intuitive but the thing with processors like these, ones that support simultaneous multithreading, is that a core can only take on another thread if it has enough resources to do so.

Let's say there's 4 execution resources thread A wants 3 of them, thread B wants 2 of them. You can't run these two tasks at the same time. You could also ask "well can't thread B just work with one of them?" That would be a useful thing to do, but execution resources in a CPU are specialized. Some do generic math. Some calculate memory things. So there can be a situation where there's not enough to go around.

Now here's the fun part, if a CPU thread isn't doing anything, it counts as being idle as far as task manager is concerned. Here's the other thing: % utilization in any metrics tool reports the amount of time a CPU thread was not idling. So if a game has 4 heavyweight threads running such that the OS can't really schedule anything else, the CPU is running at its limit, but it shows up as 50% utilized. To the average person, this looks like the CPU is working only half as hard. But in reality, it could be working at 100%. If the game adds another thread that's time-sensitive to the mix, it has to wait, and thus, the game has a hiccup in performance.

So is it a case of "Task Manager sucks because it can't tell me anything useful"? No. Because in all honesty, that's not supposed to be its job and trying to figure out the CPU utilization at the "how many execution units are doing something" level is a highly invasive task that could degrade overall performance.
 
Temps was mentioned but what about cpu usage? Check total cpu usage (core without a number) in AB. Depends on game too, what game you playing?

Check background usage too in task manager while doing nothing. Check cpu and memory %.

How much space is left on the ssd?

I just ran a brief test to see what the numbers were, and it seems the ram isn't ever more than 8 gigs for the game I'm having problems with, state of decay 2, which is not a graphically intensive game on lower settings. The cpu usage is between 40-65%, but the gpu usage can get as high as 90%, which kind of blows me away given that its a $240 card with 6 gb of memory. Now I noticed performance drops over time with the card, so initially it's high but as tiem goes on it gradually decreases. Having said that the temperatures in this small test never exceeded 47' C, which is very low. Currently at desktop with the game in background im seeing 94% utilization at 38'C. Might this mean I have a faulty card? I replaced the display port cable about six months ago at the time I purchased this 1660 super card. edit: I have roughly 35 gigs remaining on my ssd. Its a 110 gig drive and I don't put games on it unless I'm struggling performance wise.
 
Last edited:
There's simply too much to do at the moment in time that the hardware is capable for that instant.

Let's take the CPU for instance. Your Core i7 is a 4-core, 8-thread processor. You probably understand these specs at a basic level. The thing here is this CPU can't always handle 8 threads at once, even if 8 threads are ready to run. This sounds counter-intuitive but the thing with processors like these, ones that support simultaneous multithreading, is that a core can only take on another thread if it has enough resources to do so.

Let's say there's 4 execution resources thread A wants 3 of them, thread B wants 2 of them. You can't run these two tasks at the same time. You could also ask "well can't thread B just work with one of them?" That would be a useful thing to do, but execution resources in a CPU are specialized. Some do generic math. Some calculate memory things. So there can be a situation where there's not enough to go around.

Now here's the fun part, if a CPU thread isn't doing anything, it counts as being idle as far as task manager is concerned. Here's the other thing: % utilization in any metrics tool reports the amount of time a CPU thread was not idling. So if a game has 4 heavyweight threads running such that the OS can't really schedule anything else, the CPU is running at its limit, but it shows up as 50% utilized. To the average person, this looks like the CPU is working only half as hard. But in reality, it could be working at 100%. If the game adds another thread that's time-sensitive to the mix, it has to wait, and thus, the game has a hiccup in performance.

So is it a case of "Task Manager sucks because it can't tell me anything useful"? No. Because in all honesty, that's not supposed to be its job and trying to figure out the CPU utilization at the "how many execution units are doing something" level is a highly invasive task that could degrade overall performance.

Okay so this is actually exactly why I posted this thread lol Thank you so much for your reply. How can I learn more about this in a compactful and "cpu's for dummies" kind of way? I've dabbled in wikipedia articles, but my problem is sometimes the words go over my head and I find myself going to x number of articles without understanding what the preceding articles said in the first place. It's all rather inefficient. I'm currently studying civil engineering in school, but we have no comp sci classes required and I don't really think that this is something I want to spend a lot of money on. Do you have any books or resources you might recommend? I'd like to get to the point of being able to problem solve my way through things like this without having to ask for help, and clearly it seems the basic software I'm using isn't giving me the full picture (I was expecting gpu temperature to be an indication of utilization and clearly it's not necessarily the case). I mentioned in my other post that my gpu temps can be very low ~in the 30's even and my task manager is telling me it has a high utilization. My conceptual understanding of these things is pretty poor and like I said I'd like to be able to look at all of this and form a consensus without having to ask for help. I built this pc a few years ago, so perhaps the motherboard is dated, but the ssd / gpu / monitor / display port cable are all newish so I wouldn't have expected it to be a hardware related issue.
 
Okay so this is actually exactly why I posted this thread lol Thank you so much for your reply. How can I learn more about this in a compactful and "cpu's for dummies" kind of way? I've dabbled in wikipedia articles, but my problem is sometimes the words go over my head and I find myself going to x number of articles without understanding what the preceding articles said in the first place. It's all rather inefficient. I'm currently studying civil engineering in school, but we have no comp sci classes required and I don't really think that this is something I want to spend a lot of money on. Do you have any books or resources you might recommend? I'd like to get to the point of being able to problem solve my way through things like this without having to ask for help, and clearly it seems the basic software I'm using isn't giving me the full picture (I was expecting gpu temperature to be an indication of utilization and clearly it's not necessarily the case). I mentioned in my other post that my gpu temps can be very low ~in the 30's even and my task manager is telling me it has a high utilization. My conceptual understanding of these things is pretty poor and like I said I'd like to be able to look at all of this and form a consensus without having to ask for help. I built this pc a few years ago, so perhaps the motherboard is dated, but the ssd / gpu / monitor / display port cable are all newish so I wouldn't have expected it to be a hardware related issue.
A lot of what I learned, some of it was conceptual like reading books or articles, some of it was practical as I have experience working on so-called bare metal, similar to things like the Arduino. So I don't really have a lot to recommend unfortunately other than to just do. Though if you want to give it a shot anyway, I'd say look up textbook regarding computer architecture.

I think the best way to understand this is to think of all of this like a factory. The actual people are the "CPU threads", the "execution units" are their tools (while you'd like to have everyone have their own set of tools, obviously not everyone needs something like a lathe or a laser cutter), and the software that the processor runs are jobs that come in. It's obviously more complicated than this, but I think this analogy works as well as the hydraulic one for understanding electronics.
 
Solution
A lot of what I learned, some of it was conceptual like reading books or articles, some of it was practical as I have experience working on so-called bare metal, similar to things like the Arduino. So I don't really have a lot to recommend unfortunately other than to just do. Though if you want to give it a shot anyway, I'd say look up textbook regarding computer architecture.

I think the best way to understand this is to think of all of this like a factory. The actual people are the "CPU threads", the "execution units" are their tools (while you'd like to have everyone have their own set of tools, obviously not everyone needs something like a lathe or a laser cutter), and the software that the processor runs are jobs that come in. It's obviously more complicated than this, but I think this analogy works as well as the hydraulic one for understanding electronics.

Ah I understand. It's one of those things where you have to just tinker to figure it out. Makes sense. Can't imagine how difficult this would be in a world without google lmao thanks guys. I appreciate your help. And yes the anti-aliasing setting off does make a difference in the gpu utilization. curiously the fps drops in spite of the lower ~70% gpu utilization and the ~50% cpu utilization. I suppose I'll have to take those wiki articles more seriously if I want to understand where the bottleneck is coming in xD Thanks again