How does Parallel Computing Toolbox handle Performance and Efficiency core usage?
78 views (last 30 days)
Show older comments
MathWorks Support Team
on 20 Dec 2023
Edited: MathWorks Support Team
on 13 Nov 2024
I have a computer with a CPU where the architecture has been split into Performance Cores and Efficiency Cores (P and E cores). I would like to use this with Parallel Computing Toolbox but I am unsure how many workers to run and whether I should be using both types of cores?
Accepted Answer
MathWorks Support Team
on 13 Nov 2024
Edited: MathWorks Support Team
on 13 Nov 2024
Parallel Computing Toolbox can use both types of cores. MATLAB will rely on the operating system to schedule processes across the available cores, whether they are performance-oriented or designed for efficiency. However, it's important to note that while PCT can utilize both performance (P) and efficiency (E) cores, the best practice for computational tasks is to start with a number of parallel workers equivalent to the number of physical P cores. This is because P cores are akin to traditional physical cores in terms of computational capability, while E cores are optimized for power-saving and less intensive tasks.
From R2024a onwards Parallel Computing Toolbox's local 'Processes' profile will use a number of default workers equal to the number of P cores on the machine.
This may not apply to all chipsets consistently, if performance cores are not correctly detected the default will remain the number of physical cores on the machine. The default number of workers used can be altered by the same steps in the link at the bottom.
If you are using Windows, you may wish to look at adjusting your Windows Power Plan. If this is set to ‘balanced’ then Windows may deprioritise background or unselected applications so they will only run on the E cores of the system. Setting the power plan to ‘High Performance’ should cause the Intel Thread Director to be able to select which workloads are best suited to each core.
You may still see performance gains when including efficiency cores in your parallel computations, but the scaling may differ from performance cores. The actual performance improvement will depend on the nature of your code and the specific tasks being executed. In some cases, efficiency cores can handle less demanding parallel tasks effectively, allowing the performance cores to focus on more intensive computations.
See also this Answer for further details on changing the number of cores leveraged by Parallel Computing Toolbox: https://www.mathworks.com/matlabcentral/answers/2042101-how-can-i-increase-the-number-of-matlab-workers-inside-parallel-computing-toolbox-to-use-all-the-cor
0 Comments
More Answers (0)
See Also
Categories
Find more on Multicore Processor Targets in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!