Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I set processor affinity in Linux machine (Fedora) that user duel core Intel(any) CPU? I want the other core to shut down.

Thanks

share|improve this question
up vote 2 down vote accepted

Several ways come to mind, all using boot line parameters. Insert these in your grub configuration so they're used on next boot:

isolcpu=0   -or- isolcpu=1     -- specifies which cpu to ISOLATE.
maxcpus=0                      -- specifies to use only core 0
nosmp                          -- legacy version of maxcpus=0 (depreciated)

You could use the taskset command to individually set the cpu affinity for each running process. Ideally, you'd want to set affinity for init (pid 1) and have everything inherit that (which is essentially what the first command above does).

taskset -p [mask] pid

[mask] is a bitmask for valid cpus. to make a program only run on cpu 0, use '1' as the mask, to only use cpu 1, use '2', and so on. (to use both, use '3')

This can get tedious. No idea why you'd want to cripple your machine like this, but hey... it's your machine.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .