MacBook – High CPU usage by system

catalinacpumacbook properformance

I'm having by time to time problems with my OS running really slow because the System uses a lot of CPU (it stays like this ~30min). I've checked different articles on the internet in regard to this issue and none of them worked for me. I also tried to update from Mojave to Catalina in the idea that this might fix the issue.
Does somebody else encounter this issue?

Configuration:
Macbook pro late 2013 with OS 10.15.6 (19G2005)
2.3 GHz Quad-Core Intel Core i7
16 GB 1600 MHz DDR3
NVIDIA GeForce GT 750M 2 GB
Intel Iris Pro 1536 MB

Is there a way of seeing the processes used or what is being done by the system? The Activity monitor or the htop from brew doesn't show what is being done by the system.

Answer (based on the comment from @At0mic): In order to see all processes including the system ones it possible by selecting in Activity Monitor View -> Show all processes

Activity Monitor

Best Answer

What you're seeing is not "the system" (as a separate entity) using up your CPU time so that "your programs" are not getting their fair share. This is not what happens.

In order to interpret the screenshot, you'll need to know that modern computers are designed to have their work load split between what is known as "user space" and "system space" (also known as kernel space). This is a form of protection.

The programs you're running will have their code running in "user space" consuming "user CPU time". This would involve the various computations and data juggling that your program does by itself.

However most programs do not live on an island. They need to access privileged resources such as a reading files from a disk, sending information on a network, etc. To do this safely, they need to ask the system to perform these tasks for them. In doing so work is transitioned to "system space" and thus taking up "system CPU time".

Activity Monitor shows you this split of your CPU usage. 70% is used in "system space", 20% in "user space" and approx. 10% "idle" in your case.

This does not mean that "the system" is somehow sucking up 70% of the CPU time taking it away from your programs - rather it means your programs have asked the system to do stuff for them - and that takes 70% of the CPU time.

In the top part of Activity Monitor you'll see the percentages of CPU time that each program has used. This percentage is based on the SUM of the process' usage of both user and system CPU time.