Very slow execution on Matlab code in linux
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Dimitris Manousos
il 4 Feb 2015
Commentato: Dima Lisin
il 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 Commenti
Risposta accettata
Dima Lisin
il 8 Feb 2015
Modificato: Dima Lisin
il 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 Commenti
Dima Lisin
il 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.
Più risposte (1)
Jan
il 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.
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!