NG2C: Pretenuring Garbage Collection with Dynamic Generations for HotSpot Big Data Applications

Similar documents
JVM Memory Model and GC

Fundamentals of GC Tuning. Charlie Hunt JVM & Performance Junkie

Exploiting the Behavior of Generational Garbage Collector

Garbage Collection. Hwansoo Han

Optimising Multicore JVMs. Khaled Alnowaiser

The Garbage-First Garbage Collector

Concurrent Garbage Collection

The G1 GC in JDK 9. Erik Duveblad Senior Member of Technical Staf Oracle JVM GC Team October, 2017

Towards High Performance Processing in Modern Java-based Control Systems. Marek Misiowiec Wojciech Buczak, Mark Buttner CERN ICalepcs 2011

2011 Oracle Corporation and Affiliates. Do not re-distribute!

Java & Coherence Simon Cook - Sales Consultant, FMW for Financial Services

Java Performance Tuning From A Garbage Collection Perspective. Nagendra Nagarajayya MDE

G1 Garbage Collector Details and Tuning. Simone Bordet

Java Performance Tuning

Running class Timing on Java HotSpot VM, 1

Shenandoah An ultra-low pause time Garbage Collector for OpenJDK. Christine H. Flood Roman Kennke

Thread-Aware Garbage Collection for Server Applications

10/26/2017 Universal Java GC analysis tool - Java Garbage collection log analysis made easy

Garbage-First Garbage Collection by David Detlefs, Christine Flood, Steve Heller & Tony Printezis. Presented by Edward Raff

The Fundamentals of JVM Tuning

Managed runtimes & garbage collection. CSE 6341 Some slides by Kathryn McKinley

Compiler construction 2009

Managed runtimes & garbage collection

JVM Troubleshooting MOOC: Troubleshooting Memory Issues in Java Applications

Low latency & Mechanical Sympathy: Issues and solutions

Configuring the Heap and Garbage Collector for Real- Time Programming.

HBase Practice At Xiaomi.

Typical Issues with Middleware

THE TROUBLE WITH MEMORY

WHO AM I.

JDK 9/10/11 and Garbage Collection

NUMA in High-Level Languages. Patrick Siegler Non-Uniform Memory Architectures Hasso-Plattner-Institut

Java Application Performance Tuning for AMD EPYC Processors

Debugging Your Production JVM TM Machine

Attila Szegedi, Software

CA341 - Comparative Programming Languages

Pause-Less GC for Improving Java Responsiveness. Charlie Gracie IBM Senior Software charliegracie

Yak: A High-Performance Big-Data-Friendly Garbage Collector. Khanh Nguyen, Lu Fang, Guoqing Xu, Brian Demsky, Sanazsadat Alamian Shan Lu

Kodewerk. Java Performance Services. The War on Latency. Reducing Dead Time Kirk Pepperdine Principle Kodewerk Ltd.

Name, Scope, and Binding. Outline [1]

Algorithms for Dynamic Memory Management (236780) Lecture 4. Lecturer: Erez Petrank

Contents. Created by: Raúl Castillo

A Side-channel Attack on HotSpot Heap Management. Xiaofeng Wu, Kun Suo, Yong Zhao, Jia Rao The University of Texas at Arlington

The C4 Collector. Or: the Application memory wall will remain until compaction is solved. Gil Tene Balaji Iyengar Michael Wolf

High Performance Managed Languages. Martin Thompson

Present but unreachable

Dynamic Vertical Memory Scalability for OpenJDK Cloud Applications

TRASH DAY: COORDINATING GARBAGE COLLECTION IN DISTRIBUTED SYSTEMS

JAVA PERFORMANCE. PR SW2 S18 Dr. Prähofer DI Leopoldseder

Garbage Collection Algorithms. Ganesh Bikshandi

Garbage Collection (aka Automatic Memory Management) Douglas Q. Hawkins. Why?

Contents in Detail. Who This Book Is For... xx Using Ruby to Test Itself... xx Which Implementation of Ruby?... xxi Overview...

Java Garbage Collector Performance Measurements

A JVM Does What? Eva Andreasson Product Manager, Azul Systems

