Posts

Showing posts from April, 2020

Course Project stage 3 part 2: Last post

Image
Well, as the end of the course and semester approaches, so does my last blog for SPO600. Last post I dive into the method, "bt_find_func" and identified "cmp" that take most resources. "cmp w22, #0x0" is used to check for zero in register. I originally wanted to find a way to improve "cmp", dead end there. Then I change my approach and look into the line before "cmp" which is the "if" statement "(depth-- == 0 || delta >= cyclic_size)", also dead end there. At this point I know I lack the knowledge to successfully optimize "xz Utils", but I must continue research. (After 1 day...) I try to understand some of the professor's lectures about stage 3, also I read some of previous student's post in hoping those can help me understand but I am stuck........ Unfortunately, what I have so far is my limit. Maybe in the future I'll learn how to successfully optimize xz Utils, but for

Course Project stage 3: introduction

Image
Finally entering the last stage of course project. Previously in my last blog, I have collected profiling data from xz utils using gprof and perf in linux on both Aarchie and Xerxes. For this last stage I will be using the perf data, because perf comes with the function of annotating an identified function that uses the most resource. From my understanding, stage 3 requires to dive into resource heavy function/method, identify which line(s) take the most resource, and plan a way to optimize it. Using "perf" on xz Utils. From the results, "bt_find_func" seems to be the resource heavy method. Then as I dive deeper into the function. It seems the "cmp" line is the command that uses the most resource in the application. My goal is to find a way to improve the "cmp" in "bt_find_func" function, to achieve my goal of optimizing xz Utils.

Course Project Stage 2 part 3: Profiling

Image
Over the weekend, my professor manage to hit campus and manually fixed the class servers, thus I no longer need to continue debugging on my own computer for profiling. After a series of "gprof ./xz"s and "perf record ./xz"s, I was able to compile enough profiling data on both Aarchie(Aarch64) and Xerxes(x86_64) server for my chosen software xz-Utils. Stage 2 profiling I have save the data in both txt and png format for gprof on both compression and decompression for both smaller and bigger size mkv. As well as save the data in txt format for perf on both compression and decompression for both sizes files. Since putting them all on the blog would take more space than I wanted to, I am just going to insert the compression png in here.  Figure 1.0a: Aarchie 1.5Gb compression  Figure 2.0a: Aarchie 500Mb compression  Figure 1.0x: 1.5Gb compression  Figure 2.0x: 500Mb compression

Course Project Stage 2 part 2: Profiling

Image
After a series of installing different stuff under my own machine, i was finally able to rebuild stage 1 under my laptop. Stage 1 Rebuild Since I am continuing under a different machine, I rebuild stage 1. Home laptop Aarch64 483,546 kb mkv file compress 1st test 2nd test real 8m13.718s 8m13.024s user 8m11.359s 8m10.813s sys 0m2.344s 0m2.141s decompress real 0m31.880s 0m31.827s user 0m30.813s 0m30.906s sys 0m1.031s 0m0.955s 1,412,966 kb mkv file compress 1st test 2nd test real 23m54.487s 23m47.785s user 23m48.141s 23m41.016s sys 0m5.984s 0m6.609s decompress real 0m24.068s 0m24.030s user 0m21.188s 0m20.828s sys 0m2.859s 0m3.172s And from here, begins the profiling Stage 2 profiling Gprof After having to install many many MANY

Course Project Stage 2 Introduction

Issue has arrived!! Since I pushed my work for SPO600 till today because of my other focuses in other school works (my own fault), an issue has arrived. Today unexpectedly all the school remote machine rejected all my attempt for connection. A few days ago, there was an email send from the professor talking about all the machines are going through mass restarts on Friday. We were told to expect Aarchie and Israel might continue to be unavailable even after restart because the restart is done remotely. But today I wasn't able to connection to Bbetty and Xerxes as well which are the only other machines I have access to. Now, I have no choice but resort to one of my last resorts. I'll have to enable the windows subsystem for Linux on my laptop and work from there. Since I don't use my laptop for anything other than school work, this will keep my bench marking and profiling errors to minimum. My laptop system type is 64-bit OS, this would cover at least the Aarch64 part of