top of page

SPO600 Project - Stage 2: Profiling

For stage 2 we will be covering the profiling part, I already did some profiling on my stage 1 using the gprof command. But, we still not done we can still use the perf command to keep profiling. As suggested by our instructor we should use gprof or perf or combination of both to do the profiling part of our project.


To refresh I am working with an open-source found in Google call zopfli. To understand what I am doing here, I suggest going to my other post where I did benchmark, you can find it here.


Since I already advance a little bit with my profiling using gprof which can be found in my other post. In this post, I will be focusing on the usage of perf. To understand a little bit more about this command I check out our online lecture and did some google and found this interesting website that shows you how to usage and some examples


I will be doing the testing of the profiling on both architectures Aarch64 Israel server and x86_64 xerxes server. These are the results that I got using the perf command:


Aarch64 Israel


Before I start using the command I am going to remove the -pg option added into our Makefile. Then proceed to make clean and then make all.



After trying several times to get the perf command work on the Israel server, I decided to send an email to my instructor and ask for help then he told me this server have a weird kernel. I decided to perform the test on another server. I decided to choose the Bbetty server.


But, here are some of the errors I encounter trying to run the perf command on the Israel server:


Then I try to install the missing packages but still didn't work.


In the end, I decided to move my progress to the Bbetty server. I proceed to do the same steps that I perform during stage one but omitting the gprof part. These are the results that I gather using perf command:


These are the results using the 1mb image:

To get a detailed result of this I ran perf report


5mb image


Using perf report to get a detail view

x86_64 Xerxes server

I proceed to do the same steps on the xerxes server to check if the results will be the same.

1mb image


Using perf report to get a detail view



5mb image


Using perf report to get a detail view


As we can see in both architectures ZopfliUpdateHash, encodeLZ77, ZopfliFindLongestMatch, BoundaryPM and writeLZ77data are the ones that take the most percentages. I did mention on my stage 1 that I will be focusing on ZopfliFindLongestMatch to improve the performance and try to optimize the software. Which the results of this optimization will be part of my Stage 3.


Note:

Since I already did some of Stage 2 on my Stage 1 part. I found this part, not that complicated and relatively interesting to complete. I will say that looking at the different code's part of this software is really fun and trying to understand how everything works will take me some time. But once I start working on it, I will be posting the results which are part of my Stage 3.


I will be making another blog post summarizing my Stage 2. To see my gprof command part you can head over into my Stage 1 blogpost.

Recent Posts

See All

SPO600 Project - Stage 3: Optimization

For stage 3 we will be covering optimization, I am going to identify optimization opportunities in this software. To understand what I am doing here, I recommend reading my stage 1 and stage 2 before

Summary - Project Stage 2

Stage 2 was all about profiling our project and get an idea of the usage that it is taking the software. To refresh I am working with zopfli which is an open-source from Google. As I already mentioned

Summary - Project Stage 1

How I found this project? I was looking through the participant and project table when I saw one of my classmate's chosen project, I decided to take a look into that Google open-source website and saw

bottom of page