Poor Matlab performance on Intel Xeon processor

조회 수: 35 (최근 30일)
Alessandro
Alessandro 2014년 8월 25일
댓글: Alessandro 2015년 5월 8일
We have recently bought a server with: 2 processors Intel Xeon CPU E5-2643 v2 @ 3.5GHz, 32GB RAM, Windows Server 2008 R2 Standard (64bit).
Using the Matlab "bench" function I have noticed that the performance of the server is extremely poor: my notebook has a lower speed (Intel i7-3720QM 2.6Ghz, 8 GB RAM, Windows 7) but performs much better.
How is this possible? Is Matlab not optimized for Xeon processors?
Any help would be appreciated,
Alessandro

채택된 답변

Antonio Cedillo Hernandez
Antonio Cedillo Hernandez 2015년 5월 6일
Hi
I used to have the same problem. To improve Matlab performance and take advantage of your hardware, please try the follow (I'm using Matlab R2013a):
  1. Go HOME tab -> ENVIROMENT Section -> Parallel Option
  2. Select "Manage Cluster Profile"
  3. Add a New Cluster Profile by selecting ADD -> Custom -> LOCAL
  4. Use default values. At this point Matlab already recognizes the number of cores of your hardware, in my case I use HP Z820 Workstation with 2 processors Intel Xeon CPU E5-2609 v2 @ 2.5GHz, 32GB RAM, so Matlab recognizes 8 cores which are called co-workers.
  5. Then, to enable the parallel language features of MATLAB use the 'matlabpool' command: "matlabpool open LocalProfile1"
  6. Edit your routine by changing every FOR loop for PARFOR.
  7. Run your routine as usual
  8. At he end, to switch off those parallel language features and use the local client instead, close the pool with: "matlabpool close"
In my case, a video processing routine which lasted up to a week was processed in around 14 hours. Amazing!
For further details, see https://doc.itc.rwth-aachen.de/display/WINC/Using+MATLAB+and+the+Parallel+Computing+Toolbox
Hope this helps.
Greetings.
  댓글 수: 1
Alessandro
Alessandro 2015년 5월 8일
Sorry for may late replay. Thank your for your answers. They give useful suggestions. Actually my problem was really very trivial: the IT guys who administrate the server, chose the wrong energy savings settings; to save energy they reduced the perfomance of the server! Once I have realized this and I have asked them to change the settings, everything is as expected.
Thank you again Best

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

추가 답변 (2개)

José-Luis
José-Luis 2014년 8월 25일
It's probably because Matlab is only running on one of the processors of your dual-core system. Not all functions take advantage of the multiple processors. Try looking at the processes in the task manager to see how many processors are being used in your test.
  댓글 수: 2
Alessandro
Alessandro 2014년 8월 26일
Thank you. I think that the bench function in Matlab does not use any form of parallelization. However what is surprising for me, regardless the number of core used, is that the speed of each core is higher on the Xeon processor (3.5 Ghz) than on the notebook (i7 2.6 Ghz). This is why I was wondering if the different peformance can be due to other characteristics of the Xeon processors compared to the i7.
José-Luis
José-Luis 2014년 8월 26일
The clock speed of the processor is not the only thing that might affect performance. Do the two computer have the same type of RAM? Not all RAM was created equal? Does one of them happen to have an SSD?

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


hlk
hlk 2014년 12월 8일
Not sure if you did, but you really should be running it more than once by using "bench(5)" for example. The first run will never have good results.
The only thing that puzzles me beyond meassure is the poor performance of the included reference systems. I have a i5-2400 which comes out right under the i7 3.5Ghz Mac.
My results:
>> a = bench(20);
>> min(a)
ans =
0.1632 0.0711 0.0927 0.1433 0.2934 0.7325
>> sum(a)/20
ans =
0.1648 0.0720 0.0938 0.1456 0.3188 0.8449

카테고리

Help CenterFile Exchange에서 Parallel Computing Fundamentals에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by