Matlab on Microsoft 2008 compute server

I'm trying to take advantage of a compute server with 4 quad-core processors and 128 GB of RAM running Microsoft Server 2008 (Matlab R2010b). When I try the benchmark routine at the command line, it's very slow:
>>bench
ans =
5.4150 0.0812 0.1598 34.6092 0.4319 0.8718
We have the parallel computing toolbox, and when I try the benchmark routine within a parallel for loop, each individual instance is much faster.
>>matlabpool;
parfor i=1:8;
foo(i,:) = bench;
end;
matlabpool close;
mean(foo)
ans =
0.2253 0.2894 0.2894 0.343 0.4630 0.0292
The code that I'm running normally takes advantage of the two quad-cores that I have in my macPro and is not written using the parallel computing toolbox. Is there any way to get matlab to take advantage of the 4 processors (i.e., 16 cores) by default?

 채택된 답변

Daniel Shub
Daniel Shub 2011년 8월 20일

0 개 추천

I am not sure what bench does with a compute server. In particular I do not know if the LU, ODE, and Sparse tests can use multiple cores. I know the FFT implementation uses multiple cores, so it is not surprising to me that it is faster. I am not sure what happens with a headless machine (not that your necessarily is) and a parfor loop with the 2-D and 3-D tests.
I wonder if the parfor loop divides the memory in such a way that it results in these tests becoming faster.
Instead of looking at the speeds for general tests, I would suggest testing with a procedure that is specific to what you want to compute.

추가 답변 (1개)

Fangjun Jiang
Fangjun Jiang 2011년 8월 19일

0 개 추천

First of all, run bench a few times in a row till you get stable results. My result of first run of bench is much worse than the second run.
Second, check your settings: menu File->Preferences ... ->General->Multithreading

댓글 수: 1

Brock Kirwan
Brock Kirwan 2011년 8월 19일
I've tried that. The first call to bench is pretty representative of multiple calls, such as: bench(10)

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Profile and Improve Performance에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by