Sahana
Sahana

Reputation: 11

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.

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

where xxxx - PID gives me thread count.

I have to reduce the thread count of process which is causing high cpu usage.

Any script or command to reduce Thread count?

Upvotes: 1

Views: 816

Answers (1)

Solomon Slow
Solomon Slow

Reputation: 27125

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.

*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.

Upvotes: 2

Related Questions