Anything related to processor affinity, also known as CPU pinning. The processor affinity is a propriety of a process or a thread in an OS on multi-processor or multi-core systems that influences the OS' scheduling algorithm, binding the execution of that process (or thread) to a specific processor (or core). DO NOT use this tag as a synonym for [affinetransform] tag.
Questions tagged [affinity]
330 questions
0
votes
1 answer
Trouble getting processor affinity (linux)
I am trying to take the affinity mask and make a comma separated string from it using CPU_ISSET(). Then, I need to add the string "taskset -c" in front of it and executable behind it in order to create a Linux command.
When I add the cpu numbers to…

miked23
- 1
- 4
0
votes
1 answer
support count or weighted support count?
I have a set of transactions that contain products and I am working on partitionning these products into clusters based on their affinity. In the literature, I found two measures for the product affinity. One is the support count and the other is…

BS.Mira
- 103
- 8
0
votes
1 answer
Java Affinity Lock
I have a newbie question, so I started looking at Java Affinity library and I have the following code:
public static void main(String[] args){
AffinityLock l = AffinityLock.acquireLock(5);
Thread.currentThread().setName("Testing");
…

Theboy
- 353
- 1
- 2
- 8
0
votes
0 answers
How can I know on which CPU a NIC driver's interrupt service routine running?
I want to manually control a NIC's IRQ affinity in order to do some low-latency performance experiments. and I want to see on which CPU the NIC driver's interrupt service routine (ISR) resides.
On Fedora 19, I can see the the information on…

cwang.sh
- 23
- 3
0
votes
1 answer
kubernetes node affinity require pod restart even the pod has meet the rule in node affinity
I have a running pod (pod-1), deployed from a k8s deployment (deploy-1), on k8s node-1. Someday, I want to patch node affinity to this deployment. For example, the target node must have label 'data=allowed'.
My steps:
Add label 'data=allowed' to…

Vinson Xing
- 11
- 1
0
votes
0 answers
setting the affinity of an array of threads
My code doesn't seem to work the way I want, I have tried to find where the problem is but I just can't seem to see that there's something wrong with it ...I think I may have understood the whole thing wrong.
I am trying to set the affinity of a…

flora
- 47
- 5
0
votes
1 answer
cpu afinity mask for 32 CPU cores
I have 32 available CPU cores and the affinity mask is:
00ff00ff
Can someone please help me understand which CPU cores the affinity is set to, using this number?

rawrintheclouds
- 89
- 8
0
votes
1 answer
postgresql affinity - docker service to swarm
I am new to docker, and I have a problem. I want to gain affinity and exchanging data between two nodes in docker swarm.
(example ip)
I have one as manager: 192.168.10.1
and worker on: 192.168.10.2
They are already connected.
I have wrote…

xross
- 597
- 4
- 9
- 25
0
votes
1 answer
Jboss java process affinity settings
I have a requirement to bind JBoss and it's related processes (java.exe) to 1 CPU of 2 Cores on a given server.
Problem is there are another java batch process running using there own separate java.exe so how to bind JBOSS invoked processes using…

Dev G
- 1,387
- 4
- 26
- 43
0
votes
2 answers
implementing include/sched.h functions
I wanted to study how threads can be assigned manually to specific cores on a multi core machine. I found that include/sched.h defines some macros and functions (sched_setaffinity, etc.)that can help for this. However, the functions are extern'ed…

Aastha
- 91
- 8
0
votes
0 answers
CPU affinity is not being limited by taskset
I am using the taskset tool to set CPU affinity for my multithreaded Rust program which queries data from MongoDB:
taskset -c 16-31 cargo run
When I run this command, I find that the program will also run on other CPUs as observed from htop. What…

YjyJeff
- 833
- 1
- 6
- 14
0
votes
1 answer
Linux embedded sched_setscheduler workload
I am developing a testing approach for embedded software, and would like to test it on a POSIX based, real world application that uses scheduler Linux functions (e.g. sched_setscheduler).
It is relatively easy to find open source software that is…

xTrmwYs
- 43
- 1
- 9
0
votes
1 answer
Qt Creator: start programm with processor affinity
I need to debug an application for an embedded device. A problem with this application might be timing related so I try to decrease the speed of execution on my development machine.
I have a setup which is quite useful but needs a little tweaking…

Michael
- 98
- 1
- 9
0
votes
1 answer
How to set affinity for a timer in C/C++ under Linux?
I have timer created with a function timer_create(CLOCK_REALTIME, &events, &timer), where timer is a unique per process timer ID (according to man).
Now there is sched_setaffinity function to set affinity for a given PID.
How can I set affinity for…

zupazt3
- 966
- 9
- 30
0
votes
1 answer
What overhead is involved in 2 threads accessing an object that is created in a 3rd thread - each thread has a different CPU affinity (c++ and linux)?
Suppose thread A creates an Object (Oa) to be used by two other threads. thread B writes to Oa and thread C reades from Oa.
Threads A,B, and C are locked into CPUs 1,2,3 respectively using cpu affinity.
What overhead/activities are involved with…

imitchell
- 33
- 5