Download presentation
Presentation is loading. Please wait.
Published byKenneth Morton Modified over 8 years ago
1
Department of Computer Sciences Z-Rays: Divide Arrays and Conquer Speed and Flexibility Jennifer B. Sartor jbsartor@cs.utexas.edu Stephen M. Blackburn, Daniel Frampton, Martin Hirzel, Kathryn S. McKinley
2
Department of Computer Sciences Arrays [Zuse 46] June 2010 2 >50% Time/space tradeoff IBM WebSphere, AICAS Jamaica VM, Fiji VM
3
Department of Computer Sciences Why Discontiguous? Real-time June 2010 3 Problem: large arrays Collection: space & time unbounded for scan/copy Fragmentation [Siebert 00, Bacon et al. 03/05, Chen et al. 03] Sacrifice throughput for predictability
4
Department of Computer Sciences Z-Rays Flexible, memory and time efficient Spine of indirection pointers to arraylets Space optimizations Lazy allocation Zero compression Novel arraylet copy-on-write Time optimizations Inline first-N bytes into spine Fast array copy June 2010 4 *Most effective 12.7% Prior work optimizations: 27-32%
5
Department of Computer Sciences Naïve Discontiguous Arrays June 2010 5 Arraylet HeaderArraylet Pointers Remaining Elements Uniform access Array Remove expensive indirection?
6
Department of Computer Sciences Access Statistics June 2010 6 >85% accesses to first 4KB mean
7
Department of Computer Sciences Optimized Discontiguous Arrays June 2010 7 HeaderInline d FirstN Arraylet Pointer s Remainin g Elements Array Spine Arraylet Space Arraylet...Arraylet *Fast Slow access
8
Department of Computer Sciences Flexible Arraylets Memory management Spine in generational spaces Spine defines array “age” for timely reclamation [Hosking et al. 92] Arraylets non-moving Space optimizations [inspired by Chen et al. 03] Lazy allocation Zero compression Array copy optimizations Time: fast array copy Space: arraylet sharing with copy-on-write June 2010 8
9
Department of Computer Sciences Lazy Allocation & Zero Compression June 2010 9 HeaderInline d FirstN Arraylet Pointer s Remainin g Elements Array Spine Arraylet Space Arraylet...Arraylet Zero Arraylet Lazy allocate Zero compress
10
Department of Computer Sciences Copy & Share Arraylets June 2010 10 Hdr1st N PtrsRemai n Src Arraylet Space Arraylet...Arraylet Hdr1st N PtrsRemai n Dest arraylet write Fast array copy Arraylet copy-on-write
11
Department of Computer Sciences Methodology Jikes Research Virtual Machine 3.0.1 Results are % overhead above contiguous Adaptive compilation: 10 th iteration, 20 JVM invocations GenMarkSweep, 2x min heap 19 benchmarks: DaCapo, pseudojbb2005, SPECjvm98 Core 2 Duo with 2 processors June 2010 11
12
Department of Computer Sciences Overall Result June 2010 12.7 14.5 27.5 27.4 Configuration Parameter/ Optimization Naïve NaïveA (Chen) NaïveB (Bacon) Z-ray Perf Z-ray Arraylet Bytes2 10 2 11 2 10 First-N2 12 Lazy Alloc ✔✔✔ Zero Compress ✔✔ Array Copy ✔✔ Copy-on-write ✔ 31.9 % Time Overhead 12
13
Department of Computer Sciences Time Optimizations Benchmark accesses, firstN=2 12 bytes Fast firstN 91% of array accesses are to fast path Removing first-N from Z-ray adds 10% No fast array copy adds 2.8% June 2010 13 Fast Write% Slow Write% Fast Read% Slow Read% min0.70.125.30.1 max28.622.598.139.3 mean6.42.684.66.4
14
Department of Computer Sciences Space Optimizations Lazy allocation most effective Xalan saves 56% of collection time, 5.5% total time All: lazy allocation, zero compression, copy-on-write Best: xalan 25%, compress 49% of heap Average: save 6% of heap June 2010 14
15
Department of Computer Sciences Z-Ray Takeaways Flexible, time and space efficient discontiguous arrays Tunable optimization options Reduce previous overhead by 2- 3x Save 6% of heap space More efficient for real-time Feasible for future chip multiprocessors June 2010 15
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.