I am trying to use taskset to assign some processes to specific CPU's. When I run taskset, it appears that the command has worked as I get a reply stating what the new affinity of the process is set.
However when i monitor the top output (the process that i am trying to assign a cpu to is running at a high cpu percentage), I can see that the process is still switching between cpus so it looks like the taskset is not working.
When searching the web for similar issues, I see a posting on the Red Hat site https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_MRG/1.1/html/Realtime_Tuning_Guide/sect-Realtime_Tuning_Guide-Realtime_Specific_Tuning-Non_Uniform_Memory_Access.html
This states that taskset will not work on numa enabled systems. Is this the case? I have not been able to find this out from anywhere else.
The taskset command that I am using is
taskset -pc 1-2 16723 pid 16723's current affinity list: 0-7 pid 16723's new affinity list: 1,2
I also tried:
taskset -p 0x00000001 16723
The version of OS is:
Description: Ubuntu 12.04.1 LTS Release: 12.04
Kernel Version: Linux hadoop 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Before I look at using cgroups, I would have thought that taskset would work to at least assign cpu affinity for a process?
Also to confirm that numa is not disabled on my host From http://martincarstenbach.wordpress.com/2012/04/27/little-things-i-didnt-know-difference-between-_enable_numa_support-and-numactl/
BOOT_IMAGE=/boot/vmlinuz-3.2.0-29-generic root=UUID=3221e122-b2fb-48b7-b761-16c57ef51f9a ro quiet splash vt.handoff=7
Confirming that this is on a physical host.