Very slow execution on Matlab code in linux
10 次查看(过去 30 天)
显示 更早的评论
Hello, I have a matlab executable file that is running under Matlab Compiler Runtime (2013a) on a linux machine (Ubuntu 12.04 LTS) and another executable with the same function but compiled for Windows machine. The execution time on Windows platform is about 60 seconds, but in Linux is taking much longer time (i.e. about 400 seconds). The Matlab runtime environment on linux is 2013a and in windows is 2013b.
Do you think that the difference in execution time is related on the different versions of the runtime environments? What can I do in order to improve the speed on the linux environment?
0 个评论
采纳的回答
Dima Lisin
2015-2-8
编辑:Dima Lisin
2015-2-8
Hi Dimitris,
Based on what you are saying I would guess that the bottleneck may be in reading the video. Matlab uses the codecs provided by the OS, which could explain some the performance difference between Windows and Linux. Also, the fact that you have an older version of Matlab on Linux could be a contributing factor.
One thing you could try is to run your code on an uncompressed video, assuming that you have enough disk space. At the very least that will tell you whether decoding the video is indeed the bottleneck.
Also, what are you using for reading the video? You can try the VideoReader object or the vision.VideoFileReader object in the Computer Vision System Toolbox.
2 个评论
Dima Lisin
2015-2-9
You may also want to try different compression formats. Some may be faster to decode than others. For Linux, Motion Jpeg is usually the best bet.
更多回答(1 个)
Jan
2015-2-4
Without knowing any detail of the program it is impossible to give an advice. Perhaps it depends on a data file, which is read through a slow network connection. Or the problem doe not match into the RAM and slow swapping slows the computing down.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!