This presentation is primarily based on Oracle's "Java SE 6 HotSpot™ Virtual Machine Garbage Collection Tuning" document.
This introduces how Java manages memory using generations, available garbage collectors and how to tune them to achieve desired performance.
Detailed design for a robust counter as well as design for a completely on-line multi-armed bandit implementation that uses the new Bayesian Bandit algorithm.
This talk is one that I gave to the HPTS workshop in Asilomar in 2009. It describes the ideas behind micro-sharding and outlines how Katta can manage micro-shards.
Some builds and spacing are off because this was exported as power point from Keynote.
Detailed design for a robust counter as well as design for a completely on-line multi-armed bandit implementation that uses the new Bayesian Bandit algorithm.
This talk is one that I gave to the HPTS workshop in Asilomar in 2009. It describes the ideas behind micro-sharding and outlines how Katta can manage micro-shards.
Some builds and spacing are off because this was exported as power point from Keynote.
A Fast and Efficient Time Series Storage Based on Apache SolrQAware GmbH
OSDC 2016, Berlin: Talk by Florian Lautenschlager (@flolaut, Senior Software Engineer at QAware)
Abstract: How to store billions of time series points and access them within a few milliseconds? Chronix! Chronix is a young but mature open source project that allows one for example to store about 15 GB (csv) of time series in 238 MB with average query times of 21 ms. Chronix is built on top of Apache Solr a bulletproof distributed NoSQL database with impressive search capabilities. In this code-intense session we show how Chronix achieves its efficiency in both respects by means of an ideal chunking, by selecting the best compression technique, by enhancing the stored data with (pre-computed) attributes, and by specialized query functions.
Jvm & Garbage collection tuning for low latencies applicationQuentin Ambard
G1, CMS, Shenandoah, or Zing? Heap size at 8GB or 31GB? compressed pointers? Region size? What is the maximum break time? Throughput or Latency... What gain? MaxGCPauseMillis, G1HeapRegionSize, MaxTenuringThreshold, UnlockExperimentalVMOptions, ParallelGCThreads, InitiatingHeapOccupancyPercent, G1RSetUpdatingPauseTimePercent, which parameters have the most impact?
Finding New Sub-Atomic Particles on the AWS Cloud (BDT402) | AWS re:Invent 2013Amazon Web Services
This session will describe how members of the US Large Hadron Collider (LHC) community have benchmarked the usage of Amazon Elastic Compute Cloud (Amazon EC2) resource to simulate events observed by experiments at the European Organization for Nuclear Research (CERN). Miron Livny from the University of Wisconsin-Madison who has been collaborating with the US-LHC community for more than a decade will detail the process for benchmarking high-throughput computing (HTC) applications running across multiple AWS regions using the open source HTCondor distributed computing software. The presentation will also outline the different ways that AWS and HTCondor can help meet the needs of compute intensive applications from other scientific disciplines.
“Show Me the Garbage!”, Understanding Garbage CollectionHaim Yadid
“Just leave the garbage outside and we will take care of it for you”. This is the panacea promised by garbage collection mechanisms built into most software stacks available today. So, we don’t need to think about it anymore, right? Wrong! When misused, garbage collectors can fail miserably. When this happens they slow down your application and lead to unacceptable pauses. In this talk we will go over different garbage collectors approaches in different software runtimes and what are the conditions which enable them to function well.
Presented on Reversim summit 2019
https://summit2019.reversim.com/session/5c754052d0e22f001706cbd8
The Power of Both Choices: Practical Load Balancing for Distributed Stream Pr...Anis Nasir
We have recently studied the problem of load balancing in Storm.
In particular, we focused on what happens when the key distribution of the stream is skewed when using key grouping.
We developed a new stream partitioning scheme (which we call Partial Key Grouping). It achieves better load balancing than key grouping while being more scalable than shuffle grouping in terms of memory.
DSD-INT 2017 High Performance Parallel Computing with iMODFLOW-MetaSWAP - Ver...Deltares
Presentation by Jarno Verkaik (Deltares) at the iMOD International User Day, during Delft Software Days - Edition 2017. Tuesday, 31 October 2017, Delft.
CRAMM: Virtual Memory Support for Garbage-Collected ApplicationsEmery Berger
This talk presents operating support that can dramatically improve the performance of garbage-collected applications. It describes a virtual memory manager that, combined with a collector-neutral heap sizing algorithm, ensures that garbage-collected applications run as fast as possible while avoiding paging.
Node.js® is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
The Knight's Tour is a mathematical problem involving a knight on a chessboard. The knight is placed on the empty board and, moving according to the rules of chess, must visit each square exactly once. A tour is called closed, if ending square is same as the starting. Otherwise it is called an open tour. The exact number of open tours is still unknown. Variations of the knight's tour problem involve chessboards of different sizes than the usual 8 × 8, as well as irregular (non-rectangular) boards.
Skype proclaims that it provides a secure method of communication. Hundreds of millions of people have chosen to use Skype, often on the basis of this assurance.
This presentation discusses some security risk and vulnerabilities of Skype.
Enterprise Java Beans (EJB) is a platform for building portable, reusable, and scalable business applications using the Java programming language.
EJB allows application developers to focus on building business logic without having to spend time on building infrastructure code for services such as transactions, security, automated persistence, and so on.
This presentation introduces EJB 3.0 concepts with code examples.
English version of the presentation we gave at Devoxx FR 2012.
In depth analysis on how java Garbage collector works and how to minimise pause in your application.
A Fast and Efficient Time Series Storage Based on Apache SolrQAware GmbH
OSDC 2016, Berlin: Talk by Florian Lautenschlager (@flolaut, Senior Software Engineer at QAware)
Abstract: How to store billions of time series points and access them within a few milliseconds? Chronix! Chronix is a young but mature open source project that allows one for example to store about 15 GB (csv) of time series in 238 MB with average query times of 21 ms. Chronix is built on top of Apache Solr a bulletproof distributed NoSQL database with impressive search capabilities. In this code-intense session we show how Chronix achieves its efficiency in both respects by means of an ideal chunking, by selecting the best compression technique, by enhancing the stored data with (pre-computed) attributes, and by specialized query functions.
Jvm & Garbage collection tuning for low latencies applicationQuentin Ambard
G1, CMS, Shenandoah, or Zing? Heap size at 8GB or 31GB? compressed pointers? Region size? What is the maximum break time? Throughput or Latency... What gain? MaxGCPauseMillis, G1HeapRegionSize, MaxTenuringThreshold, UnlockExperimentalVMOptions, ParallelGCThreads, InitiatingHeapOccupancyPercent, G1RSetUpdatingPauseTimePercent, which parameters have the most impact?
Finding New Sub-Atomic Particles on the AWS Cloud (BDT402) | AWS re:Invent 2013Amazon Web Services
This session will describe how members of the US Large Hadron Collider (LHC) community have benchmarked the usage of Amazon Elastic Compute Cloud (Amazon EC2) resource to simulate events observed by experiments at the European Organization for Nuclear Research (CERN). Miron Livny from the University of Wisconsin-Madison who has been collaborating with the US-LHC community for more than a decade will detail the process for benchmarking high-throughput computing (HTC) applications running across multiple AWS regions using the open source HTCondor distributed computing software. The presentation will also outline the different ways that AWS and HTCondor can help meet the needs of compute intensive applications from other scientific disciplines.
“Show Me the Garbage!”, Understanding Garbage CollectionHaim Yadid
“Just leave the garbage outside and we will take care of it for you”. This is the panacea promised by garbage collection mechanisms built into most software stacks available today. So, we don’t need to think about it anymore, right? Wrong! When misused, garbage collectors can fail miserably. When this happens they slow down your application and lead to unacceptable pauses. In this talk we will go over different garbage collectors approaches in different software runtimes and what are the conditions which enable them to function well.
Presented on Reversim summit 2019
https://summit2019.reversim.com/session/5c754052d0e22f001706cbd8
The Power of Both Choices: Practical Load Balancing for Distributed Stream Pr...Anis Nasir
We have recently studied the problem of load balancing in Storm.
In particular, we focused on what happens when the key distribution of the stream is skewed when using key grouping.
We developed a new stream partitioning scheme (which we call Partial Key Grouping). It achieves better load balancing than key grouping while being more scalable than shuffle grouping in terms of memory.
DSD-INT 2017 High Performance Parallel Computing with iMODFLOW-MetaSWAP - Ver...Deltares
Presentation by Jarno Verkaik (Deltares) at the iMOD International User Day, during Delft Software Days - Edition 2017. Tuesday, 31 October 2017, Delft.
CRAMM: Virtual Memory Support for Garbage-Collected ApplicationsEmery Berger
This talk presents operating support that can dramatically improve the performance of garbage-collected applications. It describes a virtual memory manager that, combined with a collector-neutral heap sizing algorithm, ensures that garbage-collected applications run as fast as possible while avoiding paging.
Node.js® is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
The Knight's Tour is a mathematical problem involving a knight on a chessboard. The knight is placed on the empty board and, moving according to the rules of chess, must visit each square exactly once. A tour is called closed, if ending square is same as the starting. Otherwise it is called an open tour. The exact number of open tours is still unknown. Variations of the knight's tour problem involve chessboards of different sizes than the usual 8 × 8, as well as irregular (non-rectangular) boards.
Skype proclaims that it provides a secure method of communication. Hundreds of millions of people have chosen to use Skype, often on the basis of this assurance.
This presentation discusses some security risk and vulnerabilities of Skype.
Enterprise Java Beans (EJB) is a platform for building portable, reusable, and scalable business applications using the Java programming language.
EJB allows application developers to focus on building business logic without having to spend time on building infrastructure code for services such as transactions, security, automated persistence, and so on.
This presentation introduces EJB 3.0 concepts with code examples.
English version of the presentation we gave at Devoxx FR 2012.
In depth analysis on how java Garbage collector works and how to minimise pause in your application.
The Java Memory Model describes how threads in the Java programming language interact through memory. Together with the description of single-threaded execution of code, the memory model provides the semantics of the Java programming language.
It is crucial for a programmer to know how, according to Java Language Specification, write correctly synchronized, race free programs.
Java Memory Consistency Model - concepts and contextTomek Borek
Java Memory Consistency Model is a difficult topic.
It's useful in making sure that multi-threaded programs on multi-threaded cores will interact with each other (and through memory) in a consistent manner.
It's specification is damn hard (even according to folks with lots of concurrent experience, like Doug Lea) to read, understand and routinely follow without error.
This presentation talks about some fallacies surrounding memory model, explains it, offers definitions and reasons for it's existence. It ain't deep, it's more entry level stuff.
This slide will explain about building blocks of JVM optimization for you java based application.
It explains basics of heap concepts and different type of java garbage collectors.
The workshop is based on several Nikita Salnikov-Tarnovski lectures + my own research. The workshop consists of 2 parts. The first part covers:
- different Java GCs, their main features, advantages and disadvantages;
- principles of GC tuning;
- work with GC Viewer as tool for GC analysis;
- first steps tuning demo;
- comparison primary GCs on Java 1.7 and Java 1.8
The second part covers:
- work with Off-Heap: ByteBuffer / Direct ByteBuffer / Unsafe / MapDB;
- examples and comparison of approaches;
The off-heap-demo: https://github.com/moisieienko-valerii/off-heap-demo
Garbage collection is the most famous (infamous) JVM mechanism and it dates back to Java 1.0. Every Java developer knows about its existence yet most of the time we wish we can ignore its behavior and assume it works perfectly. Unfortunately this is not the case and if you are ignoring it, GC may hit you really hard.... in production. Furthermore the information that you may find on the web can be a lot of times misleading. In this event we will try to demystify some of the misconceptions around GC by understanding how different GC mechanisms work and how to make the right decisions in order to make them work for you.
This presentation was given to the system adminstration team to give them an idea of how GC works and what to look for when there is abottleneck and troubles.
Java Garbage Collectors – Moving to Java7 Garbage First (G1) CollectorGurpreet Sachdeva
One of the key strengths of JVM is automatic memory management (Garbage Collection). Its understanding can help in writing better applications. This becomes all the more important as enterprise server applications have large amount of live heap data and significant parallel threads. Until recently, main collectors were parallel collector and concurrent-mark-sweep (CMS) collector. This presentation introduces the various Garbage Collectors and compares the CMS collector against its replacement, a new implementation in Java7 i.e. G1. It is characterized by a single contiguous heap which is split into same-sized regions. In fact if your application is still running on the 1.5 or 1.6 JVM, a compelling argument to upgrade to Java 7 is to leverage G1.
Instaclustr has a diverse customer base including Ad Tech, IoT and messaging applications ranging from small start ups to large enterprises. In this presentation we share our experiences, common issues, diagnosis methods, and some tips and tricks for managing your Cassandra cluster.
About the Speaker
Brooke Jensen VP Technical Operations & Customer Services, Instaclustr
Instaclustr is the only provider of fully managed Cassandra as a Service in the world. Brooke Jensen manages our team of Engineers that maintain the operational performance of our diverse fleet clusters, as well as providing 24/7 advice and support to our customers. Brooke has over 10 years' experience as a Software Engineer, specializing in performance optimization of large systems and has extensive experience managing and resolving major system incidents.
Java is finally elastic! OpenJDK improvements and new features in Garbage Collection technology resulted in enhancing Java vertical scaling and resource consumption. Now JVM can promptly return unused memory and, as result it can go up and down automatically. In this presentation, we cover the main achievements in vertical scaling direction, as well as share peculiarities and tuning details of different GCs. Find out how to make your Java environments more elastic to follow the load and lower down the total cost of ownership at a large scale.
Discussion about the evolution of metrics in Cassandra from 1.0 to 3.0, how the metric changes impact operational tooling, pros and cons for different metric representations, and how and why DataStax OpsCenter collects and stores metrics. Includes a deep dive on how DataStax OpsCenter represents and stores the different kinds of metrics to provide visibility beyond simple cluster averages both behind the scenes and in the rendering.
About the Speaker
Chris Lohfink Software Engineer, DataStax
I am a Java, Python, and Clojure developer who has been using Cassandra in an application development and operational context for the last five years. The last nearly two years I have been working with the OpsCenter Monitoring team at DataStax to improve the accuracy and breadth of the visualization tooling available.
Organizations continue to adopt Solr because of its ability to scale to meet even the most demanding workflows. Recently, LucidWorks has been leading the effort to identify, measure, and expand the limits of Solr. As part of this effort, we've learned a few things along the way that should prove useful for any organization wanting to scale Solr. Attendees will come away with a better understanding of how sharding and replication impact performance. Also, no benchmark is useful without being repeatable; Tim will also cover how to perform similar tests using the Solr-Scale-Toolkit in Amazon EC2.
Scylla Summit 2022: Scylla 5.0 New Features, Part 2ScyllaDB
Discover the new features and capabilities of Scylla Open Source 5.0 directly from the engineers who developed it. This first block of lightning talks will cover the following topics:
- Repair Based Node Operations
- Repair Based Tombstone Garbage Collection
- Compaction Improvements
- Range Tombstone Improvements
To watch all of the recordings hosted during Scylla Summit 2022 visit our website here: https://www.scylladb.com/summit.
Choosing Right Garbage Collector to Increase Efficiency of Java Memory UsageJelastic Multi-Cloud PaaS
With microservices, cloud hosting, and vertical scaling in mind, we'll compare the top Java garbage collectors to see how efficiently they handle memory resources. Being configured smartly, Java can be cost-effective for all ranges of projects — from cloud-native startups to legacy enterprise applications. And the selected garbage collection algorithm is one of the main foundational bricks here, as its settings can influence the whole project. In this presentation, we share our experiences in tuning RAM usage in a Java process to make it more elastic and gain the benefits of faster scaling and lower total cost of ownership (TCO). The provided results of testing G1, Parallel, ConcMarkSweep, Serial, Shenandoah, ZGC, C4 and OpenJ9 garabage collectors while scaling Java applications vertically will help you to make the right choice for own projects.
Elastic JVM for Scalable Java EE Applications Running in Containers #Jakart...Jelastic Multi-Cloud PaaS
Being configured smartly, Java can be scalable and cost-effective for all ranges of projects — from cloud-native startups to legacy enterprise applications. During this session, we will share our experiences in tuning RAM usage in a Java process to make it more elastic and gain the benefits of faster scaling and lower total cost of ownership (TCO). With microservices, cloud hosting, and vertical scaling in mind, we'll compare the top Java garbage collectors to see how efficiently they handle memory resources. The provided results of testing G1, Parallel, ConcMarkSweep, Serial, Shenandoah, ZGC and OpenJ9 garbage collectors while scaling Java EE applications vertically will help you to make the right choice for own projects.
More details about Garbage Collector types https://jelastic.com/blog/garbage-collection/
Free registration at Jelastic https://jelastic.com/
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
Zoom is a comprehensive platform designed to connect individuals and teams efficiently. With its user-friendly interface and powerful features, Zoom has become a go-to solution for virtual communication and collaboration. It offers a range of tools, including virtual meetings, team chat, VoIP phone systems, online whiteboards, and AI companions, to streamline workflows and enhance productivity.
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
Takashi Kobayashi and Hironori Washizaki, "SWEBOK Guide and Future of SE Education," First International Symposium on the Future of Software Engineering (FUSE), June 3-6, 2024, Okinawa, Japan
4. Java is everywhere…
• Java™ Platform, Standard Edition (Java SE™) is
used for a wide variety of applications.
• JVM provides multiple garbage collectors,
each designed to satisfy different
requirements
5. Why memory?
• One strength of the J2SE platform is that it
shields the developer from the complexity of
memory allocation and garbage collection.
• However, once garbage collection is the
principal bottleneck, it is worth understanding
some aspects of this hidden implementation.
6. • When does the choice of a garbage collector
matter?
– For some applications, the answer is never
• Application can perform well in the presence of
garbage collection with pauses of modest frequency
and duration
– However, this is not the case for a large class of
applications
9. Garbage Collection… How?
• The most straightforward garbage collection
algorithms simply iterate over every reachable
object.
– The time this approach takes is proportional to
the number of live objects
• “Weak generational hypothesis”
– “most objects survive for only a short period of
time”
16. Performance Considerations
• Throughput
– is the percentage of total time not spent in
garbage collection, considered over long periods
of time
• Pauses
– are the times when an application appears
unresponsive because garbage collection is
occurring.
• A web server vs an interactive graphics
program
17. Performance…
• Footprint
– is the working set of a process, measured in pages and
cache lines
• Promptness
– is the time between when an object becomes dead
and when the memory becomes available
• In general, a particular generation sizing chooses
a trade-off between these considerations.
18. Performance…
• A very large young generation
– maximize throughput
– at the expense of footprint, promptness and
pause times.
• A small young generation
– young generation pauses can be minimized
– at the expense of throughput
19. Measurement
• -verbose:gc
information about the heap and garbage collection
to be printed at each collection.
[GC 325407K->83000K(776768K), 0.2300771 secs]
[GC 325816K->83372K(776768K), 0.2454258 secs]
[Full GC 267628K->83769K(776768K), 1.8479984 secs]
21. Sizing the Generations
• -Xms : initial sizes of the heap
• -Xmx : maximum sizes of the heap
• Collections occur when generations fill up
– Throughput is inversely proportional to the
amount of memory available
22. Sizing…
• By default, the virtual machine grows or
shrinks the heap at each collection to try to
keep the proportion of free space to live
objects at each collection within a specific
range
• -XX:MinHeapFreeRatio=<minimum>
• -XX:MaxHeapFreeRatio=<maximum>
23. Sizing…
MinHeapFreeRatio 40
MaxHeapFreeRatio 70
-Xms 3670k
-Xmx 64m
If the percent of free space in a generation falls below 40%, the generation will be
expanded to maintain 40% free space, up to the maximum allowed size of the
generation.
If the free space exceeds 70%, the generation will be contracted so that only 70% of
the space is free, subject to the minimum size of the generation.
24. The Young Generation
• The second most influential knob is the
proportion of the heap dedicated to the young
generation.
– The bigger the young generation, the less often
minor collections occur.
– Larger young generation implies a smaller tenured
generation (for a bounded heap size)
– will increase the frequency of major collections
25. • -XX:NewRatio : Defines the ratio between
the young and tenured generation
ex: -XX:NewRatio=3
• You can even decide the initial and max sizes
of the young space with parameters
NewSize and MaxNewSize
26. Survivor Space Sizing
• SurvivorRatio : can be used to tune the
size of the survivor spaces
• Sets the ratio between eden and a survivor
space
• This is often not as important for performance
• -XX:SurvivorRatio=6
27. • If survivor spaces are too small, copying
collection overflows directly into the tenured
generation.
• If survivor spaces are too large, they will be
uselessly empty.
29. The serial collector
• Uses a single thread to perform all garbage
collection work
– No communication overhead between threads
– Best-suited to single processor machines
– Multiprocessors for applications with small data
sets (up to approximately 100MB)
• -XX:+UseSerialGC
30. The parallel collector
• a.k.a throughput collector
• Performs minor collections in parallel
• Medium- to large-sized data sets that are run
on multiprocessor or multi-threaded
hardware.
• -XX:+UseParallelGC
• -XX:+UseParallelOldGC
31. Parallel collector…
• Select the parallel collector if,
– Peak application performance is the first priority
– There are no pause time requirements or pauses
of one second or longer are acceptable
• On a machine with N processors the parallel
collector uses N garbage collector threads
• -XX:ParallelGCThreads=<N>
32. • -XX:MaxGCPauseMillis=<N>
– a hint that pause times of <N> milliseconds or less
are desired
• -XX:GCTimeRatio=<N>
– Sets the ratio of garbage collection time to
application time to 1 / (1 + <N>)
– -XX:GCTimeRatio=19 sets a goal of 1/20 or
5% of the total time in garbage collection.
33. Generation Size Adjustments
• Growing and shrinking are done at different rates
• By default a generation grows in increments of
20% and shrinks in increments of 5%.
-XX:YoungGenerationSizeIncrement=<Y> for the
young generation
-XX:TenuredGenerationSizeIncrement=<T> for the
tenured generation
-XX:AdaptiveSizeDecrementScaleFactor=<D>
If the growth increment is X percent, the decrement for
shrinking is X / D percent
34. The Concurrent Collector
• Select concurrent collector If
– response time is more important than overall
throughput
– garbage collection pauses must be kept shorter than
approximately one second
• Suitable for
– applications which have a relatively large set of long-
lived data (a large tenured generation)
– run on machines with two or more processors
• -XX:+UseConcMarkSweepGC
35. Steps of Concurrent Collection
1. Stop all application threads and identify the set of objects
reachable from roots, then resume all application threads
2. Concurrently trace the reachable object graph, using one or more
processors, while the application threads are executing
3. Concurrently retrace sections of the object graph that were
modified since the tracing in the previous step, using one
processor
4. Stop all application threads and retrace sections of the roots and
object graph that may have been modified since they were last
examined, then resume all application threads
5. Concurrently sweep up the unreachable objects to the free lists
used for allocation, using one processor
6. Concurrently resize the heap and prepare the support data
structures for the next collection cycle, using one processor
36. Starting a Concurrent Collection Cycle
• Serial collector
– A major collection occurs whenever the tenured
generation becomes full
– all application threads are stopped while the
collection is done.
– stop-the-world condition
• concurrent collector
– starts at a time such that the collection can finish
before the tenured generation becomes full
37. Starting…
• Concurrent collector maintains dynamic
estimates based on recent history
• A concurrent collection will also start if the
occupancy of the tenured generation exceeds
an initiating occupancy
• -XX:CMSInitiatingOccupancyFraction=<N>
– <N> is an integral percentage (0-100) of the
tenured generation size.
38. Incremental Mode
• Normally, the concurrent collector uses one or
more processors during the entire concurrent
tracing phase, without voluntarily releasing them.
• Also, one processor is used for the entire
concurrent sweep phase, again without releasing
it.
• Incremental mode solves this problem by
breaking up the concurrent phases into short
bursts of activity, which are scheduled to occur
mid-way between minor pauses.
40. Incremental Mode…
• Recommended Options
– To use i-cms in Java SE 6, use the following
command line options:
-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode
41. Excessive GC Time and OutOfMemoryError
• Parallel collector and concurrent collectore will
throw an OutOfMemoryError if too much time is
being spent in garbage collection
– If more than 98% of the total time is spent in garbage
collection and less than 2% of the heap is recovered
– Prevents applications from running for an extended
period of time while making little or no progress
• -XX:-UseGCOverheadLimit
– To disable this feature
43. Permanent Generation Size
• The permanent generation does not have a
noticeable impact on GC performance
• However, some applications dynamically
generate and load many classes; for example,
some implementations of JavaServer Pages
(JSP) pages.
• -XX:MaxPermSize=<N>
44. The size of the JVM thread stack
• When Java creates a new thread, it pre-
allocates a fixed-size block of memory for that
thread's stack.
• If you have lots of threads - the memory
saving is the reduction in stack size times the
number of threads.
– May increase the chance of a Stack Overflow error
• On x86 Solaris/Linux it is 320k in the 32-bit
VM and 1024k in the 64-bit VM
45. JVM thread stack…
• (total RAM used by JVM process) = (heap size)
+ (number of threads)x(thread stack size)
• If application has a lot of threads might be
running out of memory
• You can reduce your stack size by running with
the -Xss option
• Ex : -Xss64k