Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.