[MDEV-21508] Threadpool does not respect process affinity mask Created: 2020-01-17  Updated: 2020-03-25  Resolved: 2020-03-25

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.1, 10.2, 10.3, 10.4
Fix Version/s: 10.5.2

Type: Bug Priority: Minor
Reporter: Sergei Glushchenko Assignee: Vladislav Vaintroub
Resolution: Done Votes: 0
Labels: None


 Description   

Hi,

Threadpool size defaults to the number of CPU cores (https://github.com/MariaDB/server/blob/e7558d4760d20f7b5480ee2eb3ab7d710d1784b1/sql/mysqld.cc#L3995). However it is possible to bind mysqld to specific CPUs or specific NUMA nodes using numactl, taskset or cgroups cpusets. In this case the number of CPUs available to mysqld is not equal to the number of CPUs available to the OS. It would be nice if threadpool checked affinity mask and adjusted default threadpool size accordingly.



 Comments   
Comment by Vladislav Vaintroub [ 2020-03-25 ]

Seems to be fixed, with d7f74150

Comment by Vladislav Vaintroub [ 2020-03-25 ]

Seems to be fixed, with https://github.com/MariaDB/server/commit/fb01cc3766be9131402b82730adfa0e45e6e3511 and https://github.com/mariadb/server/commit/d7f74150

Generated at Thu Feb 08 09:07:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.