Questions tagged [taskset]
12 questions
3
votes
1 answer
How can taskset create pid when the program is not running yet?
I want to limit the processing capability to only a single core in my machine, so I found out taskset can help to set a single core, say core 0, as the following (Courtesy to this answer):
taskset -c 0 -p 45678
The problem is that how can I…
Katherine
- 77
- 1
- 6
3
votes
0 answers
Use of cores with `isolcpus` and `cpuset` TOGETHER
I work with a Red Hat Enterprise Linux Server release 6.9 (Santiago) (I don't manage it). In the GRUB config file we have, let's say, isolcpus=2-32 (out of 36 cores). I also have a cgroup with cpuset=2-32 assigned via cgset.conf to all important…
Arkadiy
- 171
- 5
3
votes
1 answer
Using taskset to set processor affinity
I have the following code in a bash script:
echo "bash pid => $$";
echo "processor affinity before => $(taskset -p $$)"
taskset -cp ${AN_INTEGER} $$
echo "processor affinity after => $(taskset -p $$)"
I get this output:
processor affinity before =>…
Alexander Mills
- 9,330
- 19
- 95
- 180
2
votes
0 answers
JVM only uses 4 cores
I have a processor-intensive Java program and I want it to use all 8 available cores on the machine.
I've run taskset and it reports the mask to be:
pid 5897's current affinity mask: ff
But in top (when running 12 (heavy) threads):
5897 ubuntu …
SanThee
- 121
- 4
2
votes
0 answers
what happens to processes whose process affinity is set to a disabled processor?
I'm running Centos7 on an hyper-threaded Ivy Bridge machine with 40 cores and 80 threads.
The following for loop shows me the processor affinity for all processes with pids <= 80:
for pid in $(ps -e -o pid=); do if ((pid<=80)) ; then taskset…
Richard Gostanian
- 345
- 1
- 8
2
votes
1 answer
CPU reservation and affinity using taskset and isolcpus kernel parameter with JVM?
We need for the JVM to reserve a set number of CPUs. Following my research we can use taskset along with the kernel parameter isolcpus= so that no other process uses this CPU.
A few questions arise:
does the process need to be started with…
danidar
- 91
- 2
- 5
1
vote
0 answers
why is process running on cpu core that is disabled in affinity mask
when I run taskset -p 242306 I got following output
3ffffffffffc000000000000000000000000000000000000000000038000000
sorry for the long string, there are 256 cores on the box.
used taskset -c -p 242306 the output is
pid 242306's current affinity…
Lei Yu
- 11
- 2
1
vote
1 answer
What does the CPU consumption in top mean when a CPU is assigned to a single process?
Being on Linux I have "CPUAffinity= 0 1 3" set in system.conf. I also use "taskset -cp 2 $pid" to assign a CPU to a single process. But what does the CPU consumption for the process in top now mean? Let's say it is 20%. Is it 20% for the single…
affincpu
- 11
- 1
1
vote
1 answer
Who and where is settled affinity mask per process?
I have a process, shell. It's affinity mask is 1 (I have 3 CPUs)
On redundant machine (almost mirror - it is 7 - ALL CPUs)
Who is deciding which mask to set or where it is configured?
[root@h1-nms ~]# ps $$
PID TTY STAT TIME COMMAND
7605…
ALZ
- 921
- 2
- 10
- 13
0
votes
1 answer
What does a taskset -p pid result of "e" mean?
I found the pid of my process. I ran taskset on the pid:
$ taskset -p 2059
pid 2059's current affinity mask: e
What does this affinity mask value "e" mean? I do not see anything about the possible output values in the taskset docs. The man pages…
Scott Skiles
- 139
- 10
0
votes
1 answer
How do I enforce all commands (including many parrallel commands) in a script to run on a specifc few cores?
I'm trying to write at the beginning of my script some code that will ensure every command inside the script is run on just a few specific cores. even if many commands are run in multiple parallels like : [command] & [command] & [command] &…
Giles
- 877
- 7
- 18
0
votes
1 answer
Using CPU affinity with taskset to speed up Node.js computation, blocked for extended chunks of time
I'm running online servers for a physics-based game with a backend in Node.js. Currently, the server can handle 10 games/worlds at a time before the next tick needs to be executed.
With this in mind, I have tight scheduling using nanotimer so that…
DonutGaz
- 111
- 2