Next: Hardware Capability Tunables, Previous: Elision Tunables, Up: Tunables [Contents][Index]
The behavior of POSIX threads can be tuned to gain performance improvements
according to specific hardware capabilities and workload characteristics by
setting the following tunables in the pthread
namespace:
The glibc.pthread.mutex_spin_count
tunable sets the maximum number of times
a thread should spin on the lock before calling into the kernel to block.
Adaptive spin is used for mutexes initialized with the
PTHREAD_MUTEX_ADAPTIVE_NP
GNU extension. It affects both
pthread_mutex_lock
and pthread_mutex_timedlock
.
The thread spins until either the maximum spin count is reached or the lock is acquired.
The default value of this tunable is ‘100’.
This tunable configures the maximum size of the stack cache. Once the stack cache exceeds this size, unused thread stacks are returned to the kernel, to bring the cache size below this limit.
The value is measured in bytes. The default is ‘41943040’ (fourty mibibytes).