Results 1 to 3 of 3

Thread: Is there a way to limit the max CPU usage in bt3?

  1. #1
    Member
    Join Date
    Jul 2007
    Posts
    145

    Default Is there a way to limit the max CPU usage in bt3?

    Usually when I run something that takes a while (several minutes), my computer shuts down and is fairly hot. I cleaned the insides out and everything, too. I know i can do it with vista, but is there a way to limit the max cpu usage to, say, 75% or something?

  2. #2
    Junior Member drpepperONE's Avatar
    Join Date
    Nov 2007
    Posts
    51

    Default

    Quote Originally Posted by unlazyfree View Post
    Usually when I run something that takes a while (several minutes), my computer shuts down and is fairly hot. I cleaned the insides out and everything, too. I know i can do it with vista, but is there a way to limit the max cpu usage to, say, 75% or something?
    Yes ther's a cpulimt prog that works on process and in %.

    What is it?

    cpulimit is a simple program that attempts to limit the cpu usage of a process (expressed in percentage, not in cpu time). This is useful to control batch jobs, when you don't want them to eat too much cpu. It does not act on the nice value or other scheduling priority stuff, but on the real cpu usage. Also, it is able to adapt itself to the overall system load, dynamically and quickly.

    System Requirements

    cpulimit should run on every Linux 2.2 or greater. It has been reported by several users that cpulimit works fine even on SMP hardware, but there is a little difference in the meaning of cpu usage (see below).
    If you can modify the source code of cpulimit to make it run in a non Linux OS, please notify me, so I can publish your code. I think that the only non-portable code is iterating through the process list.

    Instructions

    Download last stable version from here:

    http://downloads.sourceforge.net/cpu...mit-1.1.tar.gz

    or get the latest source code from Subversion repository with this command:

    Then extract the source and compile with make:

    tar zxf cpulimit-xxx.tar.gz
    cd cpulimit-xxx
    make

    Executable file name is cpulimit. You may want to copy it in /usr/bin.

    Examples of use

    Limiting the process 'bigloop' by executable name to 40% CPU:
    cpulimit --exe bigloop --limit 40
    cpulimit --exe /usr/local/bin/bigloop --limit 40
    Limiting a process by PID to 55% CPU:

    cpulimit --pid 2960 --limit 55
    Notes

    If you have just one processor you can limit the percentage from 0% to 100%, and this is fine. But if your machine has four processors percentage may vary from 0% to 400%, so setting the limit to 200% means to use no more than half of the available power.

    cpulimit should run at least with the same user running the controlled process. But it is much better if you run cpulimit as root, in order to have a higher priority and a more precise control.
    Now cpulimit does limit also the children of the specified process. The code is still experimental, so let me know how it is.

    http://cpulimit.sourceforge.net/
    Use your Brain, don't be slave!!!!

  3. #3
    Member
    Join Date
    Jul 2007
    Posts
    145

    Default

    What does it mean by Pid? It says I have to specify a target process, but am I able to enter in a single command to limit everything at once?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •