Download presentation
Presentation is loading. Please wait.
Published byWesley Ball Modified over 9 years ago
1
Department of Computer Sciences ISMM 20081 No Bit Left Behind: The Limits of Heap Data Compression Jennifer B. Sartor* Martin Hirzel †, Kathryn S. McKinley* *U Texas at Austin, † IBM Watson
2
Department of Computer Sciences ISMM 2008 2 Current State Managed languages ubiquitous Embedded devices Multicore Need memory efficiency! CPUL1 L2 CPU L1 L2
3
Department of Computer Sciences ISMM 2008 3 Memory Efficiency of Managed Languages X COST X 8-94% information content in heap in 37 benchmarks. [Mitchell & Sevitsky, OOPSLA 07] X Boxed objects X Trailing zeros in arrays X Redundant objects X Extra bit-width X Data structure back-bones bzip2 86% OPPORTUNITY Memory layout abstraction (Location + size) != identity
4
Department of Computer Sciences ISMM 2008 4 Related Work Ananian & Rinard. LCTES 03Dom value field hash Appel & Goncalves. Tech Report 93Eql obj sharing, Const field elide, Bit-width reduction Chen, Kandemir & Irwin. VEE 05Dom value field elide Chen, et al. OOPSLA 03Zero compr, Trail zero trim Cooprider & Regehr. PLDI 07Value set indirection Marinov & O’Callahan. OOPSLA 03Eql obj sharing Stephenson, Babb & Amarasinghe. PLDI 00 Const field elide, Bit-width reduction Titzer, et al. PLDI 07Value set indirection Zilles. ISMM 07Bit-width reduction
5
Department of Computer Sciences ISMM 2008 5 Limit Study Quantitatively compare heap data compression Surveyed literature Savings equations Methodology for evaluation Apples-to-apples comparison Future work: implementation Hybrid techniques Findings: array & hybrid compression 58%
6
Department of Computer Sciences ISMM 2008 6 Hybrid Array Compression x0001 x005 8 x000 1 x000 4 x000 1 x000 0 x000 1 Redundancy Equal array sharing x0001 x005 8 x000 1 x000 4 x000 1 x000 0 x000 1
7
Department of Computer Sciences ISMM 2008 7 Equal Object Sharing Marinov & O’Callahan. OOPSLA 03; Appel & Goncalves. Tech Report 93 Two objects are equal if both Same class & all fields have same value Strictly-equal: pointer fields identical Deep: objects pointer targets are equal JVM store only 1 copy in hashtable 14% Class C, N objects, D distinct; save:
8
Department of Computer Sciences ISMM 2008 8 Hybrid Array Compression x0001 x005 8 x000 1 x000 4 x000 1 x000 0 x000 1 Redundancy Equal array sharing Value set indirection x0001 x005 8 x000 1 x000 4 x000 1 x000 0 x000 1 Dictionary: x0001x005 8 x000 4 x000 0 00102030
9
Department of Computer Sciences ISMM 2008 9 Value Set Indirection & Caching Cooprider & Regehr/ Titzer, et al. PLDI 07 For object field or array elements with large range of values Dictionary (or cache) of 256 most frequent values, instance stores small 1 byte indices 14% If > 256 values, 255 in dictionary, 256th says to store rest (M) in hashtable w/ objectID
10
Department of Computer Sciences ISMM 2008 10 Hybrid Array Compression 2 x00A 0 x007 3 x000 2 x000 1 x010 1 x000 0 Remove zeros Trim trailing zeros Bit width reduce Zero compress x00A 0 x007 3 x000 2 x000 1 x010 1 85 x0A 0 x07 3 x00 2 x00 1 x10 1 85 x0 A x7 3 x2x00 1 x10 1 851010111185xAF
11
Department of Computer Sciences ISMM 2008 11 Zero-based Object Compression Chen, et al. OOPSLA 03 Remove bytes that are entirely zero Per object bit-map: 1 bit per byte Store only non-zero bytes 45% Savings:
12
Department of Computer Sciences ISMM 2008 12 Hybrid Array Compression 2 x00A 0 x007 3 x000 2 x000 1 x010 1 x000 0 Remove zeros Trim trailing zeros Bit width reduce Zero compress x00A 0 x007 3 x000 2 x000 1 x010 1 85 x0A 0 x07 3 x00 2 x00 1 x10 1 85 x0 A x7 3 x2x00 1 x10 1 85xAF
13
Department of Computer Sciences ISMM 2008 13 Methodology Program run Heap dump series Analysis representation t Model 1 – Model n … s Limit savings Garbage Collection snapshot
14
Department of Computer Sciences ISMM 2008 14 Experimental Details Jikes Research Virtual Machine Java-in-Java DaCapo benchmarks + pseudojbb 20-25 heap snapshots per benchmark MarkSweep with 2x min heap Analysis Per class Objects and arrays separated JVM+app vs application (separated in paper) Per heap snapshot, and over all snapshots
15
Department of Computer Sciences ISMM 2008 15 TechniqueClassArrayGC/Ru n Lempel-Ziv compression XGC Strictly-equal object sharing ObjTypeGC Deep-equal object sharing ObjTypeGC Zero-based object compression ObjInstGC Trailing zero array trimming InstGC Bit-width reduction FldInstGC/Run Dominant-value field hashing FldGC Lazy invariant computation FldGC Value set indirection FldTypeGC Value set caching FldTypeGC Constant field elision FldRun Dominant-value field elision FldRun
16
Department of Computer Sciences ISMM 2008 16 Value Indirection & Cache Deep Equal Sharing Zero Compression Hybrid Compression
17
Department of Computer Sciences ISMM 2008 17 Stability of Savings fop: snapshots over time
18
Department of Computer Sciences ISMM 2008 18 Conclusions Limit study compare apples-to-apples heap data compression techniques Potential to reduce memory inefficiencies in managed languages Arrays Hybrids Future: save space Challenge: efficient detection & recovery Thank you!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.