9

Why my CPU and HDD is not working on 100%?

I have:

  1. CPU: Ryzen 5 3600
  2. 16 GB Ram
  3. HD: Samsung SSD 970 EVO - connected via M.2 port. Able to read 3.5gb/s and write 2.5 gb/s (tested).

As you can see below I took a picture during extraction and its works only on 20-30%, both.

Screenshot of Task mnanager

6
  • Do you see 100% at other times? Then it might be CPU scheduling causing the lower utilization. Also Windows probably distributes CPU workload of multiple threads to different cores so you might not see 100% for a given core or all of them.
    – LawrenceC
    Nov 14, 2020 at 16:46
  • Yes, I saw higher % during playing games and when opening programs. I bought this SSD/M2 specially for faster operation, but its same like normal SSD. Any idea how I can get more from CPU? Nov 14, 2020 at 16:57
  • 1
    A lot of this is cleared up by looking at the CPU graph per logical processor. Right click on the graph while in CPU mode, Change graph to -> Logical processors. This should immediately show that one of the cores is doing the heavy lifting while the rest isn't doing that much at all. Some applications are optimized for using multiple cores (you'll often see 2-4 active cores with those), others are not.
    – Mast
    Nov 15, 2020 at 10:11
  • 1
    Is that the Windows internal ZIP extraction tool? Because that one has lots of inefficiencies. Nov 15, 2020 at 16:41
  • 1
    Having both CPU AND storage at 100% for a single operation will only happen when the CPU load and the storage throughput are perfectly matched. That's extremely unlikely to happen.
    – barbecue
    Nov 15, 2020 at 16:50

2 Answers 2

16

Let's assume your CPU is a dual core, with Hyper-threading, giving it 4 virtual cores [I know this isn't true, but bear with me.]

If you run a task that is single-threaded - simply, it can only do things serially, one part must finish before the next bit starts - then the maximum amount of CPU it can use is one core at a time. This is 25% 'busy' when looking at your total CPU time.
Now, the scheduler in your OS is a bit smarter than that, so it can shift tasks between cores to stop one getting all the fun & share the workload out a bit. It also isn't only doing that one job, your machine is running hundreds of tiny background tasks all the time, even if you personally are doing no work.

Long & short is that if a task is not a real CPU hog, demanding more & more parallel threads/tasks, it will only get one turn on the roundabout, it isn't going to get all the seats at once. This will limit how much work it can do at any given time & how 'busy' it will make the CPU. If it took the whole CPU, then everything else would grind to a halt.

The only kinds of task that get to sit in every available seat are things like video encoding & application compiling. These will make your machine sound like it's about to take off, as every single spare resource gets used up & the fans ramp up like a wind turbine. For more normal tasks, it's nice to be able to get some elbow room for other things you are busy with, and also keep your machine cooler & quieter when it really doesn't need the exercise.

7
  • 1
    The OP spent money on a faster SSD in the hope of making these tasks faster, so it is not “nice” that they are single-threaded and CPU bound.
    – Carsten S
    Nov 15, 2020 at 9:46
  • 4
    A fast SSD is very nice and will speed things up considerably but extracting a single large file from a single archive is not specifically the thing that could be parallelized easily. :-) Actually, the main issue with the OP's situation probably is that he/she wasn't aware of TM being able to show the CPU cores separately. That simply would have answered the question before even formulated.
    – Gábor
    Nov 15, 2020 at 12:39
  • 1
    "Let's assume your CPU is a dual core" -- very far off for a Ryzen 5 3600!
    – xjcl
    Nov 15, 2020 at 16:44
  • 1
    @xjcl - I thought that was made fairly obvious in my opening paragraph. Sorry if you failed to pick up on that.
    – Tetsujin
    Nov 15, 2020 at 16:45
  • 1
    @CarstenS While it’s ‘not nice’, it’s unfortunately still the norm, especially on Windows. Due to a number of factors, a lot of developers still have a hard time accepting that parallelization is worth it for anything but HPC workloads. Nov 15, 2020 at 19:45
4

Regarding your comment :

I saw higher % during playing games and when opening programs. I bought this SSD/M2 specially for faster operation, but its same like normal SSD. Any idea how I can get more from CPU?

Some games are very heavy resource users and the main use of an SSD for games is to reduce e.g. level load times or similar, where a large amount of file accesses are required.

Note you refer to "your HDD". It's an SSD - much faster than a HDD, which is a mechanical drive.

During normal play it is your GPU and CPU and main memory that are used. SSDs deliver max performance for serial access - e.g. large files, but random access time (lots of small files) would be a good deal slower (but still orders of magnitude faster than a HDD). Better SSDs also schedule multiple read ops to the best efficiency.

The random access speeds of your SSD would be between about 45 MB/s and 75 MB/s for tests using small files (but tests are not real world operations and expect a little lower in practice). The headline grabbing super-duper performance figures are for tests using sequential access to large files (i.e. easily predicted read patterns, one block after another that allow the SSD firmware to schedule operations efficiently). By comparison your SSD random access speeds can test at about twice that of a good SATA SSD of similar size. So it's still a good performance.

I'll finally point out that random access speeds of a HDD would be doing well to reach just 1 MB/s, so keep this in perspective.

4
  • Shouldn’t writes of tiny files be buffered by the OS’s file system?
    – Michael
    Nov 15, 2020 at 7:19
  • The issue with random accesses is that they do not cache well as predictions are hard to make. SSD (flash memory) is not capable of the headline speeds you read about - most of that speed comes from the hardware and firmware being able to schedule and predict reads ahead of time (so sequential reads are fast). Random patterns of access cannot be predicted, so they tend to slow the drive down a lot to closer to the underlying speeds of flash memory accesses. The OS may simply not be able to buffer all the random files - it would normally try to, but there is a limit to what it can do. Nov 15, 2020 at 7:50
  • But shouldn’t random writes cache quite nicely, especially when it’s new files which can just be written in one large, continuous chunk? I’d really like to try copying a thousand tiny files from a ramdisk to an SSD now.
    – Michael
    Nov 15, 2020 at 8:29
  • Here's the thing, just because you create a bunch of files at the same time on a real drive, it does not mean they are stored sequentially. They are put wherever the OS feels like doing it (and in the case of SSDs blocks are allocated and mapped in a quite different way from HDDs). A single "small" file can be split into physically separate blocks. Write to a clean RAM drive and this won't typically apply and/or carry the same penalties as a physical system. File systems and hardware have very complex interactions. Nov 15, 2020 at 8:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .