Very slow execution on Matlab code in linux
10 views (last 30 days)
Show older comments
Dimitris Manousos
on 4 Feb 2015
Commented: Dima Lisin
on 9 Feb 2015
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 Comments
Accepted Answer
Dima Lisin
on 8 Feb 2015
Edited: Dima Lisin
on 8 Feb 2015
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 Comments
Dima Lisin
on 9 Feb 2015
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.
More Answers (1)
Jan
on 4 Feb 2015
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.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!