summaryrefslogtreecommitdiff
path: root/mysys/mf_dirname.c
diff options
context:
space:
mode:
authorDaniel Black <daniel@linux.ibm.com>2018-11-09 14:38:22 +1100
committerAnel Husakovic <anel@mariadb.org>2020-02-18 00:47:07 +0100
commitf21bf8fce21d0f72e84c4b39c4792ef35a68666f (patch)
treee91b78cd20bcb6e31aee76514162a8152fd716e5 /mysys/mf_dirname.c
parentbe77fa914c30e92e33e60feb5a3e098c765798af (diff)
downloadmariadb-git-bb-5.5-anel-PR922.tar.gz
my_getncpus based on threads availablebb-5.5-anel-PR922
Detecting the cpus based on sysconf of the online CPUs can significantly over estimate the number of cpus available. Wheither via numactl, cgroups, taskset, systemd constraints, docker containers and probably other mechanisms, the number of threads mysqld can be run on can be quite less. As such we use the pthread_getaffinity_np function on Linux and FreeBSD (identical API) to get the number of CPUs. The number of CPUs is the default for the thread_pool_size and a too high default will resulting in large memory usage and high context switching overhead.
Diffstat (limited to 'mysys/mf_dirname.c')
0 files changed, 0 insertions, 0 deletions