Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
In MySQL OLTP scenarios, under high concurrency, the system by default schedules MySQL threads across all available CPU cores in the operating system, as shown in the left section of Figure 1. This leads to frequent cross-NUMA-node memory accesses by threads, which increases CPU overhead and consequently limits performance improvement.
Therefore, thread scheduling needs to be optimized to reduce cross-NUMA-node memory access latency, thereby improving overall system performance, as illustrated in the right section of Figure 1.
Figure 1. MySQL NUMA-Aware Scheduling Optimization Framework

Optimization
The proposed optimized MySQL NUMA Scheduling enables fine-grained control over both foreground and background threads, thereby improving the efficiency of critical threads, reducing remote memory accesses, and ultimately enhancing overall system performance. (see Figure 2.)
Figure 2. Execution Workflow

Background Threads
This feature targets 7 types of performance-critical background threads, primarily related to redo log and purge operations. These threads have a fixed count—only one instance per type—and start with the MySQL instance.
Foreground Threads
MySQL follows a thread-per-connection model, so foreground threads scale with client sessions. Similar to background threads: