
Energy Aware Lossless Data Compression by MASSACHUSMJS TTT OF TECHIVOLGrU1 Kenneth C. Barr H^IVTEOL GY B.S.E. Computer Engineering NE V 8 2002 University of Michigan, April 2000 LIBRARIES Submitted to the Department of Electrical Engineering and Computer Science BARKER in partial fulfillment of the requirements for the degree of Master of Science in Computer Science and Engineering at the MASSACHUSETTS INSTITUTE OF TECHNOLOGY September 2002 © Massachusetts Institute of Technology 2002. All rights reserved. Author ................... '........................... Department of Electrical Engineering and Computer Science August 16, 2002 Certified by ..... Krste Asanovid Assistant Professor Thesis Supervisor Accepted by...... .... Arthur C. Smith Chairman, Department Committee on Graduate Students Energy Aware Lossless Data Compression by Kenneth C. Barr Submitted to the Department of Electrical Engineering and Computer Science on August 16, 2002, in partial fulfillment of the requirements for the degree of Master of Science in Computer Science and Engineering Abstract Wireless transmission of a bit can require over 1000 times more energy than a single 32-bit computation. It may therefore be desirable to perform additional computation to reduce the number of bits transmitted. If the energy required to compress data is less than the energy required to send it, there is a net energy savings and consequently, a longer battery life for portable computers. This thesis is a study of the energy profiles of lossless data com- pression algorithms. Several distinct algorithms have been selected and are measured on a StrongARM SA-1 10 processor. This work demonstrates that with several typical compres- sion tools, there is a net energy increase when compression is applied before transmission. Reasons for this increase are explained and suggestions are made to avoid it. Compres- sion and decompression need not be performed by the same algorithm. By choosing the lowest-energy compressor and decompressor on the test platform, rather than using default levels of compression, overall energy to send data can be reduced 57%. Compared with a system using the same optimized application for both compression and decompression, the asymmetric scheme saves 11% of the total energy. Thesis Supervisor: Krste Asanovi6 Title: Assistant Professor 3 4 Acknowledgments This thesis would not have been possible without the help, generosity, and kindness of sev- eral people. My advisor, Krste Asanovi6, not only suggested the intriguing topic of this thesis, but unfailingly provided support, direction, and advice as I worked to complete it. He is an extremely responsible and accessible advisor, and I am thankful for the opportu- nity to work with him and the Assam group. Scott Ananian and Jamey Hicks came to the rescue with Skiff help early on, allowing me to have a stable platform on which to evaluate the energy of applications. David Wentzlaff, Nathan Shnidman, and John Ankcorn helped me build confidence and acquire equipment in the hardware lab. Ronny Krashinsky pa- tiently explained ways to look at energy and how to measure it. His work in compressing HTTP traffic was the jumping-off point for this thesis. Christopher Batten, my officemate, went above and beyond the call of duty. I appreciate his suggestions, curiosity, creativ- ity, idealism, and perspective. His help made a big difference in the quality of this thesis. Caroline and my family provided an equally important form of help through unflagging encouragement, motivation, and love. 5 6 Contents 1 Introduction 13 2 Related work 15 2.1 Energy measurement and estimation .......... ........... 15 2.2 Data compression for low-bandwidth devices .......... ...... 17 2.3 Optimizing algorithms for low energy .................... 19 3 Lossless data compression overview 21 3.1 Terminology ....................... ........... 21 3.2 C oding . ......................... ........... 22 3.2.1 Huffman coding ........................... 22 3.2.2 Arithmetic coding .......................... 23 3.2.3 Lempel-Ziv codes ................ .......... 24 3.3 Lossless compression algorithms ............ ........... 24 3.3.1 Sliding window - LZ77 ........ ............ .... 24 3.3.2 Dictionary - LZ78 .......... ............ .... 27 3.3.3 Prediction with Partial Match - PPM ... .............. 28 3.3.4 Burrows-Wheeler Transform - BWT ........... ...... 29 3.4 Performance and implementation concerns ......... ......... 30 4 Evaluation of compression applications 33 4.1 Benchmark selection ............................. 33 4.2 Methodology ................................. 38 7 4.2.1 Equipment .. .... ... .... .... 38 4.2.2 Energy calculations ... ... ... ... .. .. .. .. ... 3 9 4.2.3 Error analysis ... ... ... .... ... .. ... .. .. 4 0 4.2.4 Simulation . .... .... .... .... ... ... ... 4 2 4.3 Motivation and misconception ... ..... .... .... ... .. 4 4 4.3.1 High communication-to-computation ratio.... .. .. ... .. 4 5 4.3.2 ...is not exploited by popular compressors . .. ... .... 4 6 4.4 Energy analysis of popular compressors .... ... .. ... .... 4 9 4.4.1 Instruction count . ...... ..... ... .. ... .... 4 9 4.4.2 Memory hierarchy ...... ..... ... ....... ... 4 9 4.4.3 Minimizing memory access energy..... ...... .... 5 0 4.4.4 Instruction mix .... ........ .... .......... 5 6 4.5 Summary .. ......... ......... ... ......... 5 8 5 Reducing the energy of transmitting compressed data 65 5.1 Understanding cache behavior .... ........ 65 5.2 Exploiting the sleep mode ...... ........ 67 5.3 Reducing energy on the Skiff ............. 68 6 Conclusion and future work 73 8 List of Figures 3-1 Hash table implementation of LZ77 . .......... .......... 26 4-1 Application comparison by traditional metrics ..... ......... 35 4-2 Simplified Skiff power schematic ............ ... ... ... 39 4-3 Using a simulator to predict energy ......... .. ......... 44 4-4 Communication energy ............... .. ...... .. 46 4-5 Energy required to send compressible 1MB file .. .. ...... .. 48 4-6 Energy required to receive a compressible 1MB file .. ...... ... 48 4-7 Memory, time, and ratio. Memory footprint is indicated by area of circle; footprints shown range from 3KB - 8MB ........ .. ... .. 51 4-8 Energy required to send compressible 1MB file .. .. ....... 52 4-9 Energy required to receive a compressible 1MB file .. ....... 52 4-10 Cache performance: absolute counts .......... ... .... 55 4-11 Cache performance: data cache miss rate ........ .... .. ... 56 4-12 Instruction Mix. Number in parenthesis shows absolute number of instruc- tions (static) and billions of absolute instructions (dynamic) ....... 57 4-13 Branch behavior ......................... ....... 57 4-14 Average power of compression applications .......... ..... .. 59 4-15 Average power of decompression applications ......... ....... 59 4-16 Total energy as CPU energy decreases ............. ....... 62 4-17 Total energy as memory energy decreases ........... .... ... 62 4-18 Total energy as both CPU and memory energy decreases ... .. I.... .. 63 4-19 Total energy as network energy decreases ........... ... .... 63 9 5-1 Optimizing compress . .... ... .... .... ... .... ... ... 68 5-2 Compression + Send energy consumption with varying sleep power .. .. 69 5-3 Receive + Decompression energy consumption with varying sleep power 69 5-4 Receive + Decompression energy stays constant across zlib parameters . .. 70 5-5 Choosing an optimal compressor-decompressor pair ... ... ... ... 71 10 List of Tables 3.1 Hash table implementation of LZW ..................... 28 4.1 Compression applications and their algorithms ................ 34 4.2 Compression ratio .......... ..................... 36 4.3 Statically allocated memory (KB) . ..................... 36 4.4 Compression time ............................... 37 4.5 Decompression time ........ ..................... 37 4.6 Maximum measurement error: compression ................. 42 4.7 Maximum measurement error: decompression ................ 42 4.8 Total Energy of an ADD ........................... 47 4.9 Instructions per bit .............................. 49 4.10 Measured memory energy vs ADD energy ....... ........... 50 4.11 Ranking compression applications by four metrics .............. 58 4.12 Ranking energy of compression applications including network energy ... 58 11 12 Chapter 1 Introduction This thesis is motivated by previous work in energy-aware computing and the communica- tion - computation energy gap: wireless communication is an essential component of mo- bile computing, but the energy required for transmission of a single bit has been measured to be over 1000 times greater than a single 32-bit computation. Thus, if 1000 computation operations can compress data by even one bit, energy should be saved. Algorithms which once seemed too resource or time intensive might be valuable for saving energy. Imple- mentations which made compression concessions to gain performance might be modified to provide an overall energy savings. Ideally, the effort exerted to compress data should be variable so one may trade speed for energy. While some types of data (e.g., audio and video) may accept some degradation in quality, other data must be transmitted faithfully with no loss of information. Such data presents a unique challenge in that, unlike related work in lossy compression for reducing energy, one cannot sacrifice fidelity of the data to achieve energy goals. This work provides an in-depth examination of the energy requirements of several lossless data
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages77 Page
-
File Size-