Find the answer to your Linux question:
Results 1 to 2 of 2
Is there any way to limit the number of CPU's used for a particular program? I need to run a program using only 1 or 2 CPU's on a quad ...
  1. #1
    Just Joined!
    Join Date
    Feb 2009
    Posts
    1

    Limit the number of CPU's

    Is there any way to limit the number of CPU's used for a particular program? I need to run a program using only 1 or 2 CPU's on a quad core machine.

    Thanks.

  2. #2
    Just Joined!
    Join Date
    Sep 2007
    Location
    Lafayette, IN
    Posts
    83
    It's not quite what you're looking for, but the nice(1) command can allow you to change the priority of a job.

    The only way I'm aware of to do what you want is to create a virtual machine with the desired number of processors and run the job in there. That seems a bit heavy though, so maybe someone else will have a better answer.

    It might be helpful to know why you want to impose the CPU limitation.

Posting Permissions

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