Why CPU affinity of a process set by "taskset" command getting reset automatically ?

Solution Unverified - Updated -

Issue

  • CPU affinity of a process is set to 15-14 using "taskset" command.
    Eg:
# taskset -c 15-14 ./test.sh > /tmp/test.log 2>&1 &
  • Initially it is giving the expected result (i.e task is always using cpus 14-15 )
Wed Nov 6 15:17:26 EST 2013
 15 67959 54796 \_ test.sh
 14 54796 54799 \_ ps
Wed Nov 6 15:22:26 EST 2013
 14 67959 54796 \_ test.sh
 15 54796 55375 \_ ps 
  • But after ~12 hours, the affinity is getting reset and the CPUs reported changed.
Thu Nov 7 03:52:30 EST 2013 
 15 67959 54796 \_ test.sh 
 14 54796 53895 | \_ ps  
Thu Nov 7 03:57:30 EST 2013         
  8 67959 54796 \_ test.sh 
 10 54796 55026 | \_ ps 
Thu Nov 7 04:02:30 EST 2013 
  8 67959 54796 \_ test.sh 
 10 54796 55561 | \_ ps 

Environment

  • Red Hat Enterprise Linux 6
  • taskset

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.