Saturday, November 27, 2010

SBR600: To Thumb? or Not to Thumb? (v0.2)

Hi all, this is  version 0.2 of my project, To Thumb? or Not to Thumb?
I'm going to start off with some additional benchmark results.

abiword-2.8.1
Produced RPM: libabiword-2.8.1-1.fc12.armv5tel.rpm
Directories and files: 39 directories, 617 files
Binary File: usr/lib/libabiword-2.8

w/o Thumb THUMB THUMB2 THUMB / NON-THUMB THUMB / THUMB2
RPM 5561088 4779800 4742828 0.8595 1.0078
Directory 21295155 17055836 16987340 0.8009 1.0040
Binary 5806908 3450936 3371440 0.5943 1.0236


tar-1.22
Produced RPM: tar-1.22-8.fc12.armv5tel.rpm
Directories and files: 79 directories, 49 files
Binary File: bin/tar

w/o Thumb THUMB THUMB2 THUMB / NON-THUMB THUMB / THUMB2
RPM 744340 742784 742180 0.9979 1.0008
Directory 2737195 2681159 2675975 0.9795 1.0019
Binary 251844 195808 190624 0.7775 1.0272



So based on my benchmarks so far, THUMB reduced the sizes about
3% for *.rpm files,
9% for extracted directories, and
24% for executables, in average.
While it might save some disk space for executable files, it doesn't make a big different for rpm packages since rpm has it's own compressing mechanism.



In terms of performance of binaries that are built with THUMB and non-THUMB, there weren't too many programs that I could efficiently test in the command line interface. For now, I've ran some tests with tar binaries that I compiled.

I've downloaded source code for openoffice (openoffice.org-3.1.1-19.34.fc12.src.rpm), extracted twice to two separate directories, and compiled each one of them with tar binary that was compiled with THUMB, and without THUMB. I've done every test 4 times for better accuracy.

System: cdot-guru-4-1
File: Extracted openoffice.org-3.1.1-19.34.fc12.src.rpm
Command Used: time ./tar -cvf nothumb.tar ~/temp

w/o Thumb THUMB
1st Attempt real 0m33.013s
user 0m0.090s
sys 0m3.800s
real 0m45.746s
user 0m0.170s
sys 0m3.710s
2nd Attempt real 0m38.410s
user 0m0.150s
sys 0m3.860s
real 0m40.039s
user 0m0.130s
sys 0m3.760s
3rd Attempt real 0m37.572s
user 0m0.110s
sys 0m3.820s
real 0m42.034s
user 0m0.140s
sys 0m3.820s
4th Attempt real 0m36.934s
user 0m0.150s
sys 0m3.670s
real 0m43.051s
user 0m0.100s
sys 0m3.830s

The tar that was compiled with THUMB was compressing little bit slower in every attempts. Just to confirm that both tars compressed correctly, I've checked sizes of tarballs.

-rw-rw-r-- 1 thlee3 thlee3 218183680 2010-11-26 10:43 nothumb.tar
-rw-rw-r-- 1 thlee3 thlee3 218183680 2010-11-26 10:41 thumb.tar
And they seemed ok.


As a second test, I've tried decompressing one of the tarballs I created in the first test, using both tars.

System: cdot-guru-4-1
File: nothumb.tar
Command Used: time ~/tar.mthumb-interwork/bin/tar -xvf nothumb.tar

w/o Thumb THUMB
1st Attempt real 0m48.399s
user 0m0.170s
sys 0m3.560s
real 0m54.197s
user 0m0.160s
sys 0m3.480s
2nd Attempt real 0m46.306s
user 0m0.170s
sys 0m3.280s
real 0m48.234s
user 0m0.160s
sys 0m3.680s
3rd Attempt real 0m45.602s
user 0m0.130s
sys 0m3.800s
real 0m49.501s
user 0m0.150s
sys 0m3.490s
4th Attempt real 0m46.546s
user 0m0.110s
sys 0m3.420s
real 0m52.897s
user 0m0.120s
sys 0m3.460s

Again, the tar that was built with THUMB decompressed the tarball little bit slower. I should focus more into performance difference between binaries that are built with THUMB and non-THUMB in this project.



I've also made records of the duration rpmbuild took for compiling. I'd like to say that I did not notice any major difference in compiling times, although it'd be hard measure this accurately because compiling durations fluctuated in every attempts I made.

w/o Thumb THUMB
nled real 0m13.701s
user 0m12.190s
sys 0m1.020s
real 0m14.821s
user 0m11.830s
sys 0m1.060s
wget real 3m57.207s
user 3m1.920s
sys 0m40.610s
real 3m59.251s
user 3m0.750s
sys 0m39.810s
gimp real 112m40.989s
user 92m48.050s
sys 10m34.130s
real 110m46.166s
user 90m13.740s
sys 10m32.150s
abiword real 148m58.630s
user 130m32.050s
sys 8m51.320s
real 140m30.739s
user 123m38.600s
sys 8m46.910s



Some of the difficulties I had while I was working this project are one or more dependencies required for compiling are not available for armv5tel architecture. For example, I was not able to compile openoffice.org because lucene was needed but not yet available. Another challenge was my lack of knowledge in c language and gcc. Once rpmbuild encounters an error in the middle of compiling, it would stop and I wasn't able to make correction in the spec file. I'd like to try compiling mysql and postgresql once I figure this out.


So this concludes my version 0.2. Thank you very much and please stay tuned for version 0.3.

No comments:

Post a Comment