U NIVERSITY OF M ASSACHUSETTS Department of Computer Science Automatic Heap Sizing Ting Yang, Matthew Hertz Emery Berger, Eliot Moss University of Massachusetts.

Slides:



Advertisements
Similar presentations
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science 1 Three Challenges for Transactional Computing J. Eliot B. Moss Associate Professor,
Advertisements

Virtual Memory 3 Fred Kuhns
Paging: Design Issues. Readings r Silbershatz et al: ,
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Matthew Hertz, Yi Feng, & Emery Berger Department of Computer Science University.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science 1 MC 2 –Copying GC for Memory Constrained Environments Narendran Sachindran J. Eliot.
Steve Blackburn Department of Computer Science Australian National University Perry Cheng TJ Watson Research Center IBM Research Kathryn McKinley Department.
1 CMSC421: Principles of Operating Systems Nilanjan Banerjee Principles of Operating Systems Acknowledgments: Some of the slides are adapted from Prof.
Canisius College Department of Computer Science Canisius College University of Rochester Poor Richard's Memory Manager Tongxin Bai, Jonathan Bard, Stephen.
MC 2 : High Performance GC for Memory-Constrained Environments - Narendran Sachindran, J. Eliot B. Moss, Emery D. Berger Sowmiya Chocka Narayanan.
MC 2 : High Performance GC for Memory-Constrained Environments N. Sachindran, E. Moss, E. Berger Ivan JibajaCS 395T *Some of the graphs are from presentation.
1 The Compressor: Concurrent, Incremental and Parallel Compaction. Haim Kermany and Erez Petrank Technion – Israel Institute of Technology.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts Amherst Operating Systems CMPSCI 377 Lecture.
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science CRAMM: Virtual Memory Support for Garbage-Collected Applications Ting Yang, Emery.
Operating Systems CMPSCI 377 Lecture 11: Memory Management
21 September 2005Rotor Capstone Workshop Parallel, Real-Time Garbage Collection Daniel Spoonhower Guy Blelloch, Robert Harper, David Swasey Carnegie Mellon.
Improving Proxy Cache Performance: Analysis of Three Replacement Policies Dilley, J.; Arlitt, M. A journal paper of IEEE Internet Computing, Volume: 3.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Advanced Compilers CMPSCI 710.
An Adaptive, Region-based Allocator for Java Feng Qian & Laurie Hendren 2002.
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science Garbage Collection Without Paging Matthew Hertz, Yi Feng, Emery Berger University.
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science Quantifying the Performance of Garbage Collection vs. Explicit Memory Management.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
1 Reducing Generational Copy Reserve Overhead with Fallback Compaction Phil McGachey and Antony L. Hosking June 2006.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
Operating Systems ECE344 Ding Yuan Page Replacement Lecture 9: Page Replacement.
CSS430 Virtual Memory Textbook Ch9
Tutorial 6 Memory Management
Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D.
Simulation of Memory Management Using Paging Mechanism in Operating Systems Tarek M. Sobh and Yanchun Liu Presented by: Bei Wang University of Bridgeport.
Tutorial 7 Memory Management presented by: Antonio Maiorano Paul Di Marco.
An Adaptive, Region-based Allocator for Java Feng Qian, Laurie Hendren {fqian, Sable Research Group School of Computer Science McGill.
Budget-based Control for Interactive Services with Partial Execution 1 Yuxiong He, Zihao Ye, Qiang Fu, Sameh Elnikety Microsoft Research.
Dynamic Object Sampling for Pretenuring Maria Jump Department of Computer Sciences The University of Texas at Austin Stephen M. Blackburn.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Advanced Compilers CMPSCI 710 Spring 2004 Lecture 1 Emery Berger University of Massachusetts,
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science 1 Automatic Heap Sizing: Taking Real Memory into Account Ting Yang, Emery Berger,
U NIVERSITY OF M ASSACHUSETTS, A MHERST – Department of Computer Science Performance of Work Stealing in Multiprogrammed Environments Matthew Hertz Department.
September 11, 2003 Beltway: Getting Around GC Gridlock Steve Blackburn, Kathryn McKinley Richard Jones, Eliot Moss Modified by: Weiming Zhao Oct
Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science.
1 Virtual Machine Memory Access Tracing With Hypervisor Exclusive Cache USENIX ‘07 Pin Lu & Kai Shen Department of Computer Science University of Rochester.
1 CMSC421: Principles of Operating Systems Nilanjan Banerjee Principles of Operating Systems Acknowledgments: Some of the slides are adapted from Prof.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Yi Feng & Emery Berger University of Massachusetts Amherst A Locality-Improving.
380C lecture 19 Where are we & where we are going –Managed languages Dynamic compilation Inlining Garbage collection –Opportunity to improve data locality.
1 Garbage Collection Advantage: Improving Program Locality Xianglong Huang (UT) Stephen M Blackburn (ANU), Kathryn S McKinley (UT) J Eliot B Moss (UMass),
Lecture Topics: 11/24 Sharing Pages Demand Paging (and alternative) Page Replacement –optimal algorithm –implementable algorithms.
David F. Bacon Perry Cheng V.T. Rajan IBM T.J. Watson Research Center ControllingFragmentation and Space Consumption in the Metronome.
Project Presentation By: Dean Morrison 12/6/2006 Dynamically Adaptive Prepaging for Effective Virtual Memory Management.
Memory Management & Virtual Memory © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada.
ExLRU : A Unified Write Buffer Cache Management for Flash Memory EMSOFT '11 Liang Shi 1,2, Jianhua Li 1,2, Chun Jason Xue 1, Chengmo Yang 3 and Xuehai.
1 GC Advantage: Improving Program Locality Xianglong Huang, Zhenlin Wang, Stephen M Blackburn, Kathryn S McKinley, J Eliot B Moss, Perry Cheng.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science John Cavazos J Eliot B Moss Architecture and Language Implementation Lab University.
1 Page Replacement Algorithms. 2 Virtual Memory Management Fundamental issues : A Recap Key concept: Demand paging  Load pages into memory only when.
Operating Systems ECE344 Ding Yuan Page Replacement Lecture 9: Page Replacement.
Page Replacement FIFO, LIFO, LRU, NUR, Second chance
1 The Garbage Collection Advantage: Improving Program Locality Xianglong Huang (UT), Stephen M Blackburn (ANU), Kathryn S McKinley (UT) J Eliot B Moss.
Jonathan Walpole Computer Science Portland State University
Department of Computer Science University of California, Santa Barbara
David F. Bacon, Perry Cheng, and V.T. Rajan
Memory Management & Virtual Memory
Transparent Contribution of Memory
Page Replacement FIFO, LIFO, LRU, NUR, Second chance
Virtual Memory: Working Sets
Department of Computer Science University of California, Santa Barbara
Garbage Collection Advantage: Improving Program Locality
COMP755 Advanced Operating Systems
Chapter 9: Virtual Memory CSS503 Systems Programming
Program-level Adaptive Memory Management
Transparent Contribution of Memory
Presentation transcript:

U NIVERSITY OF M ASSACHUSETTS Department of Computer Science Automatic Heap Sizing Ting Yang, Matthew Hertz Emery Berger, Eliot Moss University of Massachusetts Scott Kaplan Amherst College

U NIVERSITY OF M ASSACHUSETTS Department of Computer Science Problem & Motivation  Important to select right heap size Too small: frequent GCs, less progress Too large: excessive paging overhead  Previous work Pick “optimal size”, given static real memory  BUT multiprogramming = dynamic real RAM Cannot select heap size a priori Must adjust during execution

U NIVERSITY OF M ASSACHUSETTS Department of Computer Science Cooperation with VMM  GC needs support from virtual memory mgr: VMM determines footprint ― Memory needed to avoid % of misses that fault GC can then adjust heap  Need to add info & communication: GC requests footprint and real memory VMM collects needed information ― Informs GC on demand

U NIVERSITY OF M ASSACHUSETTS Department of Computer Science Tracking Footprint  Maintain (decayed) histogram per page position Provides value to application of n pages, for any n unprotected protected hits LRU stack position (pages) “hot”“cold” (dynamic)

U NIVERSITY OF M ASSACHUSETTS Department of Computer Science GC Paging Behavior  Need to understand relationship: Heap size, footprint, GC algorithm  Analysis methodology: Obtain reference trace Simulate Jikes RVM under DSS Process LRU stack  # faults at all memory sizes  Experiments: GC: Mark-Sweep, Semi-Space, and Appel Benchmarks: SPECjvm98, ipsixql, and pseudojbb

U NIVERSITY OF M ASSACHUSETTS Department of Computer Science Paging Behavior  Three regions Extreme paging: ― larger heaps better Substantial paging: ― “plateau” ― GC “looping” behavior Drop in paging: ― heap fits in RAM

U NIVERSITY OF M ASSACHUSETTS Department of Computer Science

Paging Model  Propose linear heap footprint model, relating: Footprint Heap size GC algorithm  Model: Footprint = a*HeapSize + b a = intuitively, how much of heap we loop over ― depends on GC algorithm ― For SS and Appel: ½ (fill half then collect) ― For MS: 1 b depends on Jikes RVM and application live data

U NIVERSITY OF M ASSACHUSETTS Department of Computer Science Validating Paging Model  Different thresholds t of paging overhead  Good linear fit

U NIVERSITY OF M ASSACHUSETTS Department of Computer Science Modeling Cooperative GC  Extended DSS to: Simulate OS VMM Add footprint calculation Add communication to GC (system calls)  Extended SS and Appel GCs to: Request footprint, real memory allocation Use them to adjust heap size ― Careful about growing heap ― Careful in using info from nursery GCs (Appel)

U NIVERSITY OF M ASSACHUSETTS Department of Computer Science Experimental Results  Adjusting to fixed memory size: Increases heap size to reduce # of GCs Decreases heap size to reduce paging Heap size about right: close to static GC

U NIVERSITY OF M ASSACHUSETTS Department of Computer Science

Experimental Results  Adjusting to changing memory size: Increases heap when memory increases Decreases heap when memory decreases  Dominates static GC’s performance Note: adjustable memory = higher throughput

U NIVERSITY OF M ASSACHUSETTS Department of Computer Science

Conclusion  Automatic heap size adjustment Maximizes memory utilization Avoids paging Adapts quickly to steady and changing real memory allocations  Currently implementing VMM in Linux Useful for “scheduler-aware” virtual memory, and others