服务:“手动”和“禁用”之间真的有区别吗?

服务:“手动”和“禁用”之间真的有区别吗?

我刚刚查看了我们的服务器,考虑禁用我们不使用的任何服务,这让我感到疑惑:

如果某个服务从未被任何东西调用来启动,而只是处于“手动”状态,那么它在这种状态下会占用任何系统资源吗?纯粹从系统资源角度来看那么,将不使用的服务设置为“禁用”是不是更好呢?

只是想知道资源是否真的有区别?(忘记安全问题,这显然是另一个问题。)

答案1

处于此模式的服务manual可在需要时由 Windows 启动。例如,当其他服务依赖该服务时,可能会出现这种情况。当您将此类服务(其他服务依赖该服务)设置为时,disabled依赖该服务的服务将无法启动。

处于模式的服务manual只要不是由系统启动,就不会占用任何资源。

因此,如果您想确保某项特定服务永远不会运行,只需将其设置为,disabled但请注意,这可能会破坏其他服务或依赖于该服务的应用程序。某些服务对某些应用程序也是“可选”的。例如,manual在大多数 Windows 版本中,都设置了“电话”服务。将其设置为disable似乎对其他服务没有直接影响,因为大多数人不使用依赖于它的 RAS 和 ICS 服务。但是,当服务被禁用时,例如双击电话号码字段时,最近的 Outlook 版本将不会显示“电话号码助手”。如果将服务设置为,manual您将看到该服务在此操作后运行。每次您停止电话服务并使用帮助添加另一个电话号码时,服务都会自动启动。如果将其设置为禁用,帮助将根本不会显示(但没有错误消息)。

因此,强制服务状态时要小心谨慎disabled

By the way there are also a couple of good web-pages out there describing the services in detail and their recommended state. Check BlackViper for example.

Edit 1: Some additional information and personal opinion on disabling services:

The guys at BlackViper also list the default settings. I personally do not even recommend to use the "safe" settings as these settings are intended to be used by people liking to disable as much as possible without breaking the system.

If you are sure you will never ever need the Telephony service, then you can also keep it at "manual" as it will never start then. The point is you usually never really know when you need a specific service. Taking the Telephony service as an example I think nobody would really know that the Telephony service is used to display the phone-number entry assistant in Outlook contact edits. Also I had to learn it the hard way. Once I've disabled all the services because I was thinking exactly the same way as you do: "Disable as much as possible to save some system resources". Then when I was using outlook I discovered that the assistant would not open (even without any error message) and I lost about 2 hour looking for the error (including re-installing Office) before I discovered the problem.

The service itself just uses a couple of kB of memory which is really a joke compared to today memory equipment in modern machines. If you do rigorously disable all services which you "think" you will not need, then you will probably save about 5 seconds of boot time. Compared to the hassle you could run in if you have to debug an issue because any application depends on a service you disabled but this application is not providing meaningful error messages, then it's not worth the effort. I would rather recommend buying a fast SSD; it makes bootup really MUCH faster without having to mess with services.

The only part I think you could manually adapt the service startup is for RAS services and similar things. Nowadays nobody is using dial up connections any more. These services are not needed. However also here some required services might depend on them and changing one of the services to disable might have unwanted side-effects.

So the bottom line is that the services and their startup are well-chosen by Microsoft (at least in Windows 7) and I would really recommend not to mess with it unless you really really know what you're doing.

最近我不得不修理我朋友的一台电脑。他正在使用某种调优工具(好吧,他无法告诉我是哪种工具,而且他已经卸载了它)。这个工具实际上禁用了它“认为”不需要的所有服务。结果,在 Windows 7 上,防火墙、Windows 更新和任务计划程序都不再启动。前两个服务对每个人来说都是显而易见的,它是一项重要的服务。虽然许多人认为他们不需要任务计划程序服务,因为他们没有任何计划任务。但这是一个错误的假设。Windows 安排了许多后台任务。包括每周碎片整理和类似的优化任务。因此,几周后,您可能会发现系统比让 Windows 在每次启动时启动一个小型调度程序服务还要慢。

如果有人问是否可以禁用特定服务,我没意见。答案通常是“可以,在特定前提条件下可以”。但不能给出可以禁用服务的一般建议 - 否则 Microsoft 早就默认禁用该服务了。

相关内容