2D Game/engine caps at 13% CPU usage after 5-10 seconds on a quadcore?

I’ve got a weird issue where when I start my engine, for about 3 seconds, but sometimes 5-20, my FPS will stay at a consistent 5,000 fps, then suddenly it will drop to about 3,500 and stay like that for the rest of the time I have my game open. Inside of the profiler I can see that it first hovers around 25% (as expected using ~100% of one core), and then it flat-lines to 13%.

At first I thought that maybe it was some kind of CPU throttling, so I monitored the CPU temperature with speccy but it never goes over even 70C. Another thing I thought could be the cause was the engine being GPU-bound, but in task manager I only use about 70% of the GPU. Additionally, I’ve tested my engine on a low-end netbook and a similar FPS drop occurs. My main computer is on a windows 10 OS, with an i7 7700 and a gtx 1070, and the netbook has a core 2 duo and intel HD graphics.

Also, I don’t really see how the engine’s initialization could be causing this weird drop as all of the level loading, etc is done on the first frame. Anyway, I just wanted to know what could be causing this? Maybe some other kind of CPU-throttling that I’m unfamiliar with? I’m trying to optimize the engine as much as possible and only using 13% of the CPU tears a big chunk out of the framerate.

Are you using multithreading? Because if not you are most likely only using a single core of your multicore cpu

It isn’t multi-threaded at all. But still, shouldn’t it consistently use 25% of my CPU and not 13% if I have 4 cores?

Your CPU has 4 Cores with 2 Threads each. So basically without multithreading your program will use roughly 12.5% CPU max. But that’s just a wild guess. I’m not an expert in that regard :smiley:

Check your power settings, maybe it’s on power saver mode…

I think finnhax was right, I turned off hyperthreading in the bios and my my CPU usage went from 13%-45%, and strangely the performance is actually much better. I thought it would use 25% but I guess something in .net is using another core.