什么是WindowServer进程,为什么它在Mac上运行?

While checking the Activity Monitor, you noticed something called WindowServer occasionally taking up a bunch of CPU power. Is this process safe?

检查“活动监视器”时,您发现称为WindowServer的内容偶尔会占用大量CPU能力。 这个过程安全吗?

This article is part of our ongoing series explaining various processes found in Activity Monitor, like kernel_taskhidd, mdsworkerinstalld, and many others. Don’t know what those services are? Better start reading!

这篇文章是一部分我们正在进行一系列的解释活动监视器中发现,像各种Craft.iokernel_taskhiddmdsworkerINSTALLD ,和其他许多人。 不知道这些服务是什么? 最好开始阅读!

WindowServer is a core part of macOS, and a liaison of sorts between your applications and your display. If you see something on your Mac’s display, WindowServer put it there. Every window you open, every website you browse, every game you play—WindowServer “draws” it all on your screen. You can read more at Apple’s developer guide if you’re technically inclined, but it’s not exactly light reading.

WindowServer是macOS的核心部分,是您的应用程序和显示器之间的各种联系。 如果您在Mac的显示屏上看到某些东西,则WindowServer会将其放在此处。 您打开的每个窗口,浏览的每个网站,您玩的每个游戏-WindowServer都会在屏幕上“绘制”所有内容。 如果您有技术上的知识,可以在Apple的开发人员指南中阅读更多信息,但这并不完全是一本轻松的书。

For the most part, just know that WindowServer is what macOS, and every application you run on it, uses in order to display things on your screen. It is completely safe.

在大多数情况下,只要知道WindowServer是什么macOS以及您在其上运行的每个应用程序,便可以在屏幕上显示内容。 这是完全安全的。

为什么WindowServer使用太多CPU? (Why Is WindowServer Using So Much CPU?)

As we’ve said, every application communicates with WindowServer in order to draw things on your display. If WindowServer is taking up a lot of CPU power, try closing applications and seeing if the usage drops. If you see a particularly large drop after closing a specific program, that program is probably responsible for the high CPU usage.

如前所述,每个应用程序都与WindowServer通信,以便在显示器上绘制内容。 如果WindowServer占用了大量CPU资源,请尝试关闭应用程序并查看使用率是否下降。 如果在关闭特定程序后看到特别大的下降,则该程序可能是CPU使用率高的原因。

To some extent, this is normal: programs that constantly change what’s showing on the screen are going to use WindowServer quite a bit, which means they will use up CPU power. So it makes sense for games, video editors, and other constantly refreshing applications to cause a spike in WindowServer CPU usage.

在某种程度上,这是正常现象:不断更改屏幕显示内容的程序将大量使用WindowServer,这意味着它们将消耗CPU能量。 因此,对于游戏,视频编辑器和其他不断刷新的应用程序,导致WindowServer CPU使用率激增是有意义的。

Having said that, sometimes a bug in a piece of software can cause excessive WindowServer CPU usage. If you notice this pattern, and don’t think the application should be causing that big a spike in WindowServer CPU usage, consider contacting the developer. You might have found a problem they can fix.

话虽这么说,有时某个软件中的错误会导致WindowServer CPU使用率过高。 如果您发现这种模式,并且不认为应用程序应该会导致在WindowServer CPU使用率大穗,考虑联系开发商。 您可能发现了可以解决的问题。

If WindowServer keeps using up a lot of power even when you don’t have much of anything running, there are still a few things you can try. First, check our article about speeding up a slow Mac, in particular the section about reducing transparency. You’ll find this option in System Preferences > Accessibility > Display, and it’s been known to reduce WindowSever CPU usage, particularly on older Macs.

如果WindowServer即使在没有任何东西在运行的情况下仍然消耗大量电能,您仍然可以尝试一些方法。 首先,查看我们有关加快Mac速度的文章,特别是有关降低透明度的部分。 您可以在“系统偏好设置”>“辅助功能”>“显示”中找到此选项,众所周知,它可以减少WindowSever CPU的使用,尤其是在较旧的Mac上。

You can also try closing unnecessary windows, ensuring there aren’t too many icons on your desktop, and reducing the number of desktops you use in Mission Control. If none of this works, consider resetting the NVRAM; that can help in some cases.

您也可以尝试关闭不必要的窗口,确保桌面上没有太多图标,并减少在Mission Control中使用的桌面数量。 如果这些都不起作用,请考虑重置NVRAM ; 在某些情况下可以提供帮助。

One more thing to keep in mind: if you use multiple monitors, WindowServer is going to use more CPU power in order to draw to multiple displays. The more displays you add, the more true this is.

需要记住的另一件事:如果使用多个监视器,则WindowServer将使用更多的CPU能力以吸引多个显示器。 您添加的显示越多,这越真实。

Photo credit: Hamza Butt

照片来源: Hamza Butt

翻译自: https://www.howtogeek.com/312755/what-is-the-process-windowserver-and-why-is-it-running-on-my-mac/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值