On an SMP system, how can I set processor affinity for a certain task or process in Red Hat Enterprise Linux?

Solution Verified - Updated -

Issue

  • In some cases, the system administrator prefers to override the kernel's process scheduling and bind a certain process to a specific CPU (or CPU's) on an SMP system. This is also known as "setting processor affinity" for the process in question.
  • How can I assign a thread to a cpu ?

Environment

  • Red Hat Enterprise Linux 3, 4, 5 and 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In