SlideShare a Scribd company logo
1 of 71
Download to read offline
A STATE OF JAVA ELASTICITY
Tuning Java Efficiency
About Speaker
● Ruslan Synytsky
● CEO and co-founder of Jelastic PaaS
● Java Champion
● Two-times Duke’s Choice Award Winner
● Former lead of engineering team at
National Data Center (NDC) at National
Space Agency of Ukraine
● @siruslan
Agenda
● Java Memory Usage Problems and Use Cases
● Recent Improvements in OpenJDK
● Testing Elasticity with Different Garbage Collectors
● Upcoming Improvements in OpenJDK
Unreleased Heap Memory
The Problem Symptoms
Over-Allocation and Underutilization
Java Memory Usage Pain Points
Q: Return memory from JVM to OS
Q: Java VM - does the freed memory return to the OS?
Q: More flexible memory management
Q: Force JVM to free memory
Q: Why Java does not release memory?
Q: Does GC release back memory to OS?
Q: Why does this java process not release memory?
...
Large Java Memory Requirements
WHAT IS THE MOST CHALLENGING ASPECT OF WORKING WITH JAVA EE?
Jakarta EE Developer Survey 2018
“The most widely acknowledged issue
when employing with Java EE is large
memory requirements (40%)”
Reasons to Seek Java Elasticity Getting resources from common
Desktop
Applications,
IDEs
Scheduled
tasks for data
processing
Cloud cost
saving with
pay-per-use
NEED FOR ELASTICITY
Automated scaling of
resources on the fly without
JVM restart and downtimes
Dynamic
stateful
workloads
Right-sizing
problem with
containers
Transition from Monolith to Microservices
Resource Limit vs Real Usage in VM
Resource Limit vs Real Usage in Container
Elasticy Use Case in the Cloud
Elasticy Use Case in the Cloud
Pool of Resources
Elasticy Use Case in the Cloud
Elasticy Use Case in the Cloud
Elasticy Use Case in the Cloud
Elasticy Use Case in the Cloud
Real Statistics of Resource Consumption with Containers
Using automatic vertical scaling, cloud provides can offer economically
advantageous pricing based on the actual resource consumption
Forbes - Deceptive Cloud Efficiency: Do You Really Pay As You Use?
Pay-As-You-Go Pay-per-Use
Pay-As-You-Go vs Pay-per-Use
Understanding JVM Footprint
Understanding JVM Footprint
MAXIMUM MEMORY USAGE
[-Xmx] + [-XX:MaxMetaspaceSize] + [-XX:MaxDirectMemorySize] + Num_Of_Threads * [-Xss]
Useful discussion at SoW Java using much more memory than heap size and presentation Memory Footprint of a Java Process
-Xmx=[25% of OS Total Memory]
Useful options to adjust defaults in % -XX:MaxRAMPercentage
-XX:MaxMetaspaceSize=[unlimited]
-XX:MaxDirectMemorySize=[-Xmx]
-Xss[1m]
Alternative syntax -XX:ThreadStackSize=[1m]
Specify these options explicitly if you face related OutOfMemoryError
Default Limits (Depend on The Platform!)
Understanding of the OutOfMemoryError Exceptions
OutOfMemoryError exception is usually thrown when there is insufficient
space to allocate an object in the Java heap or insufficient native memory to
support the loading of a Java class
https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/memleaks002.html
● java.lang.OutOfMemoryError: Java heap space
● java.lang.OutOfMemoryError: GC Overhead limit exceeded
● java.lang.OutOfMemoryError: Requested array size exceeds VM limit
● java.lang.OutOfMemoryError: Metaspace
● java.lang.OutOfMemoryError: Compressed class space
● java.lang.OutOfMemoryError: reason stack_trace_with_native_method
● java.lang.OutOfMemoryError: request size bytes for reason. Out of swap space?
An Example of OutOfMemoryError Exception
Used Heap > Xmx
An Example of OOM Killer Situation (Even Worse)
oom_kill is a job that helps to sacrifice one or
more processes in order to free up memory
for the system
The Heap Vertical Scaling Problem Symptoms
Unreleased Heap Memory
Calling Full GC Periodically (Workaround)
https://github.com/jelastic-jps/java-memory-agent
As compacting GC cycles are not triggered automatically, we execute
them explicitly by injecting an agent which monitors the memory usage
and calls System.gc() periodically:
-javaagent:jelastic-gc-agent.jar=period=300,debug=true
Consider enabling -XX:+ExplicitGCInvokesConcurrent
G1 and Full GC
java -XX:+UseG1GC -Xmx2g -jar app.jar
https://github.com/jelastic/java-vertical-scaling-test
Simple Jenkins Example
After Full GC call initiated by Jelastic GC agent the memory consumption goes down to 0.5G. If we
disable the agent then the memory usage at the idle JVM will stay at 3G forever which is a significant
waste of resources. If you put additional load on Jenkins the picture will look even worse.
Container limit - 8G, max heap limit (Xmx) - 6.5G and the memory consumption after the simple initial
sign in action goes to 3G.
Timely Reduce Unused Committed Memory (JEP 346)
Make the G1 garbage collector automatically give back Java heap memory
to the operating system when idle
● -XX:G1PeriodicGCInterval=[milliseconds]
● -XX:G1PeriodicGCSystemLoadThreshold=[float]
● -XX:+G1PeriodicGCInvokesConcurrent
JEP 346: Promptly Return Unused Committed Memory from G1
java -Xmx2g -XX:+UseG1GC -XX:G1PeriodicGCInterval=900k
-XX:G1PeriodicGCSystemLoadThreshold=0.6 -jar app.jar
Available from Java 12
Immediately Improved Heap Elasticity
Automatically Released Heap
Community Recognition
G1PeriodicGCSystemLoadThreshold in Docker Container
Using LXCFS to Improve Container Resource Visibility
For getting correct loadavg while running in Docker container use https://github.com/lxc/lxcfs/
Running GC
Tests in Jelastic
Load Testing Logic
https://github.com/jelastic/java-vertical-scaling-test/blob
/master/src/com/jelastic/verticalscaling/Load.java#L50
java [OPTIONS] -jar app.jar <sleep>
Auto Testing Package
https://github.com/jelastic/java-vertical-scaling-test/blob/master/manifest.yml
G1 Collector (-XX:+UseG1GC)
The Garbage-First (G1) is a server-style Garbage Collector for
multiprocessor machines with a large amount of memory. The heap is
partitioned into fixed-sized regions and G1 tracks the live data in those
regions. When Garbage Collection is required, it collects from the regions
with less live data first.
● 2004, Sun Microsystems
JEP 346: Promptly Return Unused Committed Memory from G1
G1
-Xmx3g -XX:+UseCompressedOops -XX:+UseG1GC -XX:G1PeriodicGCInterval=1k
Shenandoah GC (-XX:+UseShenandoahGC)
Shenandoah GC is a concurrent garbage collector for the JVM. GC tries to
perform most of the activities in parallel without interrupting application
performance. Such parallelism makes “stop-the-world” (STW) pauses
extremely short. Another inherent advantage is an efficient work with small
and large heaps with no impact on STW pauses’ length.
● 2014, Christine H. Flood, Red Hat
https://wiki.openjdk.java.net/display/shenandoah/Main#Main-Heuristics
-Xmx3g -XX:+UseCompressedOops -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
Shenandoah
ZGC (-XX:+UseZGC)
ZGC is low latency scalable garbage collector. Designed for use with
applications that require a large heap and low latency. It uses a bunch of one
generation and performs most (but not all) garbage collection in parallel with
uninterrupted application work. This greatly limits the impact of garbage
collection on your application response time.
● 2018, Per Liden, Oracle
JEP 351: ZGC: Uncommit Unused Memory - available from JDK 13 Release
-Xmx3g -XX:+UseZGC -XX:ZUncommitDelay=1 -XX:ZCollectionInterval=30
ZGC @ Oracle OpenJDK
C4 (-XX:+UseZST)
The C4 (Continuously Concurrent Compacting Collector) is an
updated generational form of the Azul Pauseless GC Algorithm and is
the default collector of Zing®. C4 differentiates itself from other
generational garbage collectors by supporting simultaneous –
generational concurrency: the different generations are collected using
concurrent (non-stop-the-world) mechanisms that can be
simultaneously and independently active. Unlike other algorithms, it is
not ‘mostly’ concurrent, but fully concurrent, so it never falls back to a
stop-the-world compaction.
● 2010, Gil Tene, Azul Systems
-Xmx500m -XX:+UseZST
C4 @ Zing
pmem.conf -> cgroups enabled
ConcMarkSweep GC (-XX:+UseConcMarkSweepGC)
ConcMarkSweep GC collector is designed for applications that prefer
shorter garbage collection pauses and which can afford to share processor
resources with the garbage collector while the application is running. It
makes sense to use such a collector when applications requirements for time
garbage collection pauses are low.
● 2004, Sun Microsystems
-Xmx3g -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC
+ 4 calls of Full GC via jcmd <pid> GC.run
ConcMarkSweep (Deprecated since Java 9)
Consider using -XX:-ShrinkHeapInSteps
Serial GC (-XX:+UseSerialGC)
Serial GC performs garbage collection in a single thread and has the lowest
consumption of memory among all GC types but, at the same time, it makes
long pauses that can lead to application performance degradation.
● 2004, Sun Microsystems
-Xmx3g -XX:+UseCompressedOops -XX:+UseSerialGC
+ 4 calls of Full GC via jcmd <pid> GC.run
Serial
Consider using -XX:-ShrinkHeapInSteps
OpenJ9
OpenJ9 uses the Generational Concurrent (-Xgcpolicy:gencon) policy by
default, which is best suited to transactional applications that have many
short lived objects. Alternative policies are available, including those that
cater for applications with large Java heaps (-Xgcpolicy:balanced),
applications that are sensitive to response-time (-Xgcpolicy:metronome), or
applications that require high application throughput (-Xgcpolicy:optthruput).
● 2017, Eclipse Foundation
-Xmx3g -XX:+UseCompressedOops 
-XX:+IdleTuningCompactOnIdle -XX:+IdleTuningGcOnIdle -XX:IdleTuningMinIdleWaitTime=1 
-Xjit:waitTimeToEnterDeepIdleMode=1000
Bash command to check the real usage
while true
do
pid=$(pgrep -f java | tail -n1)
used=$(ps -orss --no-headers --pid $pid)
echo "scale=2 ; $used / 1024/1024" | bc
sleep 1
done
OpenJ9 (Not Enough Tuning and Testing Experience*)
Inconsistent behaviour with -XX:+IdleTuningGcOnIdle, mem not released back to OS on Idle
Parallel GC (-XX:+UseParallelGC)
Parallel GC is a “stop-the-world” multithreaded Garbage Collector similar to
the serial collector. The primary difference is that multiple threads are used
to speed up garbage collection. By default, both minor and major collections
are executed in parallel to further reduce garbage collection costs.
● 2000, Sun Microsystems
-Xmx3g -XX:+UseCompressedOops -XX:+UseParallelGC
+ periodical jcmd <pid> GC.run
Parallel
Main Points of Elastic Vertical Scaling
A - initial usage
B - maximum usage
C - growth speed
D - duration before release
E - release speed
F - minimum usage after release
Different GCs provide different results and fine tuning options
Running GC
Tests in Kubernetes
Auto Testing Package for Kubernetes
https://github.com/jelastic/java-vertical-scaling-test/blob/master/manifest-k8s.yaml
Load Testing Logic
java [OPTIONS] -jar app.jar <sleep> <mode>
where
sleep - 100
mode - 2
https://github.com/jelastic/java-vertical-scaling-test/blob/ma
ster/src/com/jelastic/verticalscaling/Load.java#L64
G1 in Kubernetes
Shenandoah in Kubernetes
ZGC @ Oracle OpenJDK in Kubernetes
Joint Comparison - Several Load Cycles
RAM CPU
Running GC
Tests with Jakarta EE
● simple .war artifact deployed with GlassFish 5
● JSP that sets 1MB attribute in session
● 1 min session timeout
● https://github.com/jelastic/java-vertical-scaling-test/tree/payara/web
app
Load Testing Logic
Load test GETs webapp endpoint n times
for i in {1..n}; do curl -s localhost:8080 > /dev/null; done
GlassFish with Shenandoah
-Xmx3g -XX:+UseCompressedOops -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
for i in {1..1000}; do curl -s localhost:8080 > /dev/null; done
Resizing Xmx
On the Fly
Dynamic Max Heap Resizing - Solving Right Sizing Problem
Restart for Xmx Resize
-XX:SoftMaxHeapSize @ ZGC
SoftMaxHeapSize is set for the GC to
strive not to grow heap size beyond the
specified size unless it is highly needed:
● to keep the heap footprint down, while
maintaining the capability to deal with a
temporary increase in heap space
requirement
● with lots of margin, to increase confidence
that you will not run into an allocation stall
because of an unforeseen increase in
allocation rate
Using -XX:SoftMaxHeapSize
-XX:G1PeriodicGCInterval and -XX:SoftMaxHeapSize
G1PeriodicGCInterval (G1) / ZCollectionInterval (ZGC) is a time-based
solution which has no direct impact on how much the heap will grow during
the given interval.
SoftMaxHeapSize is a size-based solution which controls how large the heap
can grow, but has no direct relation with uncommit (returning unused
memory back to OS)
Both options can be used, whichever condition is met first will trigger a GC.
ZGC (Java13+) https://bugs.openjdk.java.net/browse/JDK-8222181
G1, Shenandoah (TBD) https://bugs.openjdk.java.net/browse/JDK-8236073
-Xsoftmx @ OpenJ9
https://www.ibm.com/support/knowledgecenter/en/SSYKE2_8.0.0/openj9/xsoftmx/index.html
Runtime adjustable heap size (-Xsoftmx) allows to adjust heap size
dynamically and take advantage of hot-add of memory.
You can set this option on the command line, then modify it at run time by
using the com.ibm.lang.management.MemoryMXBean.setMaxHeapSize().
This option can be useful in virtualized or cloud environments, for example,
where the available memory might change dynamically to meet business
needs.
By default, -Xsoftmx is set to the same value as -Xmx.
C4 is fully elastic and can return all empty pages to the OS after each GC cycle.
However, C4 sticks to the Xmx it was given, and avoid doing heavy elastic memory dance,
since relinquishing memory mappings and reestablishing them on Linux kernels is
bandwidth-limited in practice by the rate of page mapping invalidation the kernel can
handle.
C4 goes above Xmx rather than go between Xms and Xmx. JavaMemMax option controls
the true maximum. In the future it will allow both scenarios where above-Xmx is allowed
and where above-Xmx is prohibited.
Two modes:
● Contingency (default mode) - goes above Xmx if it absolutely has to and will work
hard to collect and stay below Xmx.
● Insurance (best effort elasticity) - borrows available memory and goes above Xmx in
order to delay GC whenever possible.
JavaMemMax @ С4 + ZST (Zing System Tools)
Xmx can be set higher than the Container Limit. Also both
SoftMaxHeapSize and Container Limit can be adjusted on the fly
without the need to restart JVM or container.
At the moment the heap size can go beyond SoftMaxHeapSize and
there is no guarantee on how much the heap will grow other than up
to Xmx.
The problem arises when Used Heap comes close to Container Limit.
Most likely the JVM will be killed by the OOM Killer as it exceeds the
amount of memory available in the container.
JEP Draft: Dynamic Max Memory Limit @ G1
We can introduce manageable HardMaxHeapSize. In this case JVM will throw OOM Error (losing
one operation) instead of OOM Kill (losing whole JVM).
Xmx
Container Limit
SoftMaxHeapSize
JEP 387: Elastic Metaspace (Target Release Java 16)
To deal with potential problems involving virtual memory fragmentation or uncommit speed, we will add a new
production command-line option to control metaspace reclamation behavior:
-XX:MetaspaceReclaimPolicy=(balanced|aggressive|none)
■ balanced: Most applications should see an improvement in metaspace memory footprint while the
negative effects of memory reclamation should be marginal. This mode is the default, and aims for
backward compatibility.
■ 'aggressive': Offers increased memory-reclamation rates at the cost of increased virtual-memory
fragmentation.
■ 'none': Disables memory reclamation altogether.
Applications that use many small class loaders may suffer from
unreasonably high metaspace usage. Applications with heavy class
loading and unloading activity can thus accrue a lot of unused space in
the metaspace freelists. That space can be returned to the operating
system to be used for other purposes if it is not fragmented, but that’s
often not the case.
Keep Only Best Java Memories
Learn More
Get In Touch
@jelastic
info@jelastic.com

More Related Content

What's hot

천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기 - 김준형 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019
천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기 - 김준형 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기 - 김준형 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019
천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기 - 김준형 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019Amazon Web Services Korea
 
AWS BlackBelt Online Seminar 2017 Amazon CloudFront + AWS Lambda@Edge
AWS BlackBelt Online Seminar 2017 Amazon CloudFront + AWS Lambda@EdgeAWS BlackBelt Online Seminar 2017 Amazon CloudFront + AWS Lambda@Edge
AWS BlackBelt Online Seminar 2017 Amazon CloudFront + AWS Lambda@EdgeAmazon Web Services Japan
 
Kubernetes and Nested Containers: Enhanced 3 Ps (Performance, Price and Provi...
Kubernetes and Nested Containers: Enhanced 3 Ps (Performance, Price and Provi...Kubernetes and Nested Containers: Enhanced 3 Ps (Performance, Price and Provi...
Kubernetes and Nested Containers: Enhanced 3 Ps (Performance, Price and Provi...Jelastic Multi-Cloud PaaS
 
Security benefits of the Nitro architecture - SEP401-R - AWS re:Inforce 2019
Security benefits of the Nitro architecture - SEP401-R - AWS re:Inforce 2019 Security benefits of the Nitro architecture - SEP401-R - AWS re:Inforce 2019
Security benefits of the Nitro architecture - SEP401-R - AWS re:Inforce 2019 Amazon Web Services
 
Ceph with CloudStack
Ceph with CloudStackCeph with CloudStack
Ceph with CloudStackShapeBlue
 
Efficient Memory Mapped File I/O for In-Memory File Systems (HotStorage '17)
Efficient Memory Mapped File I/O for In-Memory File Systems (HotStorage '17)Efficient Memory Mapped File I/O for In-Memory File Systems (HotStorage '17)
Efficient Memory Mapped File I/O for In-Memory File Systems (HotStorage '17)Jungsik Choi
 
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017Amazon Web Services Korea
 
Spring boot Under Da Hood
Spring boot Under Da HoodSpring boot Under Da Hood
Spring boot Under Da HoodMichel Schudel
 
IBM Tape Update Dezember18 - TS1160
IBM Tape Update Dezember18 - TS1160IBM Tape Update Dezember18 - TS1160
IBM Tape Update Dezember18 - TS1160Josef Weingand
 
Performance Tuning EC2 Instances
Performance Tuning EC2 InstancesPerformance Tuning EC2 Instances
Performance Tuning EC2 InstancesBrendan Gregg
 
Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17
Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17
Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17Gwen (Chen) Shapira
 
Advanced Reflection in Java
Advanced Reflection in JavaAdvanced Reflection in Java
Advanced Reflection in Javakim.mens
 
Getting Started with Confluent Schema Registry
Getting Started with Confluent Schema RegistryGetting Started with Confluent Schema Registry
Getting Started with Confluent Schema Registryconfluent
 
Lisa 2015-gluster fs-hands-on
Lisa 2015-gluster fs-hands-onLisa 2015-gluster fs-hands-on
Lisa 2015-gluster fs-hands-onGluster.org
 
Tiered Compilation in Hotspot JVM
Tiered Compilation in Hotspot JVMTiered Compilation in Hotspot JVM
Tiered Compilation in Hotspot JVMIgor Veresov
 
Amazon S3 이미지 온디맨드 리사이징을 통한 70% 서버 비용 줄이기 - AWS Summit Seoul 2017
Amazon S3 이미지 온디맨드 리사이징을 통한 70% 서버 비용 줄이기 - AWS Summit Seoul 2017Amazon S3 이미지 온디맨드 리사이징을 통한 70% 서버 비용 줄이기 - AWS Summit Seoul 2017
Amazon S3 이미지 온디맨드 리사이징을 통한 70% 서버 비용 줄이기 - AWS Summit Seoul 2017Amazon Web Services Korea
 
Minio Cloud Storage
Minio Cloud StorageMinio Cloud Storage
Minio Cloud StorageMinio
 
AWS Black Belt Online Seminar 2016 HPC分野でのAWS活用
AWS Black Belt Online Seminar 2016 HPC分野でのAWS活用AWS Black Belt Online Seminar 2016 HPC分野でのAWS活用
AWS Black Belt Online Seminar 2016 HPC分野でのAWS活用Amazon Web Services Japan
 
Deep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesDeep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesAmazon Web Services
 
DevOps - CI/CD 알아보기
DevOps - CI/CD 알아보기DevOps - CI/CD 알아보기
DevOps - CI/CD 알아보기SeungYong Baek
 

What's hot (20)

천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기 - 김준형 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019
천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기 - 김준형 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기 - 김준형 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019
천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기 - 김준형 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019
 
AWS BlackBelt Online Seminar 2017 Amazon CloudFront + AWS Lambda@Edge
AWS BlackBelt Online Seminar 2017 Amazon CloudFront + AWS Lambda@EdgeAWS BlackBelt Online Seminar 2017 Amazon CloudFront + AWS Lambda@Edge
AWS BlackBelt Online Seminar 2017 Amazon CloudFront + AWS Lambda@Edge
 
Kubernetes and Nested Containers: Enhanced 3 Ps (Performance, Price and Provi...
Kubernetes and Nested Containers: Enhanced 3 Ps (Performance, Price and Provi...Kubernetes and Nested Containers: Enhanced 3 Ps (Performance, Price and Provi...
Kubernetes and Nested Containers: Enhanced 3 Ps (Performance, Price and Provi...
 
Security benefits of the Nitro architecture - SEP401-R - AWS re:Inforce 2019
Security benefits of the Nitro architecture - SEP401-R - AWS re:Inforce 2019 Security benefits of the Nitro architecture - SEP401-R - AWS re:Inforce 2019
Security benefits of the Nitro architecture - SEP401-R - AWS re:Inforce 2019
 
Ceph with CloudStack
Ceph with CloudStackCeph with CloudStack
Ceph with CloudStack
 
Efficient Memory Mapped File I/O for In-Memory File Systems (HotStorage '17)
Efficient Memory Mapped File I/O for In-Memory File Systems (HotStorage '17)Efficient Memory Mapped File I/O for In-Memory File Systems (HotStorage '17)
Efficient Memory Mapped File I/O for In-Memory File Systems (HotStorage '17)
 
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
 
Spring boot Under Da Hood
Spring boot Under Da HoodSpring boot Under Da Hood
Spring boot Under Da Hood
 
IBM Tape Update Dezember18 - TS1160
IBM Tape Update Dezember18 - TS1160IBM Tape Update Dezember18 - TS1160
IBM Tape Update Dezember18 - TS1160
 
Performance Tuning EC2 Instances
Performance Tuning EC2 InstancesPerformance Tuning EC2 Instances
Performance Tuning EC2 Instances
 
Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17
Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17
Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17
 
Advanced Reflection in Java
Advanced Reflection in JavaAdvanced Reflection in Java
Advanced Reflection in Java
 
Getting Started with Confluent Schema Registry
Getting Started with Confluent Schema RegistryGetting Started with Confluent Schema Registry
Getting Started with Confluent Schema Registry
 
Lisa 2015-gluster fs-hands-on
Lisa 2015-gluster fs-hands-onLisa 2015-gluster fs-hands-on
Lisa 2015-gluster fs-hands-on
 
Tiered Compilation in Hotspot JVM
Tiered Compilation in Hotspot JVMTiered Compilation in Hotspot JVM
Tiered Compilation in Hotspot JVM
 
Amazon S3 이미지 온디맨드 리사이징을 통한 70% 서버 비용 줄이기 - AWS Summit Seoul 2017
Amazon S3 이미지 온디맨드 리사이징을 통한 70% 서버 비용 줄이기 - AWS Summit Seoul 2017Amazon S3 이미지 온디맨드 리사이징을 통한 70% 서버 비용 줄이기 - AWS Summit Seoul 2017
Amazon S3 이미지 온디맨드 리사이징을 통한 70% 서버 비용 줄이기 - AWS Summit Seoul 2017
 
Minio Cloud Storage
Minio Cloud StorageMinio Cloud Storage
Minio Cloud Storage
 
AWS Black Belt Online Seminar 2016 HPC分野でのAWS活用
AWS Black Belt Online Seminar 2016 HPC分野でのAWS活用AWS Black Belt Online Seminar 2016 HPC分野でのAWS活用
AWS Black Belt Online Seminar 2016 HPC分野でのAWS活用
 
Deep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesDeep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instances
 
DevOps - CI/CD 알아보기
DevOps - CI/CD 알아보기DevOps - CI/CD 알아보기
DevOps - CI/CD 알아보기
 

Similar to Tuning Java Efficiency With Elastic Collectors

Elastic JVM for Scalable Java EE Applications Running in Containers #Jakart...
Elastic JVM  for Scalable Java EE Applications  Running in Containers #Jakart...Elastic JVM  for Scalable Java EE Applications  Running in Containers #Jakart...
Elastic JVM for Scalable Java EE Applications Running in Containers #Jakart...Jelastic Multi-Cloud PaaS
 
Choosing Right Garbage Collector to Increase Efficiency of Java Memory Usage
Choosing Right Garbage Collector to Increase Efficiency of Java Memory UsageChoosing Right Garbage Collector to Increase Efficiency of Java Memory Usage
Choosing Right Garbage Collector to Increase Efficiency of Java Memory UsageJelastic Multi-Cloud PaaS
 
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Anna Shymchenko
 
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java VersionsTWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java VersionsJoseph Kuo
 
Performance tuning jvm
Performance tuning jvmPerformance tuning jvm
Performance tuning jvmPrem Kuppumani
 
Software Profiling: Java Performance, Profiling and Flamegraphs
Software Profiling: Java Performance, Profiling and FlamegraphsSoftware Profiling: Java Performance, Profiling and Flamegraphs
Software Profiling: Java Performance, Profiling and FlamegraphsIsuru Perera
 
Software Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in JavaSoftware Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in JavaIsuru Perera
 
Java and Containers - Make it Awesome !
Java and Containers - Make it Awesome !Java and Containers - Make it Awesome !
Java and Containers - Make it Awesome !Dinakar Guniguntala
 
Mastering java in containers - MadridJUG
Mastering java in containers - MadridJUGMastering java in containers - MadridJUG
Mastering java in containers - MadridJUGJorge Morales
 
Jvm problem diagnostics
Jvm problem diagnosticsJvm problem diagnostics
Jvm problem diagnosticsDanijel Mitar
 
Java 어플리케이션 성능튜닝 Part1
Java 어플리케이션 성능튜닝 Part1Java 어플리케이션 성능튜닝 Part1
Java 어플리케이션 성능튜닝 Part1상욱 송
 
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Anna Shymchenko
 
Running Java Applications inside Kubernetes with Nested Container Architectur...
Running Java Applications inside Kubernetes with Nested Container Architectur...Running Java Applications inside Kubernetes with Nested Container Architectur...
Running Java Applications inside Kubernetes with Nested Container Architectur...Jelastic Multi-Cloud PaaS
 
7-JVM-arguments-JaxLondon-2023.pptx
7-JVM-arguments-JaxLondon-2023.pptx7-JVM-arguments-JaxLondon-2023.pptx
7-JVM-arguments-JaxLondon-2023.pptxTier1 app
 
7 jvm-arguments-Confoo
7 jvm-arguments-Confoo7 jvm-arguments-Confoo
7 jvm-arguments-ConfooTier1 app
 
Master your java_applications_in_kubernetes
Master your java_applications_in_kubernetesMaster your java_applications_in_kubernetes
Master your java_applications_in_kubernetesAndy Moncsek
 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderIsuru Perera
 
JVM Performance Tuning
JVM Performance TuningJVM Performance Tuning
JVM Performance TuningJeremy Leisy
 
Jvm Performance Tunning
Jvm Performance TunningJvm Performance Tunning
Jvm Performance Tunningguest1f2740
 

Similar to Tuning Java Efficiency With Elastic Collectors (20)

Elastic JVM for Scalable Java EE Applications Running in Containers #Jakart...
Elastic JVM  for Scalable Java EE Applications  Running in Containers #Jakart...Elastic JVM  for Scalable Java EE Applications  Running in Containers #Jakart...
Elastic JVM for Scalable Java EE Applications Running in Containers #Jakart...
 
Choosing Right Garbage Collector to Increase Efficiency of Java Memory Usage
Choosing Right Garbage Collector to Increase Efficiency of Java Memory UsageChoosing Right Garbage Collector to Increase Efficiency of Java Memory Usage
Choosing Right Garbage Collector to Increase Efficiency of Java Memory Usage
 
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
 
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java VersionsTWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions
 
Performance tuning jvm
Performance tuning jvmPerformance tuning jvm
Performance tuning jvm
 
Software Profiling: Java Performance, Profiling and Flamegraphs
Software Profiling: Java Performance, Profiling and FlamegraphsSoftware Profiling: Java Performance, Profiling and Flamegraphs
Software Profiling: Java Performance, Profiling and Flamegraphs
 
Software Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in JavaSoftware Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in Java
 
Jvm Architecture
Jvm ArchitectureJvm Architecture
Jvm Architecture
 
Java and Containers - Make it Awesome !
Java and Containers - Make it Awesome !Java and Containers - Make it Awesome !
Java and Containers - Make it Awesome !
 
Mastering java in containers - MadridJUG
Mastering java in containers - MadridJUGMastering java in containers - MadridJUG
Mastering java in containers - MadridJUG
 
Jvm problem diagnostics
Jvm problem diagnosticsJvm problem diagnostics
Jvm problem diagnostics
 
Java 어플리케이션 성능튜닝 Part1
Java 어플리케이션 성능튜닝 Part1Java 어플리케이션 성능튜닝 Part1
Java 어플리케이션 성능튜닝 Part1
 
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
 
Running Java Applications inside Kubernetes with Nested Container Architectur...
Running Java Applications inside Kubernetes with Nested Container Architectur...Running Java Applications inside Kubernetes with Nested Container Architectur...
Running Java Applications inside Kubernetes with Nested Container Architectur...
 
7-JVM-arguments-JaxLondon-2023.pptx
7-JVM-arguments-JaxLondon-2023.pptx7-JVM-arguments-JaxLondon-2023.pptx
7-JVM-arguments-JaxLondon-2023.pptx
 
7 jvm-arguments-Confoo
7 jvm-arguments-Confoo7 jvm-arguments-Confoo
7 jvm-arguments-Confoo
 
Master your java_applications_in_kubernetes
Master your java_applications_in_kubernetesMaster your java_applications_in_kubernetes
Master your java_applications_in_kubernetes
 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight Recorder
 
JVM Performance Tuning
JVM Performance TuningJVM Performance Tuning
JVM Performance Tuning
 
Jvm Performance Tunning
Jvm Performance TunningJvm Performance Tunning
Jvm Performance Tunning
 

More from Jelastic Multi-Cloud PaaS

Running Projects in Application Containers, System Containers & VMs - Jelasti...
Running Projects in Application Containers, System Containers & VMs - Jelasti...Running Projects in Application Containers, System Containers & VMs - Jelasti...
Running Projects in Application Containers, System Containers & VMs - Jelasti...Jelastic Multi-Cloud PaaS
 
MariaDB Auto-Clustering, Vertical and Horizontal Scaling within Jelastic PaaS
MariaDB Auto-Clustering, Vertical and Horizontal Scaling within Jelastic PaaSMariaDB Auto-Clustering, Vertical and Horizontal Scaling within Jelastic PaaS
MariaDB Auto-Clustering, Vertical and Horizontal Scaling within Jelastic PaaSJelastic Multi-Cloud PaaS
 
Scaling Jakarta EE Applications Vertically and Horizontally with Jelastic PaaS
Scaling Jakarta EE Applications Vertically and Horizontally with Jelastic PaaSScaling Jakarta EE Applications Vertically and Horizontally with Jelastic PaaS
Scaling Jakarta EE Applications Vertically and Horizontally with Jelastic PaaSJelastic Multi-Cloud PaaS
 
WordPress Cluster for Enterprise High-Availability and On-Demand Scaling
WordPress Cluster for Enterprise High-Availability and On-Demand ScalingWordPress Cluster for Enterprise High-Availability and On-Demand Scaling
WordPress Cluster for Enterprise High-Availability and On-Demand ScalingJelastic Multi-Cloud PaaS
 
SaaSification in Action. Attracting Software Vendors with Easy Transformation
SaaSification in Action. Attracting Software Vendors with Easy TransformationSaaSification in Action. Attracting Software Vendors with Easy Transformation
SaaSification in Action. Attracting Software Vendors with Easy TransformationJelastic Multi-Cloud PaaS
 
State of the Art UI - Overview of Jelastic PaaS Functionality
State of the Art UI - Overview of Jelastic PaaS FunctionalityState of the Art UI - Overview of Jelastic PaaS Functionality
State of the Art UI - Overview of Jelastic PaaS FunctionalityJelastic Multi-Cloud PaaS
 
How to Make Money Solving 5 Major Problems of Cloud Hosting Customers
How to Make Money Solving 5 Major Problems of Cloud Hosting CustomersHow to Make Money Solving 5 Major Problems of Cloud Hosting Customers
How to Make Money Solving 5 Major Problems of Cloud Hosting CustomersJelastic Multi-Cloud PaaS
 
Multi-Cloud Lightweight Platform as a Service
Multi-Cloud Lightweight Platform as a ServiceMulti-Cloud Lightweight Platform as a Service
Multi-Cloud Lightweight Platform as a ServiceJelastic Multi-Cloud PaaS
 
From VMs to Containers: Decompose and Migrate Old Legacy JavaEE Application
From VMs to Containers: Decompose and Migrate Old Legacy JavaEE ApplicationFrom VMs to Containers: Decompose and Migrate Old Legacy JavaEE Application
From VMs to Containers: Decompose and Migrate Old Legacy JavaEE ApplicationJelastic Multi-Cloud PaaS
 
Automating CICD Pipeline with GitLab and Docker Containers for Java Applications
Automating CICD Pipeline with GitLab and Docker Containers for Java ApplicationsAutomating CICD Pipeline with GitLab and Docker Containers for Java Applications
Automating CICD Pipeline with GitLab and Docker Containers for Java ApplicationsJelastic Multi-Cloud PaaS
 
Automated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsAutomated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsJelastic Multi-Cloud PaaS
 
Cloud Hosting Business in Africa: Market Specifics and Ways to Grow
Cloud Hosting Business in Africa: Market Specifics and Ways to GrowCloud Hosting Business in Africa: Market Specifics and Ways to Grow
Cloud Hosting Business in Africa: Market Specifics and Ways to GrowJelastic Multi-Cloud PaaS
 
Automated scaling of microservice stacks for JavaEE applications - JEEConf 2017
Automated scaling of microservice stacks for JavaEE applications - JEEConf 2017Automated scaling of microservice stacks for JavaEE applications - JEEConf 2017
Automated scaling of microservice stacks for JavaEE applications - JEEConf 2017Jelastic Multi-Cloud PaaS
 
Jelastic DevOps Platform Product Overview for Service Providers
Jelastic DevOps Platform Product Overview for Service ProvidersJelastic DevOps Platform Product Overview for Service Providers
Jelastic DevOps Platform Product Overview for Service ProvidersJelastic Multi-Cloud PaaS
 
Auto Scaling for Multi-Tier Containers Topology
Auto Scaling for Multi-Tier Containers TopologyAuto Scaling for Multi-Tier Containers Topology
Auto Scaling for Multi-Tier Containers TopologyJelastic Multi-Cloud PaaS
 
Jelastic DevOps Platform Product Overview for ISVs
Jelastic DevOps Platform Product Overview for ISVsJelastic DevOps Platform Product Overview for ISVs
Jelastic DevOps Platform Product Overview for ISVsJelastic Multi-Cloud PaaS
 
Онлайн миграция контейнеров. Взгляд изнутри
Онлайн миграция контейнеров. Взгляд изнутриОнлайн миграция контейнеров. Взгляд изнутри
Онлайн миграция контейнеров. Взгляд изнутриJelastic Multi-Cloud PaaS
 
Jelastic - DevOps PaaS Business with Docker Support for Service Providers
Jelastic - DevOps PaaS Business with Docker Support for Service ProvidersJelastic - DevOps PaaS Business with Docker Support for Service Providers
Jelastic - DevOps PaaS Business with Docker Support for Service ProvidersJelastic Multi-Cloud PaaS
 

More from Jelastic Multi-Cloud PaaS (20)

Running Projects in Application Containers, System Containers & VMs - Jelasti...
Running Projects in Application Containers, System Containers & VMs - Jelasti...Running Projects in Application Containers, System Containers & VMs - Jelasti...
Running Projects in Application Containers, System Containers & VMs - Jelasti...
 
MariaDB Auto-Clustering, Vertical and Horizontal Scaling within Jelastic PaaS
MariaDB Auto-Clustering, Vertical and Horizontal Scaling within Jelastic PaaSMariaDB Auto-Clustering, Vertical and Horizontal Scaling within Jelastic PaaS
MariaDB Auto-Clustering, Vertical and Horizontal Scaling within Jelastic PaaS
 
Scaling Jakarta EE Applications Vertically and Horizontally with Jelastic PaaS
Scaling Jakarta EE Applications Vertically and Horizontally with Jelastic PaaSScaling Jakarta EE Applications Vertically and Horizontally with Jelastic PaaS
Scaling Jakarta EE Applications Vertically and Horizontally with Jelastic PaaS
 
WordPress Cluster for Enterprise High-Availability and On-Demand Scaling
WordPress Cluster for Enterprise High-Availability and On-Demand ScalingWordPress Cluster for Enterprise High-Availability and On-Demand Scaling
WordPress Cluster for Enterprise High-Availability and On-Demand Scaling
 
SaaSification in Action. Attracting Software Vendors with Easy Transformation
SaaSification in Action. Attracting Software Vendors with Easy TransformationSaaSification in Action. Attracting Software Vendors with Easy Transformation
SaaSification in Action. Attracting Software Vendors with Easy Transformation
 
State of the Art UI - Overview of Jelastic PaaS Functionality
State of the Art UI - Overview of Jelastic PaaS FunctionalityState of the Art UI - Overview of Jelastic PaaS Functionality
State of the Art UI - Overview of Jelastic PaaS Functionality
 
How to Make Money Solving 5 Major Problems of Cloud Hosting Customers
How to Make Money Solving 5 Major Problems of Cloud Hosting CustomersHow to Make Money Solving 5 Major Problems of Cloud Hosting Customers
How to Make Money Solving 5 Major Problems of Cloud Hosting Customers
 
Multi-Cloud Lightweight Platform as a Service
Multi-Cloud Lightweight Platform as a ServiceMulti-Cloud Lightweight Platform as a Service
Multi-Cloud Lightweight Platform as a Service
 
From VMs to Containers: Decompose and Migrate Old Legacy JavaEE Application
From VMs to Containers: Decompose and Migrate Old Legacy JavaEE ApplicationFrom VMs to Containers: Decompose and Migrate Old Legacy JavaEE Application
From VMs to Containers: Decompose and Migrate Old Legacy JavaEE Application
 
Automating CICD Pipeline with GitLab and Docker Containers for Java Applications
Automating CICD Pipeline with GitLab and Docker Containers for Java ApplicationsAutomating CICD Pipeline with GitLab and Docker Containers for Java Applications
Automating CICD Pipeline with GitLab and Docker Containers for Java Applications
 
Automated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsAutomated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE Applications
 
Cloud Hosting Business in Africa: Market Specifics and Ways to Grow
Cloud Hosting Business in Africa: Market Specifics and Ways to GrowCloud Hosting Business in Africa: Market Specifics and Ways to Grow
Cloud Hosting Business in Africa: Market Specifics and Ways to Grow
 
Automated scaling of microservice stacks for JavaEE applications - JEEConf 2017
Automated scaling of microservice stacks for JavaEE applications - JEEConf 2017Automated scaling of microservice stacks for JavaEE applications - JEEConf 2017
Automated scaling of microservice stacks for JavaEE applications - JEEConf 2017
 
Jelastic DevOps Platform Product Overview for Service Providers
Jelastic DevOps Platform Product Overview for Service ProvidersJelastic DevOps Platform Product Overview for Service Providers
Jelastic DevOps Platform Product Overview for Service Providers
 
Auto Scaling for Multi-Tier Containers Topology
Auto Scaling for Multi-Tier Containers TopologyAuto Scaling for Multi-Tier Containers Topology
Auto Scaling for Multi-Tier Containers Topology
 
Jelastic DevOps Platform Product Overview for ISVs
Jelastic DevOps Platform Product Overview for ISVsJelastic DevOps Platform Product Overview for ISVs
Jelastic DevOps Platform Product Overview for ISVs
 
DevOps Epoch 2016
DevOps Epoch 2016DevOps Epoch 2016
DevOps Epoch 2016
 
Онлайн миграция контейнеров. Взгляд изнутри
Онлайн миграция контейнеров. Взгляд изнутриОнлайн миграция контейнеров. Взгляд изнутри
Онлайн миграция контейнеров. Взгляд изнутри
 
Jelastic - DevOps PaaS Business with Docker Support for Service Providers
Jelastic - DevOps PaaS Business with Docker Support for Service ProvidersJelastic - DevOps PaaS Business with Docker Support for Service Providers
Jelastic - DevOps PaaS Business with Docker Support for Service Providers
 
Jelastic Turnkey Cloud PaaS for Developers
Jelastic Turnkey Cloud PaaS for DevelopersJelastic Turnkey Cloud PaaS for Developers
Jelastic Turnkey Cloud PaaS for Developers
 

Recently uploaded

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Recently uploaded (20)

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

Tuning Java Efficiency With Elastic Collectors

  • 1. A STATE OF JAVA ELASTICITY Tuning Java Efficiency
  • 2. About Speaker ● Ruslan Synytsky ● CEO and co-founder of Jelastic PaaS ● Java Champion ● Two-times Duke’s Choice Award Winner ● Former lead of engineering team at National Data Center (NDC) at National Space Agency of Ukraine ● @siruslan
  • 3. Agenda ● Java Memory Usage Problems and Use Cases ● Recent Improvements in OpenJDK ● Testing Elasticity with Different Garbage Collectors ● Upcoming Improvements in OpenJDK
  • 4. Unreleased Heap Memory The Problem Symptoms Over-Allocation and Underutilization
  • 5. Java Memory Usage Pain Points Q: Return memory from JVM to OS Q: Java VM - does the freed memory return to the OS? Q: More flexible memory management Q: Force JVM to free memory Q: Why Java does not release memory? Q: Does GC release back memory to OS? Q: Why does this java process not release memory? ...
  • 6. Large Java Memory Requirements WHAT IS THE MOST CHALLENGING ASPECT OF WORKING WITH JAVA EE? Jakarta EE Developer Survey 2018 “The most widely acknowledged issue when employing with Java EE is large memory requirements (40%)”
  • 7. Reasons to Seek Java Elasticity Getting resources from common Desktop Applications, IDEs Scheduled tasks for data processing Cloud cost saving with pay-per-use NEED FOR ELASTICITY Automated scaling of resources on the fly without JVM restart and downtimes Dynamic stateful workloads Right-sizing problem with containers
  • 8. Transition from Monolith to Microservices
  • 9. Resource Limit vs Real Usage in VM
  • 10. Resource Limit vs Real Usage in Container
  • 11. Elasticy Use Case in the Cloud
  • 12. Elasticy Use Case in the Cloud Pool of Resources
  • 13. Elasticy Use Case in the Cloud
  • 14. Elasticy Use Case in the Cloud
  • 15. Elasticy Use Case in the Cloud
  • 16. Elasticy Use Case in the Cloud
  • 17. Real Statistics of Resource Consumption with Containers
  • 18. Using automatic vertical scaling, cloud provides can offer economically advantageous pricing based on the actual resource consumption Forbes - Deceptive Cloud Efficiency: Do You Really Pay As You Use? Pay-As-You-Go Pay-per-Use Pay-As-You-Go vs Pay-per-Use
  • 20. Understanding JVM Footprint MAXIMUM MEMORY USAGE [-Xmx] + [-XX:MaxMetaspaceSize] + [-XX:MaxDirectMemorySize] + Num_Of_Threads * [-Xss] Useful discussion at SoW Java using much more memory than heap size and presentation Memory Footprint of a Java Process
  • 21. -Xmx=[25% of OS Total Memory] Useful options to adjust defaults in % -XX:MaxRAMPercentage -XX:MaxMetaspaceSize=[unlimited] -XX:MaxDirectMemorySize=[-Xmx] -Xss[1m] Alternative syntax -XX:ThreadStackSize=[1m] Specify these options explicitly if you face related OutOfMemoryError Default Limits (Depend on The Platform!)
  • 22. Understanding of the OutOfMemoryError Exceptions OutOfMemoryError exception is usually thrown when there is insufficient space to allocate an object in the Java heap or insufficient native memory to support the loading of a Java class https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/memleaks002.html ● java.lang.OutOfMemoryError: Java heap space ● java.lang.OutOfMemoryError: GC Overhead limit exceeded ● java.lang.OutOfMemoryError: Requested array size exceeds VM limit ● java.lang.OutOfMemoryError: Metaspace ● java.lang.OutOfMemoryError: Compressed class space ● java.lang.OutOfMemoryError: reason stack_trace_with_native_method ● java.lang.OutOfMemoryError: request size bytes for reason. Out of swap space?
  • 23. An Example of OutOfMemoryError Exception Used Heap > Xmx
  • 24. An Example of OOM Killer Situation (Even Worse) oom_kill is a job that helps to sacrifice one or more processes in order to free up memory for the system
  • 25. The Heap Vertical Scaling Problem Symptoms Unreleased Heap Memory
  • 26. Calling Full GC Periodically (Workaround) https://github.com/jelastic-jps/java-memory-agent As compacting GC cycles are not triggered automatically, we execute them explicitly by injecting an agent which monitors the memory usage and calls System.gc() periodically: -javaagent:jelastic-gc-agent.jar=period=300,debug=true Consider enabling -XX:+ExplicitGCInvokesConcurrent
  • 27. G1 and Full GC java -XX:+UseG1GC -Xmx2g -jar app.jar https://github.com/jelastic/java-vertical-scaling-test
  • 28. Simple Jenkins Example After Full GC call initiated by Jelastic GC agent the memory consumption goes down to 0.5G. If we disable the agent then the memory usage at the idle JVM will stay at 3G forever which is a significant waste of resources. If you put additional load on Jenkins the picture will look even worse. Container limit - 8G, max heap limit (Xmx) - 6.5G and the memory consumption after the simple initial sign in action goes to 3G.
  • 29. Timely Reduce Unused Committed Memory (JEP 346) Make the G1 garbage collector automatically give back Java heap memory to the operating system when idle ● -XX:G1PeriodicGCInterval=[milliseconds] ● -XX:G1PeriodicGCSystemLoadThreshold=[float] ● -XX:+G1PeriodicGCInvokesConcurrent JEP 346: Promptly Return Unused Committed Memory from G1 java -Xmx2g -XX:+UseG1GC -XX:G1PeriodicGCInterval=900k -XX:G1PeriodicGCSystemLoadThreshold=0.6 -jar app.jar Available from Java 12
  • 30. Immediately Improved Heap Elasticity Automatically Released Heap
  • 32. G1PeriodicGCSystemLoadThreshold in Docker Container Using LXCFS to Improve Container Resource Visibility For getting correct loadavg while running in Docker container use https://github.com/lxc/lxcfs/
  • 36. G1 Collector (-XX:+UseG1GC) The Garbage-First (G1) is a server-style Garbage Collector for multiprocessor machines with a large amount of memory. The heap is partitioned into fixed-sized regions and G1 tracks the live data in those regions. When Garbage Collection is required, it collects from the regions with less live data first. ● 2004, Sun Microsystems JEP 346: Promptly Return Unused Committed Memory from G1
  • 37. G1 -Xmx3g -XX:+UseCompressedOops -XX:+UseG1GC -XX:G1PeriodicGCInterval=1k
  • 38. Shenandoah GC (-XX:+UseShenandoahGC) Shenandoah GC is a concurrent garbage collector for the JVM. GC tries to perform most of the activities in parallel without interrupting application performance. Such parallelism makes “stop-the-world” (STW) pauses extremely short. Another inherent advantage is an efficient work with small and large heaps with no impact on STW pauses’ length. ● 2014, Christine H. Flood, Red Hat https://wiki.openjdk.java.net/display/shenandoah/Main#Main-Heuristics
  • 39. -Xmx3g -XX:+UseCompressedOops -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact Shenandoah
  • 40. ZGC (-XX:+UseZGC) ZGC is low latency scalable garbage collector. Designed for use with applications that require a large heap and low latency. It uses a bunch of one generation and performs most (but not all) garbage collection in parallel with uninterrupted application work. This greatly limits the impact of garbage collection on your application response time. ● 2018, Per Liden, Oracle JEP 351: ZGC: Uncommit Unused Memory - available from JDK 13 Release
  • 41. -Xmx3g -XX:+UseZGC -XX:ZUncommitDelay=1 -XX:ZCollectionInterval=30 ZGC @ Oracle OpenJDK
  • 42. C4 (-XX:+UseZST) The C4 (Continuously Concurrent Compacting Collector) is an updated generational form of the Azul Pauseless GC Algorithm and is the default collector of Zing®. C4 differentiates itself from other generational garbage collectors by supporting simultaneous – generational concurrency: the different generations are collected using concurrent (non-stop-the-world) mechanisms that can be simultaneously and independently active. Unlike other algorithms, it is not ‘mostly’ concurrent, but fully concurrent, so it never falls back to a stop-the-world compaction. ● 2010, Gil Tene, Azul Systems
  • 43. -Xmx500m -XX:+UseZST C4 @ Zing pmem.conf -> cgroups enabled
  • 44. ConcMarkSweep GC (-XX:+UseConcMarkSweepGC) ConcMarkSweep GC collector is designed for applications that prefer shorter garbage collection pauses and which can afford to share processor resources with the garbage collector while the application is running. It makes sense to use such a collector when applications requirements for time garbage collection pauses are low. ● 2004, Sun Microsystems
  • 45. -Xmx3g -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC + 4 calls of Full GC via jcmd <pid> GC.run ConcMarkSweep (Deprecated since Java 9) Consider using -XX:-ShrinkHeapInSteps
  • 46. Serial GC (-XX:+UseSerialGC) Serial GC performs garbage collection in a single thread and has the lowest consumption of memory among all GC types but, at the same time, it makes long pauses that can lead to application performance degradation. ● 2004, Sun Microsystems
  • 47. -Xmx3g -XX:+UseCompressedOops -XX:+UseSerialGC + 4 calls of Full GC via jcmd <pid> GC.run Serial Consider using -XX:-ShrinkHeapInSteps
  • 48. OpenJ9 OpenJ9 uses the Generational Concurrent (-Xgcpolicy:gencon) policy by default, which is best suited to transactional applications that have many short lived objects. Alternative policies are available, including those that cater for applications with large Java heaps (-Xgcpolicy:balanced), applications that are sensitive to response-time (-Xgcpolicy:metronome), or applications that require high application throughput (-Xgcpolicy:optthruput). ● 2017, Eclipse Foundation
  • 49. -Xmx3g -XX:+UseCompressedOops -XX:+IdleTuningCompactOnIdle -XX:+IdleTuningGcOnIdle -XX:IdleTuningMinIdleWaitTime=1 -Xjit:waitTimeToEnterDeepIdleMode=1000 Bash command to check the real usage while true do pid=$(pgrep -f java | tail -n1) used=$(ps -orss --no-headers --pid $pid) echo "scale=2 ; $used / 1024/1024" | bc sleep 1 done OpenJ9 (Not Enough Tuning and Testing Experience*) Inconsistent behaviour with -XX:+IdleTuningGcOnIdle, mem not released back to OS on Idle
  • 50. Parallel GC (-XX:+UseParallelGC) Parallel GC is a “stop-the-world” multithreaded Garbage Collector similar to the serial collector. The primary difference is that multiple threads are used to speed up garbage collection. By default, both minor and major collections are executed in parallel to further reduce garbage collection costs. ● 2000, Sun Microsystems
  • 51. -Xmx3g -XX:+UseCompressedOops -XX:+UseParallelGC + periodical jcmd <pid> GC.run Parallel
  • 52. Main Points of Elastic Vertical Scaling A - initial usage B - maximum usage C - growth speed D - duration before release E - release speed F - minimum usage after release Different GCs provide different results and fine tuning options
  • 53. Running GC Tests in Kubernetes
  • 54. Auto Testing Package for Kubernetes https://github.com/jelastic/java-vertical-scaling-test/blob/master/manifest-k8s.yaml
  • 55. Load Testing Logic java [OPTIONS] -jar app.jar <sleep> <mode> where sleep - 100 mode - 2 https://github.com/jelastic/java-vertical-scaling-test/blob/ma ster/src/com/jelastic/verticalscaling/Load.java#L64
  • 58. ZGC @ Oracle OpenJDK in Kubernetes
  • 59. Joint Comparison - Several Load Cycles RAM CPU
  • 60. Running GC Tests with Jakarta EE
  • 61. ● simple .war artifact deployed with GlassFish 5 ● JSP that sets 1MB attribute in session ● 1 min session timeout ● https://github.com/jelastic/java-vertical-scaling-test/tree/payara/web app Load Testing Logic Load test GETs webapp endpoint n times for i in {1..n}; do curl -s localhost:8080 > /dev/null; done
  • 62. GlassFish with Shenandoah -Xmx3g -XX:+UseCompressedOops -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact for i in {1..1000}; do curl -s localhost:8080 > /dev/null; done
  • 64. Dynamic Max Heap Resizing - Solving Right Sizing Problem Restart for Xmx Resize
  • 65. -XX:SoftMaxHeapSize @ ZGC SoftMaxHeapSize is set for the GC to strive not to grow heap size beyond the specified size unless it is highly needed: ● to keep the heap footprint down, while maintaining the capability to deal with a temporary increase in heap space requirement ● with lots of margin, to increase confidence that you will not run into an allocation stall because of an unforeseen increase in allocation rate Using -XX:SoftMaxHeapSize
  • 66. -XX:G1PeriodicGCInterval and -XX:SoftMaxHeapSize G1PeriodicGCInterval (G1) / ZCollectionInterval (ZGC) is a time-based solution which has no direct impact on how much the heap will grow during the given interval. SoftMaxHeapSize is a size-based solution which controls how large the heap can grow, but has no direct relation with uncommit (returning unused memory back to OS) Both options can be used, whichever condition is met first will trigger a GC. ZGC (Java13+) https://bugs.openjdk.java.net/browse/JDK-8222181 G1, Shenandoah (TBD) https://bugs.openjdk.java.net/browse/JDK-8236073
  • 67. -Xsoftmx @ OpenJ9 https://www.ibm.com/support/knowledgecenter/en/SSYKE2_8.0.0/openj9/xsoftmx/index.html Runtime adjustable heap size (-Xsoftmx) allows to adjust heap size dynamically and take advantage of hot-add of memory. You can set this option on the command line, then modify it at run time by using the com.ibm.lang.management.MemoryMXBean.setMaxHeapSize(). This option can be useful in virtualized or cloud environments, for example, where the available memory might change dynamically to meet business needs. By default, -Xsoftmx is set to the same value as -Xmx.
  • 68. C4 is fully elastic and can return all empty pages to the OS after each GC cycle. However, C4 sticks to the Xmx it was given, and avoid doing heavy elastic memory dance, since relinquishing memory mappings and reestablishing them on Linux kernels is bandwidth-limited in practice by the rate of page mapping invalidation the kernel can handle. C4 goes above Xmx rather than go between Xms and Xmx. JavaMemMax option controls the true maximum. In the future it will allow both scenarios where above-Xmx is allowed and where above-Xmx is prohibited. Two modes: ● Contingency (default mode) - goes above Xmx if it absolutely has to and will work hard to collect and stay below Xmx. ● Insurance (best effort elasticity) - borrows available memory and goes above Xmx in order to delay GC whenever possible. JavaMemMax @ С4 + ZST (Zing System Tools)
  • 69. Xmx can be set higher than the Container Limit. Also both SoftMaxHeapSize and Container Limit can be adjusted on the fly without the need to restart JVM or container. At the moment the heap size can go beyond SoftMaxHeapSize and there is no guarantee on how much the heap will grow other than up to Xmx. The problem arises when Used Heap comes close to Container Limit. Most likely the JVM will be killed by the OOM Killer as it exceeds the amount of memory available in the container. JEP Draft: Dynamic Max Memory Limit @ G1 We can introduce manageable HardMaxHeapSize. In this case JVM will throw OOM Error (losing one operation) instead of OOM Kill (losing whole JVM). Xmx Container Limit SoftMaxHeapSize
  • 70. JEP 387: Elastic Metaspace (Target Release Java 16) To deal with potential problems involving virtual memory fragmentation or uncommit speed, we will add a new production command-line option to control metaspace reclamation behavior: -XX:MetaspaceReclaimPolicy=(balanced|aggressive|none) ■ balanced: Most applications should see an improvement in metaspace memory footprint while the negative effects of memory reclamation should be marginal. This mode is the default, and aims for backward compatibility. ■ 'aggressive': Offers increased memory-reclamation rates at the cost of increased virtual-memory fragmentation. ■ 'none': Disables memory reclamation altogether. Applications that use many small class loaders may suffer from unreasonably high metaspace usage. Applications with heavy class loading and unloading activity can thus accrue a lot of unused space in the metaspace freelists. That space can be returned to the operating system to be used for other purposes if it is not fragmented, but that’s often not the case.
  • 71. Keep Only Best Java Memories Learn More Get In Touch @jelastic info@jelastic.com