Sustainable Memory Use Allocation & (Implicit) Deallocation (mostly in Java)

JVM Performance Study Comparing Java HotSpot to Azul Zing Using Red Hat JBoss Data Grid

High Performance Managed Languages. Martin Thompson

Efficient Runtime Tracking of Allocation Sites in Java

New Java performance developments: compilation and garbage collection

Enabling Persistent Memory Use in Java. Steve Dohrmann Sr. Staff Software Engineer, Intel

Hardware-Supported Pointer Detection for common Garbage Collections

Java Performance: The Definitive Guide

MEMORY MANAGEMENT HEAP, STACK AND GARBAGE COLLECTION

Acknowledgements These slides are based on Kathryn McKinley s slides on garbage collection as well as E Christopher Lewis s slides

Java Memory Management. Märt Bakhoff Java Fundamentals

OS-caused Long JVM Pauses - Deep Dive and Solutions

JVM Performance Study Comparing Oracle HotSpot and Azul Zing Using Apache Cassandra

JamaicaVM Java for Embedded Realtime Systems

Garbage collection. The Old Way. Manual labor. JVM and other platforms. By: Timo Jantunen

Enabling Java-based VoIP backend platforms through JVM performance tuning

JVM Performance Tuning with respect to Garbage Collection(GC) policies for WebSphere Application Server V6.1 - Part 1

Task-Aware Garbage Collection in a Multi-Tasking Virtual Machine

Shenandoah: Theory and Practice. Christine Flood Roman Kennke Principal Software Engineers Red Hat

Java Without the Jitter

Understanding Java Garbage Collection

Java Performance Tuning and Optimization Student Guide

Garbage Collection. Steven R. Bagley

KEYWORDS Full garbage collection, Java virtual machine, Performance, Parallel Scavenge, Memory management

Garbage Collection. Akim D le, Etienne Renault, Roland Levillain. May 15, CCMP2 Garbage Collection May 15, / 35

A new Mono GC. Paolo Molaro October 25, 2006

Java Platform, Standard Edition HotSpot Virtual Machine Garbage Collection Tuning Guide. Release 10

Comparison of Garbage Collectors in Java Programming Language

Deallocation Mechanisms. User-controlled Deallocation. Automatic Garbage Collection

Finally! Real Java for low latency and low jitter

Do Your GC Logs Speak To You

How to keep capacity predictions on target and cut CPU usage by 5x

Memory management has always involved tradeoffs between numerous optimization possibilities: Schemes to manage problem fall into roughly two camps

Hard Real-Time Garbage Collection in Java Virtual Machines

Heap Management. Heap Allocation

Understanding Garbage Collection

CMSC 330: Organization of Programming Languages

Understanding Java Garbage Collection

Habanero Extreme Scale Software Research Project

A STUDY IN THE INTEGRATION OF COMPUTER ALGEBRA SYSTEMS: MEMORY MANAGEMENT IN A MAPLE ALDOR ENVIRONMENT

Lecture 13: Garbage Collection

AS-GC: An Efficient Generational Garbage Collector for Java Application Servers

Garbage Collection. Vyacheslav Egorov

Advances in Memory Management and Symbol Lookup in pqr

Understanding Java Garbage Collection

Boosting the Priority of Garbage: Scheduling Collection on Heterogeneous Multicore Processors

Transcription:

NG2C: Pretenuring Garbage Collection with Dynamic Generations for HotSpot Big Data Applications Rodrigo Bruno Luis Picciochi Oliveira Paulo Ferreira 03-160447 Tomokazu HIGUCHI

Paper Information Published in: ISMM 2017 Proceedings of the 2017 ACM SIGPLAN International Symposium on Memory Management Pages 2-13

Overview Introduction Related Work Pretenuring GC with Dynamic Generations Implementation Evaluation Conclusions Additional commentaries are added to explain unfamiliar words.

Introduction Applications become.. More latency-sensitive Larger scale Cashing helps developers to avoid costly operations. But.. Developers resort to Cashing (keeping data in memory) The inevitable GC pause has become a serious problem.

