[Bug nptl/23962] New: Very high overhead pthread_spin_lock on multi-node NUMA systems
hjl.tools at gmail dot com
sourceware-bugzilla@sourceware.org
Fri Dec 7 17:38:00 GMT 2018
https://sourceware.org/bugzilla/show_bug.cgi?id=23962
Bug ID: 23962
Summary: Very high overhead pthread_spin_lock on multi-node
NUMA systems
Product: glibc
Version: 2.29
Status: NEW
Severity: normal
Priority: P2
Component: nptl
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Target: x86-64
Created attachment 11437
--> https://sourceware.org/bugzilla/attachment.cgi?id=11437&action=edit
A workload with pthread_spin_lock
This workload with pthread_spin_lock shows that:
[hjl@gnu-4 numa-spinlock]$ make tst-spinlock-overhead
gcc -O2 -g -c -o tst-spinlock-overhead.o tst-spinlock-overhead.c
gcc -o tst-spinlock-overhead tst-spinlock-overhead.o -lpthread
[hjl@gnu-4 numa-spinlock]$ ./tst-spinlock-overhead
Number of threads: 2, Total time 193871694, Overhead: 3.17
Number of threads: 4, Total time 543029933, Overhead: 4.44
Number of threads: 8, Total time 2523646854, Overhead: 10.32
Number of threads: 16, Total time 11818665838, Overhead: 24.16
Number of threads: 32, Total time 66807641075, Overhead: 68.30
Number of threads: 48, Total time 151027783404, Overhead: 102.93
Number of threads: 56, Total time 167319124315, Overhead: 97.74
[hjl@gnu-4 numa-spinlock]$
when a spinlock is shared by threads running on different NUMA nodes,
spinlock overheads dominate CPU usages. This makes multi-threaded
applications with spinlock run poorly on multi-node NUMA systems:
[hjl@gnu-4 numa-spinlock]$ cat /sys/devices/system/node/online
0-1
[hjl@gnu-4 numa-spinlock]$ cat /sys/devices/system/cpu/online
0-55
[hjl@gnu-4 numa-spinlock]$
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list