MATLAB: Poor Matlab performance on Intel Xeon processor

i7performanceserverxeon

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

Best Answer

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.