• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 389
  • Last Modified:

Setting a cap on CPU usage (in percent) for a specified process.

I was wondering if anyone knew of a way to set a limit on the CPU usage for a specified process.  I would be doing this in an NT DOS shell.

Does anyone know of a utility I could use?  I'm thinking of something like 'setcpulimit.exe <pid> <limit>' but I'm probably dreaming here.

Any advice would be appreciatied.

  • 2
1 Solution
If you are trying to prevent an app from running roughshod over your machine, in general you don't cap the CPU usage, but reduce the priority of your task so it doesn't eclipse other apps.  You can set priority with Task Manager, via the API with SetPriorityClass, by using "Start" from teh windows resource kit, with psExec from sysinternals.com or with a utility you find in google.

If you are simply trying to slow down your machine for testing purposes, you can try CPUKiller from CPUKiller.com, but it affects every app, not just one.
Here's a priority utility I found on google. http://gilchrist.ca/jeff/SetPriority/index.html
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now