matlabpool question
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm running a 6-core xeon machine. Which means I have potential for 12 workers - 6 real, 6 virtual (from multithreading)
Matlabpool gives me access to 8 workers.
It seems like the gains from running more workers than # of cores isnt large - and I therefore want to limit my matlabpool to 6 (number of cores).
If I run;
matlabpool open 6
how do I know its running the 6 workers on my 6 cores, opposed to say
4 cores, 2 with hyper threading or 5 cores, 1 with hyper threading
or any variation of.
Any suggestions?
(disabling hyper threading isnt a viable solution - I'm looking for a matlab end solution, not a system toggle)
Thanks!
0 Kommentare
Antworten (1)
John Walley
am 1 Mär. 2011
The MATLAB workers run as separate processes. Like any other process when and where it runs is handled by the operating system (OS). You can expect any modern OS to just Do The Right Thing in the case where you're running N (or fewer) CPU intensive processes on N cores, i.e. they will distribute across physical cores. If you have more than N (CPU intensive) processes (MATLAB workers or other applications) running simultaneously then you are going to see contention for resources, be it CPU time, memory bandwidth, IO etc.
As ever when considering performance of your application it's important to understand where the bottlenecks are and to base things on evidence where possible (profiling!).
All that said - you can force a process to run on a particular core by setting the CPU affinity of a process. Under Windows you can do this interactively from Task Manager (right-click a process and select Set Affinity... See this Stack Overflow question for some more ideas. Similar methods are available under Linux. For some ideas see: http://stackoverflow.com/questions/628057/how-to-set-processor-affinity-on-an-executable-in-windows-xp.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Parallel Computing finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!