Introduction To solve the GC pause problem.. I. A new GC algorithm, NG2C. Combines an arbitary number of dynamic generations with pretenuring. II. Implemented for OpenJDK 8 HotSpot JVM as an extention of next OpenJDK by-default GC, Garbage First (G1). I. II.Object Lifetime Recorder (OLR) profiler tool on a production JVM.

Related Work Generation Collector New objects are allocated in the Eden realm. Survivor objects are moved to Older realm gradually.

Related Work Pretenuring Objects which are known to live for a long time are allocated in the Old Generation realm directly.

Related Work The hypothesis: Objects allocated in the same scope have similar lifetimes. If Mr. Osomatsu can be pretenured, all his family can be pretenured. That s because they are in the same scope. Example Lifetime Profiling Optimization

Related Work Off-heap based Solutions Problems Developers should manage memory allocations without the GC. Serialization and deserialization should be done before using the data.

Additional Commentary Garbage First Garbage Collection (G1 GC) Using the heap as several large data structures is inefficient. G1 algorithm does not adopt this heap structure. In the algorithm of G1, large heap is equally divided into small regions. Region s size is depended on the heap size. It can be changed by -XX:G1HeapRegionSize from 1MB to 32MB.

Additional Commentary URL: https://www.slideshare.net/yujikubota/garbage-first-garbage-collection

Additional Commentary The amount of unnecessary objects is different from each region. GC takes place in regions which have relatively many garbages. The marking takes place in the concurrent cycle without STW. A Humongous Object is allocated in a dedicated region. Allocating it may cause the Full GC. So G1 avoid that as much as possible.

Pretenuring GC with Dynamic Generations NG2C Existing GC (G1) Heap Layout: The heap is created with two static generations: Young and Old. Allocation: By default, all objects are allocated in the Young generation. Heap Layout: An arbitrary number of dynamic generations can be added to the heap at run time. Allocation: All objects can be allocated in any generations. NG2C can reduce the amount of a survivor object promoting.

Pretenuring GC with Dynamic Generations NG2C API When a thread is created, its generation is Old. If the thread decides to create a new generation, the thread s current generation will change. To allocate an object in the current generation, the new operator must be annotated with @Gen. All allocation sites with no @Gen will allocate objects into the Young generation.

Pretenuring GC with Dynamic Generations Supplementary explanation

Pretenuring GC with Dynamic Generations

Pretenuring GC with Dynamic Generations Memory Allocation Algorithms

Pretenuring GC with Dynamic Generations TLAB (Thread Local Application Buffer)

Pretenuring GC with Dynamic Generations Minor collection: Collects the Young generation and promote objects that survived a number of collections to the Old generation. Mixed collection: Collects the Young generation plus other regions from multiple generations whose amount of live data is low. Full collection: Collects the whole heap. Notes: Concurrent marking cycles are triggered when the heap usage exceeds a configure threshold.

Pretenuring GC with Dynamic Generations

Pretenuring GC with Dynamic Generations Object Lifetime Recorder OLR is composed by three components Allocation Recorder: Record memory allocation sites. JVM Dumper: Creates incremental heap dump (a memory snapshot of the Java heap). Object Graph Analyzer: Process the allocation sites and heap dumps and generates an object graph. The result graph shows which objects should belong in the same generation, and where these objects are allocated.

Pretenuring GC with Dynamic Generations

Implementation Authors modify both the interpreter and the JIT (Just In Time) compiler to add the notion of generations. Before JIT, a map of bytecode index with annotation data is stored along the method meta data. Using this map, it is possible to know in constant time if a particular byte code index is annotated with @Gen or not. The annotation data is hardcoded into the compiled code. This frees the compiled code from accessing the annotation map.

Evaluation Cassandra: NoSQL middle-ware Lucene: Full-featured text search engine library GraphChi: Disk-based large-scale graph computation system

Evaluation CMS: Concurrent Mark-Sweep

Conclusion A new HotSpot GC algorithm, NG2C that avoids copying objects within the heap by aggregating objects with similar lifetime profiles in separate generations. Comparison with current collectors (G1 and CMS) Object copying: up to 89.2% Worst GC pause time: 94.8% in Cassandra 85% in Lucene 96.45% in GraphChi