Kernel task running at 800% and slowing my Mac Book Pro to a grind
I recently upgraded to 10.14.4 and I've been getting the dreaded 'kernel_task' issue. A very slow computer with the activity monitor telling me that kernel_task is taking up 800% of my CPU. I understand the kernel_task is a group of system processes that run the computer. It's often running around 1-2% of CPU, the problem I'm trying to solve is why it suddenly goes up to 800% and brings the computer to a grind.
Looking at admittedly old threads here (3-5 years old) as well as in Apple Support posts that turn up when searching "kernel_task" it seems that there has been a problem with excessive processor temperature and that kernel_task was activated to stop the processor overheating. I'm on a MacBook Pro trying to edit in Final Cut Pro. Seems obvious that that could be my problem. I presumed that I was asking too much of a the processor editing video for hours on end on a laptop. That said the computer never felt hot.
So I downloaded Intel power gadget and monitored the processor temp. I found over several days and events like this that it's usually running between 40 and 60 when this excessive kernel_task is activated. At other times when the kernel_task is not activated it can run as high as 100 when I've been doing intensive video editing work and it has not triggered the kernel_task. The processor can be happy all day going to and from that kind of temperature and it goes for several days without activating the excessive kernel_task. However this excessive kernel_task seems to be activated late at night. As though something behind it expects the computer to be idle. Along with taking up excessive CPU kernal_task writes 450GB or larger files to the hard drive.
My hunch is that it appears to be doing some kind of indexing and that it is time activated. So I went down the list of possibilities. i) It could be spotlight indexing my drives. I turned off access to all my drives and unchecked all of the options in system settings. 2) It could be Malware. I downloaded and ran Etresoft report, this turned up nothing suspicious so I reloaded the system software though not a clean install that's too much work at this point. In attempting to kill the process I have tried restarting and restarting onto safe boot mode but the process is still active when the mac reboots.
I've just had one this evening, the first for several days which caused me to write this post. While writing I noticed that the battery level was a t 1-2%. It's possible that this could be the system writing a back up of open files to the hard drive in anticipation of a power failure. I have been relying on power coming from an external hard drive via thunderbolt 2 connection and I didn't get any low battery warnings. The mac shut down from battery depletion and I plugged in the power adapter. On reboot the excessive kernel task has now stopped. It's possible I have just cured the issue but I'm going to leave this post up as I'd like to share this experience a) in case this isn't the cause ands it comes back and b) for others who may be experiencing similar issues.
MacBook Pro 15”, macOS 10.14