Article 53J7F taskset Cant change affinity ( taskset: failed to set pid 2823's affinity: Invalid argument)

taskset Cant change affinity ( taskset: failed to set pid 2823's affinity: Invalid argument)

by
dr.x
from LinuxQuestions.org on (#53J7F)
Hello Team ,

i have Centos 7
32 cores

i have one process getting 60 % on single core and i want to load balance it

2823 root 20 0 0 0 0 R 57.1 0.0 3666:46 kworker/11:3
3369 root 20 0 163248 5332 3600 R 28.6 0.0 0:00.09 top
1869 sese 20 0 301736 60976 13064 S 9.5 0.0 120:41.54 sese
1870 sese 20 0 332400 93984 13008 S 9.5 0.0 297:27.66 sese
1871 sese 20 0 305744 60320 13004 S 9.5 0.0 90:47.21 sese
19222 sese 20 0 349376 115028 13096 S 9.5 0.1 184:09.26 sese

as you see above the process kworker/11:3 has PID 2823

i have 32 cores so im trying to change the mas of it as below :

[root@C7 vostok]# taskset -p ffffffff 2823
pid 2823's current affinity mask: 800
taskset: failed to set pid 2823's affinity: Invalid argument

as you ses it has mask 800 which mean it stuck always on core # 11 and it failed to be chanegd by the taskset .

I have been following :
https://linux.die.net/man/1/taskset

but in the end there is something i did not understand which is :

(((Permissions

A user must possess CAP_SYS_NICE to change the CPU affinity of a process. Any user can retrieve the affinity mask.)))))

So im not sure if i missed this point or not.

Looking forward to hearing from you .

Thankslatest?d=yIl2AUoC8zA latest?i=F7i3U83XpV8:McYLsi8Y_HQ:F7zBnMy latest?i=F7i3U83XpV8:McYLsi8Y_HQ:V_sGLiP latest?d=qj6IDK7rITs latest?i=F7i3U83XpV8:McYLsi8Y_HQ:gIN9vFwF7i3U83XpV8
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments