Poor Matlab performance on AMD-based computer

Recently, we purchased a new computation server for our department with 4x Opteron 6128 processors and 64 GB RAM, running Windows 2008 Server R2. We wanted to maximise number of physical cores in order to ensure that several users will be able to use the computer at a time without influencing performance of other users' computing tasks.
However, there is one serious problem. Users complain that Matlab is really slow compared to our previous (dated) server.
I've run the Matlab built-in benchmark utility with alarming results:
The individual benchmark scores in Matlab R2011b are (64bit, though 32bit scores are almost the same):
LU: 1.2580
FFT: 0.3110
ODE: 0.3148
Sparse: 35.3353
2-D: 3.1159
3-D: 1.3190
Is it really so, that Matlab on 4 8-core Opterons is worse than on Atom processor?
Is there anything that can be done in order to improve the performance? Since Matlab obviously uses Intel MKL BLAS even for AMD processors, I tried to find alternative BLAS libraries such as ACML, but I wasn't successful in getting them to work with Matlab.
I would be grateful for any suggestions.

5 Comments

Can you run the benchmark again and restricting MATLAB on one CPU (can be done in the taskmanager under the processes tab)? Also make sure that no other user us currently using that CPU. I would guess you will see a normal perfomance than.
I have seen that when you use more than 1 CPU the MATLAB perfomance goes down.
For using another BLAS/LAPACK Library you have to set environment variables which point to the DLL you like to use:
http://www.mathworks.com/help/techdoc/rn/f7-998197.html#f7-1010436
There is one for blas: BLAS_VERSION and one for lapack: LAPACK_VERSION. But I guess this wont give much speedup.
Unfortunately, limiting Matlab to a single CPU did not help. The scores are:
LU: 2.1276
FFT: 0.6037
ODE: 0.1885
Sparse: 6.1207
2-D: 0.7957
3-D: 0.8221
There is slight improvement in some scores and drop in others, but it is still really slow overall.
Since I've read some reports that many users experienced performance drop after upgrading Matlab R2007b to a newer version, I also tried to run the benchmark in R2007b and here comes the interesting part - see the scores below:
LU: 0.2858
FFT: 0.2700
ODE: 0.2119
Sparse: 0.3789
2-D: 0.7410
3-D: 0.7396
The results are much better overall! One thing I'm not sure about is if the bench is the same in R2007b and R2011b. Even if it was, reverting to R2007b is not an option, since many of our scripts and functions rely on features that are missing in R2007b.
Concerning the BLAS libs - I know about the environment variables, however, after changing to ACML 5.1.0 DLL downloaded from AMD developers site, Matlab complains about missing functions in the DLL. I also tried to compile own ATLAS libs at least for W32 version of Matlab, but since I'm really not that experienced in compiling things and messing with Linux, particularly with Cygwin, I did not succeed.
The bench function can change from release to release and it definetly changed from 7b to 11b. See matrices which are used for testing are much smaller in 7b than in 11b. Thats probably why you get better results in 7b.
I found an intersting benchmark for the Opteron 6174:
http://www.anandtech.com/show/2978/amd-s-12-core-magny-cours-opteron-6174-vs-intel-s-6-core-xeon
The Opteron performance vary from pretty good to totally bad.
I doubt that there is much one can do here.
The differences in matrices sizes would explain a lot.
However, we knew that the per-core performance will be worse than with an Intel platform, but seriously - even in the benchmark you linked to, the performance of the Opteron 6174 was not that bad at all. It should certainly be a lot better than the Intel Atom processor...
I still do think that there is something rotten either in Matlab or Windows installation...

Sign in to comment.

Answers (1)

I have the exact same problem :( I think AMD ought to take this very seriously! I would certianly recommend ANYONE to avoid buying an AMD based server if they're going to do Matlab computation stuff on it.

2 Comments

Anders - what type of AMD processors did you buy? I am now reconsidering whether an AMD Opteron 6200 based server is a good idea! However, there will only be a single user running parallel computations using all available cores rather than lots of users at once.
It's an AMD Opteron 6176, 2.30 GHz (4 processors; 48 virtual cores). I would STRONGLY recommend against getting an AMD processor unless you can somehow test that it will work first.
However, Stata runs perfectly, even when many many users are using it simultaneously.
Sorry that I didn't see your reply until now, apparently there's no email follow-up on these forums.

Sign in to comment.

Categories

Asked:

on 29 Mar 2012

Community Treasure Hunt

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

Start Hunting!