Why won't my CPU operate at its max potential even when my application (which utilize CPU's resources) is lagging?
You're probably running single-threaded applications which can only max out a single CPU core. Since 100% of one core is less than 100% of the capacity of multi-core CPU, total CPU utilization doesn't reach 100%.
You can confirm this by viewing the individual core utilization in Task Manager. Look for single cores that are approaching max utilization.
You haven't specified your OS. So the answer will be common like.
Applications can be limited by various reasons. The bottleneck can be in:
- CPU
- low speed
- single/low threaded apps (not capable of using all cores/threads)
- I/O
- disk throughput
- disk latency
- network throughput
- network latency
- memory
- capacity
- throuthput
- latency
- insufficient cache
- locality (NUMA)
- swapping
And there are more reasons, which aren't so common.
So have a look at your system resources and try to analyze your system for other bottlenecs, than just total CPU load.
In general, when people talk about their computer being slow, I mention dust. As a former computer tech with 15 years of professional experience, I found that simply blowing out dust can significantly improve performance.
I'm not talking about a thin, almost imperceptible amount of dust, but rather large clumps or even mats that prevent normal airflow. I've seen heat sinks that had basically a filter over them that was dust, rather than an actual filter. This blocks a very significant amount of air from ever cooling the CPU. Removing dust like this will tend to quiet fans instantly and allow your components to survive longer. Heat had killed many a computer I was asked to fix.
Going along with the heat issue idea, you might also try better thermal paste. The white cr@p most processors come with is like the Yugo of thermal paste. I use Arctic Silver, but there's better stuff than that, even. Arctic Silver is about a Porche (using the car rating scale), but there are Ferrari's and supercar varieties out there.
Processors tend to slow down when they are overheating. This is a physical thing as well as a "self preservation" programmed into many CPUs. I don't know if it'll still show 100% on the Task Manager or if it'll show 40% (like you see), but it can be a significant slowdown while the CPU tries to let the heat sink and fan "catch up."
Another thing that could be slowing your CPU down is the GPU. If you are running graphic intensive games or utilities (like CAD), your GPU might be holding back your CPU. Getting a better video card might be something to look at. Also, using the wrong right card might be holding you back. Gaming cards aren't (usually) designed to work with CAD as well as workstation cards, and workstation cards (usually) won't game very well, either. Some do, but most don't.
As @Jaroslav Kucera mentioned, it could be disk related. Hitting the HD(s) a lot can slow you way down. I normally run multiple drives. One dedicated to the OS and other(s) for software, Windows page file, personal files, etc. Besides not having to worry so much about backing personal data up in case of OS failure, having multiple HDs spreads the workload considerably. Reading and writing to the same disk at the same time can seriously slow down the HD. Using SHDs can mitigate this, but not entirely. Photoshop and video editing software are known to hit HDs hard. Reading from one HD then outputting to a 2nd HD is the way to go. This also helps the life of your HDs. I also go with active cooling on my HDs. I haven't killed a hard drive since I put a fan and heat sink on them +15 years ago. Google them, they are cheap insurance.
Believe it or not, your PSU might be slowing you down, too. If you don't have enough power (or your PSU is old or a cheap, over rated, Chinese POS), you can have performance issues. I've seen first hand what odd OS issues a flaky PSU can do. You are looking for voltage as well as amps, so make sure they all match the specs on the PSU, if you go this route, and also make sure they meet or exceed your power needs. If your components total 500 watts and you're giving them even 475, that's bad. I recommend going over your requirements by about 20%, so as your PSU gets older (and drops power) and your other components get older (and require mote power), you aren't stuck buying a new PSU so quickly.
Including the other answers here, there are still more reasons for your computer to run slow. Except for the PSU option, what I talked about were very commonly seen when I was a computer tech. Doing a benchmark and other tests are the only way you'll be able to figure things out. Swapping parts might not even solve the issue if it's a combo of multiple parts causing the slowdown.
And, AFAIK, there's no way to force your computer to use 100% of the processor. The CPU and OS knows what they need to do and are really good at their jobs, usually. :-) I don't think anyone has yet figured out a way to force feed a CPU to make it run at 100% when you think it should. At least not without feeding it extra junk to make the percentage "look good."
With you seeing 40% and not and a whole number division of 100% (like 25%, 33%, or 50%), I have a feeling it's not a single threading issue. It could be, but that's not where my mind goes. +1 to @Twisty Impersonator for bringing it up right away, though.
Good luck trying to figure this one out! I've spend days trying to figure this kind of thing out, only to end up replacing most of the guts as a "last resort."
It could be energy saving settings in either bios or the operating system. Many modern CPUs and motherboards have settings to allow the CPU to be more economical with electricity usage, (especially true for laptops which want the battery to last). You can probably turn such a setting off, but make sure you know what you are doing as next to the setting there are usually other stuff that can affect the functionality of the computer in other important ways.
I regularly hit 100% utilization when doing rendering and math tasks. I'll verify that hyperthreading will hit high 100%, and instruction ordering is a big deal. Intel and AMD both have large amounts of hardware dedicated to instruction reordering to fill as many execution cores as possible. If you're getting 30% on a modern machine you may
- Check Temps -- Intel & AMD both downclock when they get hot and it shows as stutters and spikes.
- Not be doing much with it.... examples are:
- Web Browsing
- Most simple games
- I'd almost guarantee your problem is one or all of the following, starting at the top:
- Get an SSD
- Get an SSD
- Get your OS on the SSD and move normal data to a traditional multi-TB drive. Windows needs more access to its local files than anything.
- Bonazai Buddy?
- Keep all drives at above 10% capacity at least. NTFS is a journaling file system and performance goes down the fuller the drive gets.
- You need an NVMe drive / SSD for your OS drive ASAP (yeah I said it again). The performance is amazing, and it carries on to part two of this... A major retailer was selling Samsung 961 NVMe 512GB drives for $300 today which is plenty for normal use.
- Windows 10 is GPU heavy. A cheap dedicated video card can take the load off both memory and CPU. You can still use the APU in combination with the video card but you'll save some RAM, and VRAM is generally much faster.
- Lower core-count CPUs are also memory bound. If you look at the i7s they're all running quad channel DDR in 4 banks. AMD's Epyc chips will be 8 channel DDR5 with 64 cores. Doesn't help. Finally, and I can't stress this one enough, dump the money on as much RAM as your machine will take. I've got 32GB and am buying 32 more later this year. Windows does something similar to superfetch that's a bit newer which compresses memory in RAM that isn't being used so programs and data can just be unzipped when needed. As another example I run a Linux VM for development, allocated 6/12 cores and 16GB ram, and after the first load off the SSD it starts in ~3 seconds. CPU is considered very cheap these days by optimizations like that... decompressing Photoshop from memory is faster than loading from disk except in the case of very fast SSD.
All of this stuff seems like overkill until I'm stuck compiling a 70k file project or upscaling giant camera raw files to 17"x26"x600 dpi at 16 bit color. Even at 100% utilization the resources are such overkill that you don't get slowdown. The other night I realized I had two VMs and a Wolf 2 loaded along with 2 IDEs (I'm distracted, sue me) and wasn't noticing slowdown. This is a ~$1500 machine BTW, nothing special, and most slowly bought over the years. Half of that is one of the Radeon RX64s because my video card was 6 years old. Huge difference in render and such. Upgrading will likely get you more use out of your hardware than assuming that your 30% use is all you'll get.
If I threw a 5400RPM hard drive in this machine for OS it would run like total crap.
TL;DR it sounds like you're CPU bound right now. Spend a couple hundred on at least a 256GB SSD for the OS, 8GB of ram, and a lower end gamer card and the computer will last years. This one survived for 6 years before I finally did a processor and motherboard refresh and I was compiling an entire cross compiler suite about 25 times a day with the old gear.
Call me overkill but I'm not recommending 8 Tesla cards or anything. Do minor upgrades when you can and I think you'll solve a lot of these problems. I did years ago by adding an SSD to a Q6600 system and watching performance triple.