MySQL NUMA Scheduling Tuning
Application scenario: In high-concurrency MySQL OLTP applications, the default thread scheduling of the system causes frequent cross-NUMA access of threads. In this case, the CPU overhead increases and the performance deteriorates.
Technical principle: Both the foreground and background threads in MySQL may change their states to sleep frequently, due to lock waiting or any other reason that causes execution suspending. When these threads are brought to running state, they may found themselves scheduled in another NUMA node. As a result, copying thread-specific memory across NUMA nodes occurs, which deteriorates the system performance. Foreground threads need to be dynamically bound to fixed NUMA CPUs to reduce cross-NUMA access and ensure that CPU access load is balanced. Background threads need to be statically bound to fixed NUMA CPUs to reduce cross-NUMA access and improve background thread efficiency.

Performance metric: The performance is improved by 10% in OLTP scenarios.