Questions tagged [numactl]

numactl runs processes with a specific NUMA scheduling or memory placement policy.

The policy is set for command and inherited by all of its children. In addition it can set persistent policy for shared memory segments or files.

Use -- before command if using command options that could be confused with numactl options.

Valid node specifiers

all All nodes

number  Node number

number1{,number2}   Node number1 and Node number2

number1-number2 Nodes from number1 to number2

! nodes Invert selection of the following specificati
29 questions
13
votes
1 answer

Create Named Shared Memory on a Specific NUMA Node?

Similar to this post, I would like to create a named shared memory segment (created via shm_open() + mmap() on CentOS 7) on a specific NUMA node (not necessarily local). The post suggested that it be achieved by using numa_move_pages(). I have few…
HCSF
  • 2,387
  • 1
  • 14
  • 40
8
votes
1 answer

Mongodb in Docker: numactl --interleave=all explanation

I'm trying to create Dockerfile for in-memory MongoDB based on official repo at https://hub.docker.com/_/mongo/. In dockerfile-entrypoint.sh I've encountered: numa='numactl --interleave=all' if $numa true &> /dev/null; then set -- $numa…
mkurnikov
  • 1,581
  • 2
  • 16
  • 19
7
votes
1 answer

Maximum number of threads in C++

Trivia Usually, when I want to write a multi-threaded program in C++, I ask the hardware regarding the number of supported concurrent threads as shown in what follows: unsigned int numThreads = std::thread::hardware_concurrency(); This returns the…
MTMD
  • 1,162
  • 2
  • 11
  • 23
6
votes
0 answers

mbind: how to uniformly interleave existing segment on all nodes?

Using mbind, one can set the memory policy for a given mapped memory segment. Q: How can I tell mbind to interleave a segment on all nodes? If done after allocation but before usage, MPOL_INTERLEAVE on all nodes will do what we expect -- memory will…
João Neto
  • 1,732
  • 17
  • 28
6
votes
2 answers

What does node distances in numactl mean?

I'm trying to understand what node distances in numactl --hardware mean? On our cluster, it outputs the following numactl --hardware available: 2 nodes (0-1) node 0 cpus: 0 1 2 3 4 5 12 13 14 15 16 17 node 0 size: 32143 MB node 0 free: 188 MB node 1…
tandem
  • 2,040
  • 4
  • 25
  • 52
4
votes
0 answers

Java process reports "incorrect" number of available processors

I'm running a Java 1.6 process on an 8-node NUMA machine using: numactl --cpunodebind=0 java -server com.foo.Bar Each node has 8 CPUs as reported by numactl --hardware: available: 8 nodes (0-7) node 0 cpus: 1 2 3 4 5 6 7 8 node 0 size: ... node 0…
user191776
3
votes
1 answer

Spark on NUMA systems

I'm considering Apache Spark for data analysis. In the past I've experienced Java/Scala slowdowns on 4-socket servers due to NUMA architecture and objects being local to a single node. The solution was to start a separate pinned JVM for each NUMA…
Pengin
  • 4,692
  • 6
  • 36
  • 62
3
votes
2 answers

Numa balancer in Linux

Is NUMA balancer enabled by default in recent Linux versions? If so how can I disable the NUMA balancer please let me know.
Pradeep Jagadeesh
  • 85
  • 1
  • 2
  • 10
3
votes
2 answers

Get the location of a memory in NUMA

I am currently working on a NUMA system with 2 nodes. I got a pointer pointing to some memory, but I do not know which node it is in. Is there any way I can get the node number of the memory? (The reason that getting the node mask of the current…
user3743384
  • 91
  • 1
  • 11
2
votes
1 answer

Confused about OMP_NUM_THREADS and numactl NUMA-cores bindings

I'm confused about how multiple launches of same python command bind to cores on a NUMA Xeon machine. I read that OMP_NUM_THREADS env var sets the number of threads launched for a numactl process. So if I ran numactl --physcpubind=4-7 --membind=0…
Joe Black
  • 625
  • 6
  • 19
2
votes
0 answers

How to avoid remote memory allocation in numa architecture?

I have a numa machine with two nodes, each node has 8 cores and 64G memory and have two services: service-1 and service-2, service-1 deployed in node-0, and service-2 deployed in node-1. I just want these two services to run separately, So I start…
yskyj
  • 141
  • 1
  • 12
2
votes
0 answers

How to study the impact of NUMA in Java algorithms

I'm studying some codes in Java (SOR algorithm and LU factorisation). The main goal is to study the impact of executing such algorithms in a NUMA aware architecture. I already found some tools such as numactl, and other affinity environment…
Carlos Sá
  • 151
  • 1
  • 5
2
votes
2 answers

set_mempolicy from a different process

For NUMA machines, Linux provides the set_mempolicy system call that allows a process to define its preferred NUMA node for memory allocations. Is there some similar function that allows to change the memory policy of another running process? So…
insumity
  • 5,311
  • 8
  • 36
  • 64
1
vote
1 answer

Understanding failing numactl with --membind=1 or 3 when all lscpu shows 4 numa nodes

I've been trying to figure out the issue with failing numactl command, but it looks like may be i don't fully understand the way numactl or OMP_MP_THREAD works. I'm trying to run a script main.py of 1 instance bound to 4 cpus of numa-node-1 using…
Joe Black
  • 625
  • 6
  • 19
1
vote
1 answer

how do numactl & perf change memory placement policy of child processes?

I notice numactl has some strange impact on stream benchmark More specifically, "numactl ./stream_c.exe" reports 40% lower memory bandwidth than "./stream_c.exe". I checked numactl source code and don't see anything special it should do if I don't…
1
2