Poor Matlab performance on Intel Xeon processor

41 views (last 30 days)
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

Accepted Answer

Antonio Cedillo Hernandez
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 Comment
Alessandro
Alessandro on 8 May 2015
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

Sign in to comment.

More Answers (2)

José-Luis
José-Luis on 25 Aug 2014
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 Comments
Alessandro
Alessandro on 26 Aug 2014
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 on 26 Aug 2014
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?

Sign in to comment.


hlk
hlk on 8 Dec 2014
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

Categories

Find more on Parallel Computing Fundamentals in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!