简体   繁体   English

减少导致高 CPU 的特定进程的线程数

[英]reduce the thread count for specific process which causes high cpu

i have to reduce the thread count for specific process which causes high cpu.我必须减少导致高 cpu 的特定进程的线程数。

(Get-Process -ID XXXX | Select-Object -ExpandProperty Threads).Count (Get-Process -ID XXXX | Select-Object -ExpandProperty Threads).计数

where xxxx - PID gives me thread count.其中 xxxx - PID 给我线程数。

I have to reduce the thread count of process which is causing high cpu usage.我必须减少导致高 cpu 使用率的进程的线程数。

Any script or command to reduce Thread count?任何减少线程数的脚本或命令?

Any script or command to reduce Thread count?任何减少线程数的脚本或命令?

In general, no.一般来说,没有。 The number of threads that are created by any given program is controlled entirely by the program itself.任何给定程序创建的线程数完全由程序本身控制。 You can't do anything about it unless the program provides some means for you to configure the number of threads that it will use before you start it up, or else it provides some command or web interface that you can use to adjust the thread count at run time.你不能对它做任何事情,除非程序提供一些方法让你在启动之前配置它将使用的线程数,或者它提供一些命令或 web 接口,你可以使用它来调整线程数在运行时。

*IF* the number of threads is configurable or, *IF* it is adjustable on-the-fly, the instructions for how to do that are not likely to be the same as for any other program. *如果*线程数是可配置的,或者*如果*它是动态调整的,那么如何操作的说明不太可能与任何其他程序相同。 You'll have to get the information either by reading the documentation for the program itself, or else you'll have to mention the name of the program in your question, and maybe somebody who is familiar with it will answer.您必须通过阅读程序本身的文档来获取信息,否则您将不得不在问题中提及程序的名称,也许熟悉它的人会回答。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM