Matlab 2014a not using all logical cores

19 views (last 30 days)
Arran on 11 Jun 2014
Commented: Titus Edelhofer on 12 Jun 2014
When looking at the number of cores used the following is produced:
MATLAB detected: 32 physical cores.
MATLAB detected: 64 logical cores.
MATLAB was assigned: 64 logical cores by the OS.
MATLAB is using: 32 logical cores.
MATLAB is not using all logical cores because hyper-threading is enabled.
ans =
I have set the NumWorkers value in the Cluster Profile Manager to 64 and parallel preferences are 64 also. Can someone explain why only 32 logical cores are being used instead of all 64?
To clarify, the 64 cores represent 32 physical cores that are hyperthreaded.

Answers (2)

Thomas Ibbotson
Thomas Ibbotson on 11 Jun 2014
See Edric's answer to another question about hyperthreading here:
Thomas Ibbotson
Thomas Ibbotson on 12 Jun 2014
As the performance is dependent on the problem, I would recommend measuring the performance of your code using 32 workers, and 64 workers to see if hyperthreading provides any benefit in your case.

Sign in to comment.

Titus Edelhofer
Titus Edelhofer on 11 Jun 2014
to clarify: "only 32 logical cores are being used" means you see in the task manager only 50% usage instead of the expected 100%? Have you checked that indeed 64 workers are started (64 MATLAB tasks while doing your computations)?
Titus Edelhofer
Titus Edelhofer on 12 Jun 2014
Hi Arran,
if you are interested in measuring the performance you might play around with using the function maxNumCompThreads. As Thomas wrote, you need to distinguish between explicitly parallelizing (using the Parallel Computing Toolbox with N workers) or implicit parallelization due to multithreading. Here the default MATLAB uses (which in most cases give the best results, there are of course as always exceptions) number of threads = number of physical cores.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!