Limiting a processes CPU or RAM availability?

Discussion in 'OT Technology' started by Izze, Feb 14, 2008.

  1. Izze

    Izze New Member

    Joined:
    Sep 26, 2007
    Messages:
    159
    Likes Received:
    0
    I neeeeed to find a way to do this!

    Tanks :)
     
  2. xenon supra

    xenon supra OT Supporter

    Joined:
    Feb 3, 2005
    Messages:
    33,675
    Likes Received:
    0
    Location:
    San Diego, CA
    renice command, google it
     
  3. bandwagon

    bandwagon Copy/Paste

    Joined:
    May 27, 2005
    Messages:
    1,501
    Likes Received:
    0
    There is a GUI called renicer
     
  4. Pseudonym

    Pseudonym --

    Joined:
    Mar 14, 2006
    Messages:
    2,406
    Likes Received:
    0
    Location:
    Canada
    could this be done to Safari so it doesn't eat up all my RAM?
     
  5. TheWeasel

    TheWeasel Guest

    No really. Safari is gonna eat all your RAM regardless.
     
  6. Izze

    Izze New Member

    Joined:
    Sep 26, 2007
    Messages:
    159
    Likes Received:
    0
    Do you know where this can be found? I looked around G but I couldn't find anything.

    I did the renice command line ('sudo renice 20 -p 1234'), but it didn't seem to even touch it o_O Maybe I will have better luck with the GUI version?

    Any other suggestions/methods would be appreciated :)
     
  7. mobbarley

    mobbarley Active Member

    Joined:
    Mar 4, 2005
    Messages:
    9,256
    Likes Received:
    2
    Location:
    Sydney
  8. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    All the GUI does is write the command line for you. If you followed the instructions, then you did it right but it can't control Safari.

    Try using Opera, if it runs on OSX.
     
  9. Izze

    Izze New Member

    Joined:
    Sep 26, 2007
    Messages:
    159
    Likes Received:
    0
    ^ How come it cannot control Safari?
     
  10. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    No idea, but if it didn't work, then it didn't work. Just stating the obvious.
     
  11. Izze

    Izze New Member

    Joined:
    Sep 26, 2007
    Messages:
    159
    Likes Received:
    0
    It seems this renice just sets the priority to low, but if it is the only thing actively running at the time, priority doesn't seem to come into play and the program takes up all the resources like normal.

    I need something to where I can set it by percentage, or something of that manner.
     
  12. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    I don't believe there are any operating systems that allow that kind of control -- at least, none that you'd ever see outside a server room. I wrote a program for Windows a couple of years ago that lets me change priority and # of CPUs for each program, and those are the only settings you'll ever find on a desktop machine. There just isn't any benefit to locking a program into using 10% CPU power and 10% RAM (or whatever), because the OS can always let that program use whatever it wants and then shove it out of the way when something more important starts running. You gotta remember, nothing happens without the OS saying it's okay.

    If all you want is a lower RAM usage, don't bother worrying about it. Even if you could do it, it almost certainly wouldn't have any meaningful effect.
     
  13. Izze

    Izze New Member

    Joined:
    Sep 26, 2007
    Messages:
    159
    Likes Received:
    0
    Well beings how OSX 10.5 has a full POSIX Unix backend, I am at a good advantage to have the apps that "are only found in a server room", at my disposal.

    There are many good reasons why you would want to have your system's processes not run at full capacity, especially in big companies and in big server rooms (running unix as well), although my only reason is to drastically slow down a particular program's AI, but the reasons are irrelevant fortunately :)
     

Share This Page