[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 |