Program-level Adaptive Memory Management

Slides:



Advertisements
Similar presentations
Garbage collection David Walker CS 320. Where are we? Last time: A survey of common garbage collection techniques –Manual memory management –Reference.
Advertisements

U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Matthew Hertz, Yi Feng, & Emery Berger Department of Computer Science University.
Steve Blackburn Department of Computer Science Australian National University Perry Cheng TJ Watson Research Center IBM Research Kathryn McKinley Department.
1 Write Barrier Elision for Concurrent Garbage Collectors Martin T. Vechev Cambridge University David F. Bacon IBM T.J.Watson Research Center.
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.
An On-the-Fly Mark and Sweep Garbage Collector Based on Sliding Views Hezi Azatchi - IBM Yossi Levanoni - Microsoft Harel Paz – Technion Erez Petrank –
1 S. Tallam, R. Gupta, and X. Zhang PACT 2005 Extended Whole Program Paths Sriraman Tallam Rajiv Gupta Xiangyu Zhang University of Arizona.
By Jacob SeligmannSteffen Grarup Presented By Leon Gendler Incremental Mature Garbage Collection Using the Train Algorithm.
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.
Heap Shape Scalability Scalable Garbage Collection on Highly Parallel Platforms Kathy Barabash, Erez Petrank Computer Science Department Technion, Israel.
Increasing Memory Usage in Real-Time GC Tobias Ritzau and Peter Fritzson Department of Computer and Information Science Linköpings universitet
Free-Me: A Static Analysis for Individual Object Reclamation Samuel Z. Guyer Tufts University Kathryn S. McKinley University of Texas at Austin Daniel.
Online Performance Auditing Using Hot Optimizations Without Getting Burned Jeremy Lau (UCSD, IBM) Matthew Arnold (IBM) Michael Hind (IBM) Brad Calder (UCSD)
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 CRAMM: Virtual Memory Support for Garbage-Collected Applications Ting Yang, Emery.
Evan Korth New York University Computer Science I Classes and Objects Professor: Evan Korth New York University.
U NIVERSITY OF M ASSACHUSETTS Department of Computer Science Automatic Heap Sizing Ting Yang, Matthew Hertz Emery Berger, Eliot Moss University of Massachusetts.
An Adaptive, Region-based Allocator for Java Feng Qian & Laurie Hendren 2002.
Age-Oriented Concurrent Garbage Collection Harel Paz, Erez Petrank – Technion, Israel Steve Blackburn – ANU, Australia April 05 Compiler Construction Scotland.
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science Garbage Collection Without Paging Matthew Hertz, Yi Feng, Emery Berger University.
1 Utilizing Field Usage Patterns for Java Heap Space Optimization Z. Guo, N. Amaral, D. Szafron and Y. Wang Department of Computing Science University.
Comparison of JVM Phases on Data Cache Performance Shiwen Hu and Lizy K. John Laboratory for Computer Architecture The University of Texas at Austin.
Mark and Split Kostis Sagonas Uppsala Univ., Sweden NTUA, Greece Jesper Wilhelmsson Uppsala Univ., Sweden.
The College of William and Mary 1 Influence of Program Inputs on the Selection of Garbage Collectors Feng Mao, Eddy Zheng Zhang and Xipeng Shen.
Taking Off The Gloves With Reference Counting Immix
An Adaptive, Region-based Allocator for Java Feng Qian, Laurie Hendren {fqian, Sable Research Group School of Computer Science McGill.
Ulterior Reference Counting: Fast Garbage Collection without a Long Wait Author: Stephen M Blackburn Kathryn S McKinley Presenter: Jun Tao.
Stacks - 2 Nour El-Kadri ITI Implementing 2 stacks in one array and we don’t mean two stacks growing in the same direction: but two stacks growing.
P ath & E dge P rofiling Michael Bond, UT Austin Kathryn McKinley, UT Austin Continuous Presented by: Yingyi Bu.
1 Fast and Efficient Partial Code Reordering Xianglong Huang (UT Austin, Adverplex) Stephen M. Blackburn (Intel) David Grove (IBM) Kathryn McKinley (UT.
Dynamic Object Sampling for Pretenuring Maria Jump Department of Computer Sciences The University of Texas at Austin Stephen M. Blackburn.
1 Tuning Garbage Collection in an Embedded Java Environment G. Chen, R. Shetty, M. Kandemir, N. Vijaykrishnan, M. J. Irwin Microsystems Design Lab The.
Free-Me: A Static Analysis for Automatic Individual Object Reclamation Samuel Z. Guyer, Kathryn McKinley, Daniel Frampton Presented by: Dimitris Prountzos.
Control Theory for Adaptive Heap Resizing Jeremy Singer, David White, Jon Aitken, Richard Jones.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science 1 Automatic Heap Sizing: Taking Real Memory into Account Ting Yang, Emery Berger,
Finding Your Cronies: Static Analysis for Dynamic Object Colocation Samuel Z. Guyer Kathryn S. McKinley T H E U N I V E R S I T Y O F T E X A S A T A U.
Computer Science Department Daniel Frampton, David F. Bacon, Perry Cheng, and David Grove Australian National University Canberra ACT, Australia
Statistical Analysis of Inlining Heuristics in Jikes RVM Jing Yang Department of Computer Science, University of Virginia.
Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science.
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),
Department of Computer Sciences ISMM No Bit Left Behind: The Limits of Heap Data Compression Jennifer B. Sartor* Martin Hirzel †, Kathryn S. McKinley*
Dynamic Selection of Application-Specific Garbage Collectors Sunil V. Soman Chandra Krintz University of California, Santa Barbara David F. Bacon IBM T.J.
1 GC Advantage: Improving Program Locality Xianglong Huang, Zhenlin Wang, Stephen M Blackburn, Kathryn S McKinley, J Eliot B Moss, Perry Cheng.
CS 152: Programming Language Paradigms April 16 Class Meeting Department of Computer Science San Jose State University Spring 2014 Instructor: Ron Mak.
GC Assertions: Using the Garbage Collector To Check Heap Properties Samuel Z. Guyer Tufts University Edward Aftandilian Tufts University.
1 The Garbage Collection Advantage: Improving Program Locality Xianglong Huang (UT), Stephen M Blackburn (ANU), Kathryn S McKinley (UT) J Eliot B Moss.
Eliminating External Fragmentation in a Non-Moving Garbage Collector for Java Author: Fridtjof Siebert, CASES 2000 Michael Sallas Object-Oriented Languages.
MSP’05 1 Gated Memory Control for Memory Monitoring, Leak Detection and Garbage Collection Chen Ding, Chengliang Zhang Xipeng Shen, Mitsunori Ogihara University.
An Efficient Algorithm for Incremental Update of Concept space
Institute of Parallel and Distributed Systems (IPADS)
Topic: Java Garbage Collection
CSC 331 Object Oriented Programming Using Java
Cork: Dynamic Memory Leak Detection with Garbage Collection
No Bit Left Behind: The Limits of Heap Data Compression
CS 153: Concepts of Compiler Design November 28 Class Meeting
An Empirical Analysis of Java Performance Quality
David F. Bacon, Perry Cheng, and V.T. Rajan
Mark Claypool and Jonathan Tanner Computer Science Department
Strategies for automatic memory management
Adaptive Code Unloading for Resource-Constrained JVMs
Efficient Document Analytics on Compressed Data: Method, Challenges, Algorithms, Insights Feng Zhang †⋄, Jidong Zhai ⋄, Xipeng Shen #, Onur Mutlu ⋆, Wenguang.
Closure Representations in Higher-Order Programming Languages
Bin Ren, Gagan Agrawal, Brad Chamberlain, Steve Deitz
No Bit Left Behind: The Limits of Heap Data Compression
Garbage Collection Advantage: Improving Program Locality
CMPE 152: Compiler Design May 2 Class Meeting
Presentation transcript:

Program-level Adaptive Memory Management Chengliang Zhang, Kirk Kelsey, Xipeng Shen, Chen Ding, Matthew Hertz* and Mitsunori Ogihara Computer Science Department University of Rochester *Computer Science Department Canisius College 8/20/2019 ISMM'06

Performance vs. Heap Size Working set size > physical memory  paging With garbage collection Small heap  large GC cost physical memory Time Heap size 8/20/2019 ISMM'06

Performance vs. Heap Size (Cont.) pseudoJBB, 192MB PM, CopyMS, FastAdaptive 8/20/2019 ISMM'06

Specifying a Heap Size Manually specifying a heap size is not easy The actual memory usage depends on the GC scheme Semi-space uses twice memory as needed It is not easy to know the physical memory available for the program OS, JVM The available physical memory could change Other programs start and stop 8/20/2019 ISMM'06

Program-level Adaptive Memory Management Scheme Automatically picks the right heap size based on information from the JVM and the OS No need to change JVM Just use Runtime.totalMemory(), Runtime.freeMemory() and System.gc() No need to change the OS Get paging information from /proc 8/20/2019 ISMM'06

Outline Motivation Program level adaptive memory management scheme Experiment setup Results Conclusion and future work 8/20/2019 ISMM'06

Program-level Adaptive Memory Management Scheme Runtime.totalMemory Runtime.freeMemory Paging /proc program PAMM controller System.gc() 8/20/2019 ISMM'06

Program-level Adaptive Memory Management Scheme Runtime.totalMemory Runtime.freeMemory Paging /proc program PAMM controller Use Soot to add a hook at the phase boundaries System.gc() 8/20/2019 ISMM'06

Program-level Adaptive Memory Management Scheme Too frequent  too much overhead Too infrequent  unresponsive Runtime.totalMemory Runtime.freeMemory Paging /proc program PAMM controller System.gc() 8/20/2019 ISMM'06

Information Gathering Thresholds The amount of memory change between two checks is at most 1MB  sensitive enough Total overhead < 1%  low overhead 8/20/2019 ISMM'06

Program-level Adaptive Memory Management Scheme Control model Runtime.totalMemory Runtime.freeMemory Paging /proc program PAMM controller System.gc() 8/20/2019 ISMM'06

Control Model H: current used heap size S: controller maintained softbound H > S? mutator paging? T F GC GC Control Model GC paging? GC paging? T F T F S S S return to mutator 8/20/2019 ISMM'06

Maintaining the Softbound Goal: find and stabilize the softbound We use a left mark and a right mark to record the range of the softbound and do binary search between them The left mark: start heap size The right mark: infinite Softbound: 8M right of the left mark Left mark Softbound Right mark 8/20/2019 ISMM'06

Increasing the Softbound The left mark is set to be the current heap size If the right mark does not exist, then increase the softbound aggressively (by 8M) Otherwise, move softbound in the middle of the current heap size and the right bound If right bound is too small, move both the right bound and the softbound right (by 1M) 8/20/2019 ISMM'06

Decreasing the Softbound The right mark is set to be the current heap size Move the softbound in the middle of the left mark and the right mark If the left mark is too big, then move both the left mark and the softbound left by 1M 8/20/2019 ISMM'06

Outline Motivation Program level adaptive memory management scheme Experiment setup Results Conclusion and future work 8/20/2019 ISMM'06

Experiment Setup Jikes RVM Garbage collectors MarkSweep CopyMS GenCopy 8/20/2019 ISMM'06

Benchmarks pseudoJBB ipsixql 4 SPECjvm98 benchmarks 201_compress, 202_jess, 209_db and 227_mtrt Second run technique to exclude optimization time 8/20/2019 ISMM'06

pseudoJBB, 128MB PM, BaseBase 8/20/2019 ISMM'06

pseudoJBB, 128MB PM, FastAdaptive 8/20/2019 ISMM'06

pseudoJBB, 192MB PM, FastAdaptive 8/20/2019 ISMM'06

ipsixql, 128MB PM, FastAdaptive 8/20/2019 ISMM'06

pseudoJBB, 128MB PM, FastAdptive Stabilization pseudoJBB, 128MB PM, FastAdptive 8/20/2019 ISMM'06

PAMM vs. Best Fixed Heap Size Best: Best fixed heap size, differs based on programs, GC, and compiler opt 8/20/2019 ISMM'06

PAMM vs. Default Setting Default: from 50M to 100M 8/20/2019 ISMM'06

Comparison Scope Changes PAMM VM, OS, Program Program GC Hints [Buytaert+:HIPEAC05] Preventive GC [Ding+:MSP05] Automatic Heap Sizing [Yang+:ISMM04] VM/OS BC [Hertz+:PLDI05] 8/20/2019 ISMM'06

Conclusion Garbage collection complicates the the relationship between performance and memory We propose an adaptive memory management control scheme Hides the complexity Achieves close to best possible performance 8/20/2019 ISMM'06

Future Work PAMM is selfish since processes use only their own observation of states How to make multiple parallel processes cooperate? Share their observations and make global decisions 8/20/2019 ISMM'06

Thanks 8/20/2019 ISMM'06