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

Posted on 2006-06-07
Last Modified: 2013-11-13
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.

Question by:piragis
    LVL 16

    Accepted 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 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, but it affects every app, not just one.
    LVL 16

    Expert Comment

    Here's a priority utility I found on google.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    Title # Comments Views Activity
    Help with my python script 6 135
    countTriple  challenge 8 59
    abstract class with all non abstract mentods 6 58
    Fibonacci challenge 11 61
    RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now