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

In Windows, it is possible to make a program run on any number of cores in a multicore processor. It can be set in the Task Manager GUI.

Likewise, Is it possible to set the process affinity in Linux, on the command line? To specify what cores the process can run

share|improve this question
up vote 1 down vote accepted

According to the Debian package manager schedtool can do it. (However, it is a command line tool)

Don't know of any GUI tools.

This article indicates that Linux was late to the game of setting cpu affinity. Also with 2.5 kernels and newer, the ping pong effect is not present, processes tend to stay on the same cpu. Therefore setting CPU affinity MAY not be necessary.

share|improve this answer

htop can do it if you press 'a' then choose from the list of CPUs

share|improve this answer

You must log in to answer this question.

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