How to explain a bad performance rating using the bench command?

14 views (last 30 days)
Performing the MATLAB command bench on my PC (which is equipped with a i7 4 core Intel CPU) ends up with results in speed that are half the ones of the least efficient machine given as example (Intel Core i5)
bench
ans =
0.4545 0.2735 0.0744 0.5121 1.4183 1.1143
I am using MATLAB 2018b under Windows 10.
One of my colleague using a less performant machine (with a i5 CPU, but under Windows 7) has a far better performance rating.

Answers (2)

John D'Errico
John D'Errico on 16 May 2019
Edited: John D'Errico on 16 May 2019
Lots of reasons are possible. The ones that come to mind immediately are:
Were you running something else at the same time? Browsing the web is a bad idea, because it takes attention away from the test. For example, this first test was done in quiet (with an iMac, OSX 10.14.4, i9 cpu, 8 cores, MATLAB release R2019a):
bench
ans =
0.08337 0.10644 0.011056 0.079255 0.76535 0.36736
But then I started browsing the web on the side, and some of the tests got bogged down. The last one does some 3-D graphics, which seems to be impacted by heavy browsing the most.
bench(5)
ans =
0.087357 0.10825 0.010641 0.074985 0.75889 0.59918
0.10535 0.13834 0.011139 0.10312 0.74609 0.59016
0.099913 0.12333 0.010056 0.07518 0.76595 0.5753
0.095354 0.26578 0.011294 0.075813 0.79475 0.55199
0.09659 0.14228 0.01101 0.09376 0.82353 0.66997
So a distracted computer is a slow one. The difference will be larger if you have fewer cores, since then the distractinos are far moresignificant.
Do you have some process running in the background that is sucking up some CPU cycles? For example, if Norton is busy in the background, it can be a core hog.
Do you have all of your cores available? For me, it would be 8.
maxNumCompThreads
ans =
8
Hyperthreading does not count though.
Make sure profile is turned off.
profile off
bench
ans =
0.084097 0.12334 0.013858 0.073399 0.76728 0.36804
>> profile on
>> bench
ans =
0.081877 0.08916 0.031453 0.076167 0.76442 0.3726
>> profile off
>> bench
ans =
0.08199 0.096944 0.009505 0.073315 0.75408 0.36175
>> profile on
>> bench
ans =
0.08302 0.10087 0.030537 0.074605 0.74617 0.36541
As you can see, on my computer, if I turn profile on versus off, most of the tests were not impacted. However, the ODE test (the third number there) has its times tripled.
I'm sure there are many other reasons. For example, you might ant to restart MATLAB, just to make sure there is no memory fragmenting. (I doubt this is the problem though, but it would not hurt to try.)
Finally, I would seriously suggest a run through geekbench.
You don't need to buy it to test your computer.
  2 Comments
Sébastien Ruiz
Sébastien Ruiz on 16 May 2019
Thank you for your answer.
maxNumCompThreads
ans =
4
For the other suggestions, everything was tested but no improvement on the results .
Still unexplained underevaluated performance on bench command.
John D'Errico
John D'Errico on 16 May 2019
I just ran a test, with an activity monitor active on the side. It looks like bench is not a core hog anyway. Even with 8 cores for me, I never really see it get any higher than 150% of one core.
I'd next look at an activity monitor. Are there processes running on your machine that are stealing significant time?
Is your copy of MATLAB non-local? That is, are the MATLAB directories living somewhere that is not directly on your system? If so, I recall that can really slow things down. Is your disk access really slow?

Sign in to comment.


Sébastien Ruiz
Sébastien Ruiz on 17 May 2019
Looking at the task manager, it doesn't seem that important workload of the processor is being taken by some other processes.
My MATLAB copy is local with a token base license but with the same configuration one of my colleague does not have any problem.
My disk is a SSD disk and test on hardware performance had not shown anything wrong.

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!