Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-21508

Threadpool does not respect process affinity mask

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 10.1, 10.2, 10.3, 10.4
    • Fix Version/s: 10.5.2
    • Component/s: Server
    • 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.

        Attachments

          Activity

            People

            Assignee:
            wlad Vladislav Vaintroub
            Reporter:
            sergei-gl Sergei Glushchenko
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: