So you found something called “kernel_task” , and you want to know what it is. Good news: it’s nothing nefarious. It’s actually your operating system.
因此,您找到了一个名为“ kernel_task”的东西,并且您想知道它是什么。 好消息:这绝不是邪恶的。 实际上是您的操作系统。
This article is part of explaining various processes found in Activity Monitor, like , , , and . Don’t know what those services are? Better start reading!
这篇文章是一部分解释活动监视器中发现,像各种Craft.io , , ,和 。 不知道这些服务是什么? 最好开始阅读!
A “kernel,” if you didn’t know, is at the core of any operating system, sitting between your CPU, memory, and other hardware and the software that you run. When your turn on your Mac, the kernel is the first thing that starts, and basically everything you do on your computer flows through the kernel at some point. Activity Monitor puts all of this varied activity under one banner: kernel_task.
如果您不知道,“内核”是任何操作系统的核心,位于CPU,内存,其他硬件和运行的软件之间。 打开Mac时,首先启动内核,并且基本上,您在计算机上执行的所有操作都会在某个时刻通过内核。 活动监视器将所有这些不同的活动置于一个横幅下:kernel_task。
If you’re computer isn’t running slowly, don’t worry about this process taking up a lot of memory or occasionally using up CPU cycles: that’s normal. , so kernel_task will put it to work for things like caching files, and running a modern operating system means sometimes using some CPU power.
如果您的计算机运行缓慢,请不要担心此过程占用大量内存或偶尔消耗CPU周期:这是正常的。 ,因此kernel_task会将其用于缓存文件之类的工作,而运行现代操作系统意味着有时会使用一些CPU功能。
But if kernel_task is constantly using a majority of your system resources, and your Mac is really slow, you might have a problem. Restarting your Mac is the only way to restart your kernel, and sometimes that will solve all problems. But if the behavior persists, here’s a bit more information.
但是,如果kernel_task一直在使用大部分系统资源,而Mac确实很慢,则可能有问题。 重新启动Mac是重新启动内核的唯一方法,有时这可以解决所有问题。 但是,如果行为仍然存在,这里还有更多信息。
If you’re doing something that takes up a lot of processing power—converting 4K videos, say—you might wonder what’s taking so long and look at the Activity Monitor. Often you’ll see kernel_task is using up a lot of CPU power…power which you’d rather that power be used by your intensive process.
如果您正在做的事情占用了很多处理能力(例如转换4K视频),您可能会想知道花了这么长时间来查看活动监视器。 通常,您会看到kernel_task消耗了大量的CPU能力……您宁愿由密集型过程来使用这些能力。
It’s understandable if you’re frustrated, but it turns out your operating system is doing this on purpose to prevent your CPU from overheating. To quote :
如果您感到沮丧,这是可以理解的,但是事实证明,操作系统是故意这样做的,目的是防止CPU过热。 引用 :
So kernel_task isn’t really using up all that CPU power: it’s just preventing your intensive process from using it in order to prevent overheating. Everything should get back to normal when you’re out of the danger zone.
因此kernel_task并没有真正消耗掉所有的CPU功能:它只是在防止繁琐的过程使用它来防止过热。 当您离开危险区域时,一切都应该恢复正常。
One application with a bad habit of using up a lot of CPU and prompting this is Flash. If you see Flash or browser tabs taking up a lot of CPU power alongside kernel_task, consider to avoid the problem. This will stop Flash from using up your CPU with its various bugs, and kernel_task from having to shield your CPU to keep things cool.
Flash是使用不良习惯占用大量CPU并提示它的一个应用程序。 如果看到Flash或浏览器选项卡与kernel_task一起占用大量CPU资源,请考虑以避免此问题。 这将阻止Flash耗尽CPU的各种错误,并阻止kernel_task屏蔽CPU以保持良好状态。
If you find kernel_task using up a lot of CPU or memory when you’re not doing much of anything, you might have another problem on your hands. Usually this has to do with third party kernel extensions, called “kexts” by macOS. These modules that come with hardware drivers and some software, and interface directly with the kernel. A faulty kext could cause kernel_task to take up excessive system resources.
如果您在不执行任何操作时发现kernel_task占用大量CPU或内存,那么您可能会遇到另一个问题。 通常,这与macOS称为“ kexts”的第三方内核扩展有关。 这些模块与硬件驱动程序和某些软件一起提供,并直接与内核交互。 错误的kext可能导致kernel_task占用过多的系统资源。
To test this, you should boot your Mac into Safe Mode, one of the every Mac user should know about. Shut down your Mac, then turn it on while holding the Shift key. You’ll see the word “Safe Boot” in the login screen.
要对此进行测试,您应该将Mac引导到安全模式,这是每个Mac用户都应该知道的 。 关闭Mac,然后在按住Shift键的同时将其打开。 您会在登录屏幕上看到“安全启动”字样。
Safe Mode does not enable third party kexts, so if your Mac doesn’t have any problems in safe mode, you’ve found your problem. Uninstall any third party software or drivers you’ve installed recently and see if that helps.
安全模式不会启用第三方kext,因此,如果您的Mac在安全模式下没有任何问题,则说明您已找到问题。 卸载您最近安装的任何第三方软件或驱动程序,看看是否有帮助。
If you want to dive in further, , including a list of all kexts installed and running on your system. Uninstall anything you think may be causing the problem, and see if that solves it. If not, you might need to consider a trip to the Apple Store, or your friendly local Mac repair shop.
如果您想进一步研究, ,包括系统上已安装并正在运行的所有kext的列表。 卸载您认为可能导致问题的任何东西,然后查看是否可以解决。 如果没有,您可能需要考虑去Apple Store或您当地的Mac维修店。
If you still have a problem after all that, there’s a few things you could try.
如果毕竟还是有问题,可以尝试一些方法。
Sometimes will help. Consider , which could be causing the problem. You could also do , like removing unnecessary startup items and freeing up hard drive space.
有时会有所帮助。 考虑 ,这可能是导致问题的原因。 您还可以执行 ,例如删除不必要的启动项并释放硬盘空间。
If nothing helps, sometimes you need to stop wasting your time and . Obviously that should be a last resort, but it’s important to know when you’re beaten.
如果没有帮助,有时您需要停止浪费时间,然后 。 显然,这应该是不得已的方法,但是知道何时被殴打很重要。
Photo Credit:
照片来源:
翻译自: