+. schedutils 

# apt-get install schedutils (ubuntu)

# up2date schedutils (redhat)

# rpm -ivh schedutils* (redhat)



+. check for the taskset information for process

   > -p  : hex formant for cpu number

   > -pc : decimal formant for cpu number

# taskset -pc 2360 

pid 2360's current affinity list: 0



+. assign affinity with invoking the process

# taskset -c 1-3 /etc/init.d/httpd start



+. assign affinity on a running process

  > -p : Operate on an existing PID and do not launch a new task

  > -c : Specify a numerical list of processors instead of a bitmask.

         The numbers are separated by commas and may include ranges.  

       For example: 0,5,7,9-11.

# taskset -c 1 -p 12314

# taskset -c 3,4 -p 12314

블로그 이미지

Melting

,