Wednesday, April 1, 2020

Project Part 1

For this project we are tasked with selecting an open source software and trying to optimize some part of it. For this I chose FFmpeg as it is a file conversion tool which is open source, I know how to get a large data input for bench marking and it is CPU reliant.

So the first Thing I did was build the source code, this was notably more difficult on windows since it is not make to be run on Windows natively but with a some third party downloads, most importantly MSYS2, I was able to get it working. On the linux machine aarchie I had far fewer problems as the tools required for the build were already installed and ready to go. So I built the software on both X86_64 and aarch64 and tested them out.

In testing the first thing I did was run it with default configurations. After the build was completed I ran it using my test data, a download of a video from youtube which was just over an hour long which had already been converted to an mp3 of 83.3MB, which I was not converting to a ogg file. Here were the results,

X86_64 Ryan desktop benchmark
Test1:
real    0m14.516s
user    0m0.015s
sys     0m0.000s

Test2:
real    0m14.087s
user    0m0.000s
sys     0m0.015s


Test3:
real    0m14.235s
user    0m0.000s
sys     0m0.000s


aarch64 aarchie benchmark

Test1:
real    1m50.783s
user    1m48.931s
sys     0m1.415s

Test2:
real    1m50.571s
user    1m49.255s
sys     0m0.897s

Test3:
real    1m50.683s
user    1m49.034s
sys     0m1.236s





This is with minimal background tasks running on my home windows computer, and then on aarchie. As can be seen my computer is a a bit more powerful for this purpose but the results of the benchmark seem consistent.

Now After this was done I cleaned the make and rebuilt using -O3 to see if tweaking the compiler optimization would speed up the program. Here are those results.


X86_64 Ryan desktop O3
Test1:
real    0m14.047s
user    0m0.000s
sys     0m0.015s

Test2:
real    0m14.014s
user    0m0.015s
sys     0m0.000s

Test3:
real    0m14.044s
user    0m0.000s
sys     0m0.000s


aarch64 aarchie O3

Test1:
real    1m50.490s
user    1m48.994s
sys     0m1.086s

Test2:
real    1m50.401s
user    1m48.777s
sys     0m1.196s

Test3:
real    1m50.386s
user    1m48.742s
sys     0m1.236s

As can be seen the results were negligible, though I am unsure if this is due to an improper use of the optimization settings with the makefile or due to the makefile already optimizing the output. Either way if I am going to find a way to considerably speed up FFmpeg I am going to do more than a compiler optimization.

No comments:

Post a Comment