MATLAB processing speed using windows 7 vs windows server

I have a function that I run on two computers. Each using MATLAB 2014b, one runs windows 7 and has intel cpu with 12 cores, the other runs windows server 2008 and has amd cpu with 12 cores. Using the MATLAB profiler, the function runs in 1.6 seconds on the windows 7 machine and takes 3.6 seconds on the windows server machine. I have no idea why there would be such a difference, the only variables I see are the OS and the cpus but the cpus have comprable benchmark performance specs and shouldn't be the issue. I'm remotely loging in to the windows server and the MATLAB GUI is slower to use but that shouldn't effect the performance of the function. From searching around, I couldn't find any solutions to this type of problem, does anyone have any suggestions?

回答(1 个)

Use the profiler to find out, which parts of the code are responsible for the different speed. It could be a virus scanner on one machine, accesss to the hard disk or a network drive, perhaps some cores of the server are occupied by other tasks or the problem matchs into the 1st level caches of the Intel, but not on the AMD cpu. Updating the command window can take a remarkable amount of time, so try to suppress it by using evalc to start your code.

2 个评论

Thanks, using evalc does reduce the time of the function slightly (~.3 seconds) but it reduces it by the same amount of time on each system. so the factor of 2 time difference is still there even when using evalc.
Did you profile the code as Jan suggested? If so, post the bottleneck line or lines along with a couple lines before and after for context.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Startup and Shutdown 的更多信息

产品

提问:

2015-10-2

Community Treasure Hunt

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

Start Hunting!

Translated by