SlideShare une entreprise Scribd logo
1  sur  93
Télécharger pour lire hors ligne
<Insert Picture Here>

Introduction of Java GC Tuning and Java
Java Mission Control
Leon Chen (陳逸嘉)
Principal Sales Consultant
Oracle
The following is intended to outline our general
product direction. It is intended for information
purposes only, and may not be incorporated into any
contract. It is not a commitment to deliver any
material, code, or functionality, and should not be
relied upon in making purchasing decisions.
The development, release, and timing of any
features or functionality described for Oracle’s
products remains at the sole discretion of Oracle.
Leon Chen (陳逸嘉)

• More than 14 years in Java/JEE, as programmer,
architect, leader and consultant, in finance/telecom
domain.
•
•
•
•
•

工研院
得捷
新光人壽
Ericsson
Oracle
• TW Patent 182927, 一種文章切割方法, 2003, 陳逸嘉, 林一中
• TW Patent 206819, 自動服務組合方法及系統, 2004, 陳逸嘉, 許
維德, 洪鵬翔
• US Patent 7,617,174, Method and system for automatic
service composition, 2009, Leon Chen, Wei-Tek Hsu, PengHsiang Hung
Java Roadmap
JRockit

Hotspot
HotRockit

(JDK7_update 40 almost; JDK 8, 2014 暫定)
Java SE Roadmap

JDK 8 (Q1 2014)
7u40

7u21
• Java Client Security Enhancements
• App Store Packaging tools

• Java Flight Recorder
• Java Mission Control 5.2
• Java Discovery Protocol
• Native memory tracking
• Local Security Policy

2013

• Lambda
• JVM Convergence
• JavaScript Interop
• JavaFX 8
• 3D API
• Java SE Embedded support
• Enhanced HTML5 support

JDK 9
• Modularity – Jigsaw
• Interoperability
• Cloud
• Ease of Use
• JavaFX JSR
• Optimizations

JDK 8u40

2014

2015

2016

NetBeans IDE 7.3

NetBeans IDE 8

JDK 8u20

NetBeans IDE 9

• New hints and refactoring
• Scene Builder Support

• JDK 8 support
• Scene Builder 2.0 support

• Deterministic G1
• Java Mission Control 6.0
• Improved JRE installer
• App bundling
enhancements

• JDK 9 support
• Scene Builder 3.0 support

Scene Builder 2.0
Scene Builder 1.1
• Linux support

• JavaFX 8 support
• Enhanced Java IDE support

Scene Builder 3.0
• JavaFX 9 support
JVM GC Tuning
32-bit VS. 64-bit
• 32-bit
• For heap sizes up to 2.5G/3G or so

• 64-bit
• Windows/Linux: different JVM, Solaris: add -d64
• -XX:+UseCompressedOops (default JDK6_23+)
• Compressed references: 32GB Max (26GB best)
• -Xmx: 26G (compressed) / unlimited (regular)

• 32-bit  64-bit migration
• Higher heap size requirements (around 20%)
• Slight throughput impact (without compressed refs)

• 64-bit preferred for today’s servers
• Only option starting with Fusion Middleware 12c
Java Memory Management

Reference video: http://www.youtube.com/watch?v=VQ4eZw6eVtQ
class Test {
private List<User> userList =
new ArrayList<User>();
…
public void execute() {
User user = new User();
userList.add(user);
…
user = null;
//No use
}
…

}
Tracing GC Example
Runtime
Stack

Hea
p
A

G

D

B

C

K

H

E

I

L

F

J

M
Tracing GC Example
Runtime
Stack

Hea
p
A

G

D

B

C

K

H

E

I

L

F

J

M
Tracing GC Example
Runtime
Stack

Heap
A

G

D
B

C

K

H

E

I

L

F

J

M
Tracing GC Example
Runtime
Stack

Heap
A

G

D
B

C

K

H

E

I

L

F

J

M
Tracing GC Example
Runtime
Stack

Heap
A

G

D

H

E

I

L

F

B

C

J

M

We identified all reachable objects. We can deduce that
the rest are unreachable and, therefore, dead.

K
Tracing GC Example
Runtime
Stack

Heap
A

C

K
H

B

E

I

We identified all reachable objects. We can deduce that
the rest are unreachable and, therefore, dead.

L
Garbage Collection
我真的需要花時間去
Tune GC 嗎?
Introduction of Java GC Tuning and Java Java Mission Control
花太多時間做 GC → Performance變慢
Performance變慢→花太多時間做 GC

不一定!!!
JVM Performance Tuning
Performance Tuning Process

Oracle confidential; Pending legal review
GC Logging in Production
• Don’t be afraid to enable GC logging in production
– Very helpful when diagnosing production issues

• Extremely low / non-existent overhead
– Maybe some large files in your file system.
– We are surprised that customers are still afraid to enable it
If Someone doesn’t enable

GC logging in production

I shoot them!
Most Important GC Logging Parameters
• You need at least:
– -XX:+PrintGCTimeStamps
• Add -XX:+PrintGCDateStamps if you must know the time
– -XX:+PrintGCDetails
• Preferred over -verbosegc as it's more detailed

• Also useful:
– -Xloggc:<file>
– Rotate GC Log, After Java 1.6_34 (or 1.7_2):
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=5
-XX:GCLogFileSize=10M
JVM Performance Tuning
GCViewer – Offline analysis of GC logs
https://github.com/chewiebug/GCViewer
JVM Performance Tuning
GCViewer – Memory Leak Pattern
JWorks GC Web (Beta)
http://jworks.idv.tw/GcWeb/
Java Heap Structure and GC
Hotspot JVM Heap Layout
Total memory, for 32bits, max = 2^32 = 4GB.
In windows is 2GB, so max JVM Heap is about 1.6GB ~ 1.8GB

Native
Young

Old

Young Generation
– Eden where new objects get
instantiated
– 2 Survivor Spaces to hold live
objects during minor GC

Old Generation
– For tenured objects

Permanent Generation
– JVM meta data
Constraints of 32 Bits JVM
• Normal Windows (2GB process memory)
– ~1.5GB possible Java heap memory

• Windows started with /3GB (3GB process memory)
– ~2.8GB possible Java heap memory (2.6 or 2.7 GB
recommended with WLS)

• Linux, large process support enabled (3GB process
memory)
– ~2,8GB possible Java heap memory
Hotspot Internals
Generations & Object Lifecycle

Eden

S0

S1
Hotspot Internals
Object lifecycle

Number
indicates
Age

0
Hotspot Internals
Object lifecycle

1
Hotspot Internals
Object lifecycle

2
Hotspot Internals
Object lifecycle

3
Hotspot Internals
Object lifecycle

4
Hotspot Internals
Object lifecycle

5
Hotspot Internals
Object lifecycle
Hotspot GC Tuning
Footprint
(Heap Size)

Throughput

Latencies
Footprint
(Heap Size)

Throughput

Latencies
Hotspot Tuning
Sizing Heap

• Young Generation size determines
• Frequency of minor GC
• Number of objects reclaimed in minor GC

• Old Generation Size
• Should hold application's steady-state live data size
• Try to minimize frequency of major GC’s

• JVM footprint should not exceed physical memory
• Max of 80-90% RAM (leave room for OS)

• Thumb Rule: Try to maximize objects reclaimed in
young gen. Minimize Full GC frequency
Calculate Live Data Size (LDS)
• Make sure you get full GCs during steady-state
• Induce a couple if necessary
• JConsole / VisualVM
• Connect to the JVM, click on the “Perform GC” button
• jmap
• jmap -histo:live <pid>
• Can even introduce a thread that does regular System.gc()'s
• Just for this data gathering purpose, OK? Remove it
before deployment. :-)
Calculate Live Data Size (ii)
• From the GC log you will get
– Approximation of the Live Data Size (LDS)
• It is the heap occupancy after each full GC
– Approximation of max perm gen size
• It is the perm gen occupancy after each full GC
– Worst-case latency scenario due to the full GCs

• GC log example:
GC Triggered
Heap Usage

Size of
”long lived objects”

Max Java Heap
Initial Heap Configuration
• You can now make an informed decision on choosing
a reasonable heap size
– Rule of thumb
• Set -Xms and -Xmx to 3x to 4x LDS
• Set both -XX:PermSize and -XX:MaxPermSize to around
1.2x to 1.5x the max perm gen size

• Set the generation sizes accordingly
– Rule of thumb
• Young gen should be around 1x to 1.5x LDS
• Old gen should be around 2x to 3x LDS
• e.g., young gen should be around 1/3-1/4 of the heap size

• e.g., For LDS of 512m : -Xmn768m -Xms2g -Xmx2g
Hotspot JVM Heap Layout
For LDS of 512m : -Xmn768m -Xms2g -Xmx2g

-Xmn768m
-Xms2g –Xmx2g

Native
GC Fundamentals
Garbage Distribution – Objects die young

• Typical object (Young object) is most likely
to die shortly after it was created
– Example: Local objects

• Objects that have been around for a while
(Old objects) will likely stay around for a
while
– Example: Objects initialized at the time of
application startup

• Only a few references from old objects to
young objects exist

Oracle confidential; Pending legal review
GC Fundamentals
Garbage Distribution - Generational Collection

• Buckets ideally correspond to distribution curve
• Collect each bucket with most efficient algorithm
• Size buckets for best GC performance
Oracle confidential; Pending legal review
JVM Heap Tuning
• Young generation sizing is second most important
– -XX:NewSize=<n> -XX:MaxNewSize=<n>
– Fixed Size young generation and Fixed Size Heap can
provide better performance (less Full GC)
• Set NewSize = MaxNewSize
• Or, -Xmn<n> is a convenient option
– More scalable flag is -XX:NewRatio=<r>
http://blogs.sun.com/jonthecollector/entry/the_second_most_important_gc
Memory Leak
• How do you know there is memory leak?
• OOM (OutOfMemory) after a while (a few hours/a few days)
• Memory used for long lived objects increases over time
• Usually not a JVM problem, but a problem in application

Long lived
objects
JWorks GC Web (Beta)
http://jworks.idv.tw/GcWeb/
Types of Object Reference
• Strong references
– Normal

• SoftReference
– Used for cache
– GC’ed any time after there are no strong references to the referent,
but is typically retained until memory is low.

– Try to use -XX:SoftRefLRUPolicyMSPerMB=0
• WeakReference
– Used for cache
– GC’ed any time after there re no strong or soft references to the
referent.

• PhantomReference
– Used for housekeeping (without using finalize, don’t use
finalize)
Footprint
(Heap Size)

Throughput

Latencies
Throughput vs. Latency
• For most applications, GC overhead is small
– 2% – 5%

• Throughput GCs
– Move most work to GC pauses
– Application threads do as little as possible
– Least overall GC overhead

• Low Latency (Pause) GCs
– Move work out of GC pauses
– Application threads do more work
• Bookkeeping for GC more expensive
– More overall GC overhead
Application Requirement
• Different applications have different requirements
– Higher Throughput:
• Web application: pauses during garbage collection may be
tolerable, or simply obscured by network latencies
• Batch processing

– Lower Latencies:
• Interactive graphics application
HotSpot Garbage Collectors in Java SE 6
-XX:+UseParallelGC

-XX:+UseSerialGC
-XX:+UseParNewGC

G1
-XX:+UseG1GC

-XX:+UseConcMarkSweepGC

-XX:+UseParallelOldGC

http://blogs.sun.com/jonthecollector/entry/our_collectors
HotSpot Garbage Collectors in Java SE 6
-XX:+UseParallelGC

-XX:+UseSerialGC
-XX:+UseParNewGC

G1
-XX:+UseG1GC

-XX:+UseConcMarkSweepGC

-XX:+UseParallelOldGC

http://blogs.sun.com/jonthecollector/entry/our_collectors
Selecting Garbage Collectors
• Serial Collector (default for -client) (-XX:+UseSerialGC)
– Works well in single processor configuration
– Suitable for applications with small data sets
– Co-locating multiple instances of WLS(JVM's)
Serial Collector

Serial

App Thread

GC Thread
HotSpot Garbage Collectors in Java SE 6
-XX:+UseParallelGC

-XX:+UseSerialGC
-XX:+UseParNewGC

G1
-XX:+UseG1GC

-XX:+UseConcMarkSweepGC

-XX:+UseParallelOldGC

http://blogs.sun.com/jonthecollector/entry/our_collectors
Selecting Garbage Collectors
• Parallel Scavenge Collector (Throughput,
-XX:+UseParallelGC)
– Perform minor collections in parallel to improve performance
on multi-core and multi-threaded CPU's
– Designed for applications with medium to large data sets
– Control GC Threads using -XX:ParallelGCThreads=<n>
• By default, <n> is set to total number of “CPU’s”
– In JDK 5 Update 6, parallel compaction for old generation
was added (-XX:+UseParallelOldGC)
– Minimize garbage collection impact on throughput
– Parallel compaction is now default in JDK 6
• -XX:+UseParallelOldGC
Serial vs Parallel Collector

Serial

App Thread

GC Thread
HotSpot Garbage Collectors in Java SE 6
-XX:+UseParallelGC

-XX:+UseSerialGC
-XX:+UseParNewGC

G1
-XX:+UseG1GC

-XX:+UseConcMarkSweepGC

-XX:+UseParallelOldGC

http://blogs.sun.com/jonthecollector/entry/our_collectors
Selecting Garbage Collectors
• Low Latencies (Pause) Collector
(-XX:+UseConcMarkSweepGC)
– Execute the application concurrently during Full GC
– Constant response time on multi-CPU servers
– To improve throughput, use the following for young gen
• -XX:+UseParNewGC (and -XX:ParallelGCThreads=<n>)
CMS Collector

App Thread

GC Thread
CMS Collector with ParNewGC

App Thread

GC Thread
Hotspot JDK Heap Option Summary
Generation

Low Pause Collectors
1 CPU

Young

Serial
Copying
Collector
(default)

2+ CPUs
Parallel Copying
Collector
-XX:+UseParNewGC

Throughput Collectors
1 CPU

Serial
Copying
Collector
(default)

Heap Sizes

2+ CPUs
Parallel Scavenge
Collector

-XX:NewSize
-XX:MaxNewSize
-XX:SurvivorRatio

-XX:+UseParallelGC

Concurrent Collector
MarkCompact
Collector
(default)

Old

Permanent

XX:+UseConcMarkSwe
epGC

MarkCompact
Collector
(default)

Parallel Old

-Xms

-XX:+UseParallelOldGC

-Xmx

Can be turned off with –Xnoclassgc (use with care)

New G1 Collector as of WLS10.3.1/JDK 6 Update 14

-XX:PermSize
-XX:MaxPermSize
G1 Collector
• The Garbage-First Collector
–
–
–
–

–
–
–
–
–

Since JDK 6u14, officially supported as of JDK 7u4
-XX:+UseG1GC
Future CMS Replacement
Server “Style” low latency collector
• Parallel
• Concurrent
Generational
Good Throughput
Compacting
Improved ease-of-use
Predictable (Soft Real-Time)
G1 Collector
• The Garbage-First Collector
–
–
–
–

–
–
–
–
–

Since JDK 6u14, officially supported as of JDK 7u4
-XX:+UseG1GC
Future CMS Replacement
Server “Style” low latency collector
• Parallel
• Concurrent
Generational
Good Throughput
Compacting
Improved ease-of-use
Predictable (Soft Real-Time)
G1 Collector: Parallelism & Concurrency

App Thread

GC Thread
G1 – Garbage First
Heap Layout

Region Type

S

Eden

S
S

Survivor
Old
Free
CMS vs G1 Collectors

•

Heap split into regions

•

Young generation (A set of regions)

•

Old generation (A set of regions)
GC Comparison
GC Comparison
GC Comparison
G1 – Pros and Cons
• Pros
– Only one (concurrent) task needs to act on the whole heap
• Nice since heaps are getting larger and larger
– Parallel young and mixed collections
• Nice since machines tend to have more and more cores
– Has a lot of flexibility and built in heuristics for choosing
young generation and the collection set
– The only collector in Hotspot that is being actively developed

• Cons
– Heuristics in place but not fine tuned yet
– Has a larger memory footprint
– More concurrent work compared to other collectors
G1 - Targeted Use Cases
• Large heaps with limited GC latencies
– Typically ~6GB or larger heaps

• Applications that have
– Varied object allocation rate
– Undesired long GC or compaction pauses (greater than 0.5s)
and want to lower down the pauses time

• Tuning:
– Garbage First Garbage Collector Tuning
http://www.oracle.com/technetwork/articles/java/g1gc-1984535.html

– Deep Dive into G1 Garbage Collector
http://www.infoq.com/presentations/java-g1
G1 - Currently Not Targeted Use Cases
• Applications with very low latency requirements
– Continue to use Deterministic GC or CMS

• Maximum throughput with no latency requirements
– Continue to use Throughput collector or Parallel/ParallelOld

• Applications that continuously load and unload
classes
References
• Step-by-Step: Garbage Collection Tuning in the Java
HotSpot™ Virtual Machine – JavaOne 2010
• The Garbage Collection Mythbusters – JavaOne 2010
• GC Tuning for the HotSpot JVM – JavaOne 2009
• http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html
Hotspot Resources
• Java Performance – Charlie Hunt, Binu John
Hotspot Tuning Book

• HotSpot GC Tuning Guide
for Java SE 6
http://www.oracle.com/technetwork/java/javase/gc-tuning-6140523.html

• Oracle University Training
Java SE Performance Tuning Ed 1

• Memory Management in the Java
HotSpot VM
http://www.oracle.com/technetwork/java/javase/memorymana
gement-whitepaper-150215.pdf

• Java 6 Performance Whitepaper
http://java.sun.com/performance/reference/whitepapers/6_performance.ht
ml

Oracle confidential; Pending legal review
Java (JRockit)
Mission Control
Java SE Advanced
New

• Both HotSpot and JRockit VMs under a
single license
• JRockit VM brings to the table
• Intuitive, user-friendly tooling for monitoring,
diagnosing and tuning a Java environment.
• Dynamic Memory Leak Detection

• Enterprise JRE features i.e. ability to
turn auto update off, and usage
tracking.

Java SE Advanced
* Oracle’s JRE
* JRockit JDKs
* Java(JRockit) Mission
Control
* Monitoring and
Management features
(including APIs for EM
integration)
Java (JRockit) Mission Control
After JDK1.7.0_40

• Monitor health and performance in production
• A suite of powerful tools for
– Performance Tuning
– Diagnostics
– Support
• Internal survey: 25% more efficient with JRMC

93
Java(JRockit) Mission Control

94
Java(JRockit) Mission Control

95
Java(JRockit) Mission Control
Profiling - Detect Hot Methods

96
Oracle Java(JRockit) Flight Recorder
The Problem: The ”Intermittent Cycle”

SLA
Breach

Server
restart

• [Sun 21:00]

• [Sun 24:00]

XXXX
Analyze
logs
• [Mon 09:30]

Turn on
detailed
logging
• [Tue 13:00]

Analyze
logs
• [Fri 09:00]

Turn off
detailed
logging
• [Fri 24:00]

Analyze Logs
and JFR
• [Mon 09:30]

98
How to use?

• Java 7 update 40 above
• Use following options to start the JMV which you want
to monitor:
– -XX:+UnlockCommercialFeatures
– -XX:+FlightRecorder
– -XX:FlightRecorderOptions=defaultrecording=true,
dumponexit=true,dumponexitpath=/tmp/dumponexit.jfr”

• Use Java Mission Control GUI (jmc) to analyze the
result
Introduction of Java GC Tuning and Java Java Mission Control
<Insert Picture Here>

Thank you!

Contenu connexe

Tendances

Keeping Up with the ELK Stack: Elasticsearch, Kibana, Beats, and Logstash
Keeping Up with the ELK Stack: Elasticsearch, Kibana, Beats, and LogstashKeeping Up with the ELK Stack: Elasticsearch, Kibana, Beats, and Logstash
Keeping Up with the ELK Stack: Elasticsearch, Kibana, Beats, and LogstashAmazon Web Services
 
Producer Performance Tuning for Apache Kafka
Producer Performance Tuning for Apache KafkaProducer Performance Tuning for Apache Kafka
Producer Performance Tuning for Apache KafkaJiangjie Qin
 
Understanding and Improving Code Generation
Understanding and Improving Code GenerationUnderstanding and Improving Code Generation
Understanding and Improving Code GenerationDatabricks
 
Spark shuffle introduction
Spark shuffle introductionSpark shuffle introduction
Spark shuffle introductioncolorant
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And BeyondVMware Tanzu
 
Spark Performance Tuning .pdf
Spark Performance Tuning .pdfSpark Performance Tuning .pdf
Spark Performance Tuning .pdfAmit Raj
 
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
Performance Tuning -  Memory leaks, Thread deadlocks, JDK toolsPerformance Tuning -  Memory leaks, Thread deadlocks, JDK tools
Performance Tuning - Memory leaks, Thread deadlocks, JDK toolsHaribabu Nandyal Padmanaban
 
Cost-Based Optimizer in Apache Spark 2.2
Cost-Based Optimizer in Apache Spark 2.2 Cost-Based Optimizer in Apache Spark 2.2
Cost-Based Optimizer in Apache Spark 2.2 Databricks
 
Nginx Reverse Proxy with Kafka.pptx
Nginx Reverse Proxy with Kafka.pptxNginx Reverse Proxy with Kafka.pptx
Nginx Reverse Proxy with Kafka.pptxwonyong hwang
 
Building a SIMD Supported Vectorized Native Engine for Spark SQL
Building a SIMD Supported Vectorized Native Engine for Spark SQLBuilding a SIMD Supported Vectorized Native Engine for Spark SQL
Building a SIMD Supported Vectorized Native Engine for Spark SQLDatabricks
 
Distributed applications using Hazelcast
Distributed applications using HazelcastDistributed applications using Hazelcast
Distributed applications using HazelcastTaras Matyashovsky
 
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...confluent
 
GC free coding in @Java presented @Geecon
GC free coding in @Java presented @GeeconGC free coding in @Java presented @Geecon
GC free coding in @Java presented @GeeconPeter Lawrey
 
Enabling Vectorized Engine in Apache Spark
Enabling Vectorized Engine in Apache SparkEnabling Vectorized Engine in Apache Spark
Enabling Vectorized Engine in Apache SparkKazuaki Ishizaki
 
Log management with ELK
Log management with ELKLog management with ELK
Log management with ELKGeert Pante
 
A Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQLA Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQLDatabricks
 
Loom Virtual Threads in the JDK 19
Loom Virtual Threads in the JDK 19Loom Virtual Threads in the JDK 19
Loom Virtual Threads in the JDK 19José Paumard
 
Fundamentals of Apache Kafka
Fundamentals of Apache KafkaFundamentals of Apache Kafka
Fundamentals of Apache KafkaChhavi Parasher
 

Tendances (20)

Keeping Up with the ELK Stack: Elasticsearch, Kibana, Beats, and Logstash
Keeping Up with the ELK Stack: Elasticsearch, Kibana, Beats, and LogstashKeeping Up with the ELK Stack: Elasticsearch, Kibana, Beats, and Logstash
Keeping Up with the ELK Stack: Elasticsearch, Kibana, Beats, and Logstash
 
Producer Performance Tuning for Apache Kafka
Producer Performance Tuning for Apache KafkaProducer Performance Tuning for Apache Kafka
Producer Performance Tuning for Apache Kafka
 
Understanding and Improving Code Generation
Understanding and Improving Code GenerationUnderstanding and Improving Code Generation
Understanding and Improving Code Generation
 
Spark shuffle introduction
Spark shuffle introductionSpark shuffle introduction
Spark shuffle introduction
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
Spark Performance Tuning .pdf
Spark Performance Tuning .pdfSpark Performance Tuning .pdf
Spark Performance Tuning .pdf
 
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
Performance Tuning -  Memory leaks, Thread deadlocks, JDK toolsPerformance Tuning -  Memory leaks, Thread deadlocks, JDK tools
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
 
Cost-Based Optimizer in Apache Spark 2.2
Cost-Based Optimizer in Apache Spark 2.2 Cost-Based Optimizer in Apache Spark 2.2
Cost-Based Optimizer in Apache Spark 2.2
 
Nginx Reverse Proxy with Kafka.pptx
Nginx Reverse Proxy with Kafka.pptxNginx Reverse Proxy with Kafka.pptx
Nginx Reverse Proxy with Kafka.pptx
 
Building a SIMD Supported Vectorized Native Engine for Spark SQL
Building a SIMD Supported Vectorized Native Engine for Spark SQLBuilding a SIMD Supported Vectorized Native Engine for Spark SQL
Building a SIMD Supported Vectorized Native Engine for Spark SQL
 
What's new in Java 11
What's new in Java 11What's new in Java 11
What's new in Java 11
 
Distributed applications using Hazelcast
Distributed applications using HazelcastDistributed applications using Hazelcast
Distributed applications using Hazelcast
 
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
 
GC free coding in @Java presented @Geecon
GC free coding in @Java presented @GeeconGC free coding in @Java presented @Geecon
GC free coding in @Java presented @Geecon
 
Enabling Vectorized Engine in Apache Spark
Enabling Vectorized Engine in Apache SparkEnabling Vectorized Engine in Apache Spark
Enabling Vectorized Engine in Apache Spark
 
Log management with ELK
Log management with ELKLog management with ELK
Log management with ELK
 
A Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQLA Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQL
 
Spring jdbc
Spring jdbcSpring jdbc
Spring jdbc
 
Loom Virtual Threads in the JDK 19
Loom Virtual Threads in the JDK 19Loom Virtual Threads in the JDK 19
Loom Virtual Threads in the JDK 19
 
Fundamentals of Apache Kafka
Fundamentals of Apache KafkaFundamentals of Apache Kafka
Fundamentals of Apache Kafka
 

En vedette

淺談 Java GC 原理、調教和 新發展
淺談 Java GC 原理、調教和新發展淺談 Java GC 原理、調教和新發展
淺談 Java GC 原理、調教和 新發展Leon Chen
 
Java GC Tuning
Java GC TuningJava GC Tuning
Java GC Tuningpprun
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java SlidesVinit Vyas
 
Владимир Иванов. Java 8 и JVM: что нового в HotSpot
Владимир Иванов. Java 8 и JVM: что нового в HotSpotВладимир Иванов. Java 8 и JVM: что нового в HotSpot
Владимир Иванов. Java 8 и JVM: что нового в HotSpotVolha Banadyseva
 
Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12
Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12
Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12sidg75
 
Analiza kwalifikacji pracownikow kluczem do sukcesu biznesowego, Tomasz Zubrz...
Analiza kwalifikacji pracownikow kluczem do sukcesu biznesowego, Tomasz Zubrz...Analiza kwalifikacji pracownikow kluczem do sukcesu biznesowego, Tomasz Zubrz...
Analiza kwalifikacji pracownikow kluczem do sukcesu biznesowego, Tomasz Zubrz...Ewa Stepien
 
Sun jdk 1.6内存管理 -使用篇
Sun jdk 1.6内存管理 -使用篇Sun jdk 1.6内存管理 -使用篇
Sun jdk 1.6内存管理 -使用篇bluedavy lin
 
Jvm基础调优实践(v1.0)
Jvm基础调优实践(v1.0)Jvm基础调优实践(v1.0)
Jvm基础调优实践(v1.0)ddviplinux
 
Hadoop world g1_gc_forh_base_v4
Hadoop world g1_gc_forh_base_v4Hadoop world g1_gc_forh_base_v4
Hadoop world g1_gc_forh_base_v4YanpingWang
 
Moving to g1 gc by Kirk Pepperdine.
Moving to g1 gc by Kirk Pepperdine.Moving to g1 gc by Kirk Pepperdine.
Moving to g1 gc by Kirk Pepperdine.J On The Beach
 
Java7 Garbage Collector G1
Java7 Garbage Collector G1Java7 Garbage Collector G1
Java7 Garbage Collector G1Dmitry Buzdin
 
Clojure - An Introduction for Java Programmers
Clojure - An Introduction for Java ProgrammersClojure - An Introduction for Java Programmers
Clojure - An Introduction for Java Programmerselliando dias
 
How to Become a Winner in the JVM Performance-Tuning Battle
How to Become a Winner in the JVM Performance-Tuning BattleHow to Become a Winner in the JVM Performance-Tuning Battle
How to Become a Winner in the JVM Performance-Tuning BattleCapgemini
 
Recipe 黃佳伶 葉愛慧
Recipe 黃佳伶 葉愛慧Recipe 黃佳伶 葉愛慧
Recipe 黃佳伶 葉愛慧10y2try
 

En vedette (20)

JVM及其调优
JVM及其调优JVM及其调优
JVM及其调优
 
淺談 Java GC 原理、調教和 新發展
淺談 Java GC 原理、調教和新發展淺談 Java GC 原理、調教和新發展
淺談 Java GC 原理、調教和 新發展
 
How long can you afford to Stop The World?
How long can you afford to Stop The World?How long can you afford to Stop The World?
How long can you afford to Stop The World?
 
Java GC
Java GCJava GC
Java GC
 
Java GC Tuning
Java GC TuningJava GC Tuning
Java GC Tuning
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java Slides
 
Владимир Иванов. Java 8 и JVM: что нового в HotSpot
Владимир Иванов. Java 8 и JVM: что нового в HotSpotВладимир Иванов. Java 8 и JVM: что нового в HotSpot
Владимир Иванов. Java 8 и JVM: что нового в HotSpot
 
Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12
Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12
Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12
 
Analiza kwalifikacji pracownikow kluczem do sukcesu biznesowego, Tomasz Zubrz...
Analiza kwalifikacji pracownikow kluczem do sukcesu biznesowego, Tomasz Zubrz...Analiza kwalifikacji pracownikow kluczem do sukcesu biznesowego, Tomasz Zubrz...
Analiza kwalifikacji pracownikow kluczem do sukcesu biznesowego, Tomasz Zubrz...
 
Sun jdk 1.6内存管理 -使用篇
Sun jdk 1.6内存管理 -使用篇Sun jdk 1.6内存管理 -使用篇
Sun jdk 1.6内存管理 -使用篇
 
Jvm基础调优实践(v1.0)
Jvm基础调优实践(v1.0)Jvm基础调优实践(v1.0)
Jvm基础调优实践(v1.0)
 
Hadoop world g1_gc_forh_base_v4
Hadoop world g1_gc_forh_base_v4Hadoop world g1_gc_forh_base_v4
Hadoop world g1_gc_forh_base_v4
 
Moving to g1 gc by Kirk Pepperdine.
Moving to g1 gc by Kirk Pepperdine.Moving to g1 gc by Kirk Pepperdine.
Moving to g1 gc by Kirk Pepperdine.
 
Java7 Garbage Collector G1
Java7 Garbage Collector G1Java7 Garbage Collector G1
Java7 Garbage Collector G1
 
Clojure - An Introduction for Java Programmers
Clojure - An Introduction for Java ProgrammersClojure - An Introduction for Java Programmers
Clojure - An Introduction for Java Programmers
 
How to Become a Winner in the JVM Performance-Tuning Battle
How to Become a Winner in the JVM Performance-Tuning BattleHow to Become a Winner in the JVM Performance-Tuning Battle
How to Become a Winner in the JVM Performance-Tuning Battle
 
Nginx+tomcat https 配置
Nginx+tomcat  https 配置Nginx+tomcat  https 配置
Nginx+tomcat https 配置
 
Java多线程技术
Java多线程技术Java多线程技术
Java多线程技术
 
如何更好地设计测试用例-BQConf
如何更好地设计测试用例-BQConf如何更好地设计测试用例-BQConf
如何更好地设计测试用例-BQConf
 
Recipe 黃佳伶 葉愛慧
Recipe 黃佳伶 葉愛慧Recipe 黃佳伶 葉愛慧
Recipe 黃佳伶 葉愛慧
 

Similaire à Introduction of Java GC Tuning and Java Java Mission Control

[Outdated] Secrets of Performance Tuning Java on Kubernetes
[Outdated] Secrets of Performance Tuning Java on Kubernetes[Outdated] Secrets of Performance Tuning Java on Kubernetes
[Outdated] Secrets of Performance Tuning Java on KubernetesBruno Borges
 
JVM Performance Tuning
JVM Performance TuningJVM Performance Tuning
JVM Performance TuningJeremy Leisy
 
Troubleshooting Memory Problems in Java Applications
Troubleshooting Memory Problems in Java ApplicationsTroubleshooting Memory Problems in Java Applications
Troubleshooting Memory Problems in Java ApplicationsPoonam Bajaj Parhar
 
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
 
Ippevent : openshift Introduction
Ippevent : openshift IntroductionIppevent : openshift Introduction
Ippevent : openshift Introductionkanedafromparis
 
Tomcatx troubleshooting-production
Tomcatx troubleshooting-productionTomcatx troubleshooting-production
Tomcatx troubleshooting-productionVladimir Khokhryakov
 
Mastering java in containers - MadridJUG
Mastering java in containers - MadridJUGMastering java in containers - MadridJUG
Mastering java in containers - MadridJUGJorge Morales
 
Accelerating HBase with NVMe and Bucket Cache
Accelerating HBase with NVMe and Bucket CacheAccelerating HBase with NVMe and Bucket Cache
Accelerating HBase with NVMe and Bucket CacheNicolas Poggi
 
Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Marcos García
 
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
 
GemStone/64 product update and road map
GemStone/64 product update and road mapGemStone/64 product update and road map
GemStone/64 product update and road mapESUG
 
Java performance monitoring
Java performance monitoringJava performance monitoring
Java performance monitoringSimon Ritter
 
Performance tuning jvm
Performance tuning jvmPerformance tuning jvm
Performance tuning jvmPrem Kuppumani
 
Sizing MongoDB on AWS with Wired Tiger-Patrick and Vigyan-Final
Sizing MongoDB on AWS with Wired Tiger-Patrick and Vigyan-FinalSizing MongoDB on AWS with Wired Tiger-Patrick and Vigyan-Final
Sizing MongoDB on AWS with Wired Tiger-Patrick and Vigyan-FinalVigyan Jain
 
The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...
The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...
The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...Glenn K. Lockwood
 
Java-light-speed NebraskaCode.pdf
Java-light-speed NebraskaCode.pdfJava-light-speed NebraskaCode.pdf
Java-light-speed NebraskaCode.pdfRichHagarty
 
G1 collector and tuning and Cassandra
G1 collector and tuning and CassandraG1 collector and tuning and Cassandra
G1 collector and tuning and CassandraChris Lohfink
 

Similaire à Introduction of Java GC Tuning and Java Java Mission Control (20)

[Outdated] Secrets of Performance Tuning Java on Kubernetes
[Outdated] Secrets of Performance Tuning Java on Kubernetes[Outdated] Secrets of Performance Tuning Java on Kubernetes
[Outdated] Secrets of Performance Tuning Java on Kubernetes
 
Basics of JVM Tuning
Basics of JVM TuningBasics of JVM Tuning
Basics of JVM Tuning
 
Java performance tuning
Java performance tuningJava performance tuning
Java performance tuning
 
JVM Performance Tuning
JVM Performance TuningJVM Performance Tuning
JVM Performance Tuning
 
Troubleshooting Memory Problems in Java Applications
Troubleshooting Memory Problems in Java ApplicationsTroubleshooting Memory Problems in Java Applications
Troubleshooting Memory Problems in Java Applications
 
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
 
Ippevent : openshift Introduction
Ippevent : openshift IntroductionIppevent : openshift Introduction
Ippevent : openshift Introduction
 
Tomcatx troubleshooting-production
Tomcatx troubleshooting-productionTomcatx troubleshooting-production
Tomcatx troubleshooting-production
 
Mastering java in containers - MadridJUG
Mastering java in containers - MadridJUGMastering java in containers - MadridJUG
Mastering java in containers - MadridJUG
 
Accelerating HBase with NVMe and Bucket Cache
Accelerating HBase with NVMe and Bucket CacheAccelerating HBase with NVMe and Bucket Cache
Accelerating HBase with NVMe and Bucket Cache
 
Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)
 
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
 
GemStone/64 product update and road map
GemStone/64 product update and road mapGemStone/64 product update and road map
GemStone/64 product update and road map
 
Java performance monitoring
Java performance monitoringJava performance monitoring
Java performance monitoring
 
Performance tuning jvm
Performance tuning jvmPerformance tuning jvm
Performance tuning jvm
 
Loom promises: be there!
Loom promises: be there!Loom promises: be there!
Loom promises: be there!
 
Sizing MongoDB on AWS with Wired Tiger-Patrick and Vigyan-Final
Sizing MongoDB on AWS with Wired Tiger-Patrick and Vigyan-FinalSizing MongoDB on AWS with Wired Tiger-Patrick and Vigyan-Final
Sizing MongoDB on AWS with Wired Tiger-Patrick and Vigyan-Final
 
The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...
The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...
The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...
 
Java-light-speed NebraskaCode.pdf
Java-light-speed NebraskaCode.pdfJava-light-speed NebraskaCode.pdf
Java-light-speed NebraskaCode.pdf
 
G1 collector and tuning and Cassandra
G1 collector and tuning and CassandraG1 collector and tuning and Cassandra
G1 collector and tuning and Cassandra
 

Dernier

UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Brian Pichman
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-pyJamie (Taka) Wang
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarPrecisely
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 

Dernier (20)

UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
201610817 - edge part1
201610817 - edge part1201610817 - edge part1
201610817 - edge part1
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity Webinar
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 

Introduction of Java GC Tuning and Java Java Mission Control

  • 1. <Insert Picture Here> Introduction of Java GC Tuning and Java Java Mission Control Leon Chen (陳逸嘉) Principal Sales Consultant Oracle
  • 2. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  • 3. Leon Chen (陳逸嘉) • More than 14 years in Java/JEE, as programmer, architect, leader and consultant, in finance/telecom domain. • • • • • 工研院 得捷 新光人壽 Ericsson Oracle
  • 4. • TW Patent 182927, 一種文章切割方法, 2003, 陳逸嘉, 林一中 • TW Patent 206819, 自動服務組合方法及系統, 2004, 陳逸嘉, 許 維德, 洪鵬翔 • US Patent 7,617,174, Method and system for automatic service composition, 2009, Leon Chen, Wei-Tek Hsu, PengHsiang Hung
  • 7. Java SE Roadmap JDK 8 (Q1 2014) 7u40 7u21 • Java Client Security Enhancements • App Store Packaging tools • Java Flight Recorder • Java Mission Control 5.2 • Java Discovery Protocol • Native memory tracking • Local Security Policy 2013 • Lambda • JVM Convergence • JavaScript Interop • JavaFX 8 • 3D API • Java SE Embedded support • Enhanced HTML5 support JDK 9 • Modularity – Jigsaw • Interoperability • Cloud • Ease of Use • JavaFX JSR • Optimizations JDK 8u40 2014 2015 2016 NetBeans IDE 7.3 NetBeans IDE 8 JDK 8u20 NetBeans IDE 9 • New hints and refactoring • Scene Builder Support • JDK 8 support • Scene Builder 2.0 support • Deterministic G1 • Java Mission Control 6.0 • Improved JRE installer • App bundling enhancements • JDK 9 support • Scene Builder 3.0 support Scene Builder 2.0 Scene Builder 1.1 • Linux support • JavaFX 8 support • Enhanced Java IDE support Scene Builder 3.0 • JavaFX 9 support
  • 9. 32-bit VS. 64-bit • 32-bit • For heap sizes up to 2.5G/3G or so • 64-bit • Windows/Linux: different JVM, Solaris: add -d64 • -XX:+UseCompressedOops (default JDK6_23+) • Compressed references: 32GB Max (26GB best) • -Xmx: 26G (compressed) / unlimited (regular) • 32-bit  64-bit migration • Higher heap size requirements (around 20%) • Slight throughput impact (without compressed refs) • 64-bit preferred for today’s servers • Only option starting with Fusion Middleware 12c
  • 10. Java Memory Management Reference video: http://www.youtube.com/watch?v=VQ4eZw6eVtQ
  • 11. class Test { private List<User> userList = new ArrayList<User>(); … public void execute() { User user = new User(); userList.add(user); … user = null; //No use } … }
  • 16. Tracing GC Example Runtime Stack Heap A G D H E I L F B C J M We identified all reachable objects. We can deduce that the rest are unreachable and, therefore, dead. K
  • 17. Tracing GC Example Runtime Stack Heap A C K H B E I We identified all reachable objects. We can deduce that the rest are unreachable and, therefore, dead. L
  • 20. 花太多時間做 GC → Performance變慢 Performance變慢→花太多時間做 GC 不一定!!!
  • 21. JVM Performance Tuning Performance Tuning Process Oracle confidential; Pending legal review
  • 22. GC Logging in Production • Don’t be afraid to enable GC logging in production – Very helpful when diagnosing production issues • Extremely low / non-existent overhead – Maybe some large files in your file system. – We are surprised that customers are still afraid to enable it
  • 23. If Someone doesn’t enable GC logging in production I shoot them!
  • 24. Most Important GC Logging Parameters • You need at least: – -XX:+PrintGCTimeStamps • Add -XX:+PrintGCDateStamps if you must know the time – -XX:+PrintGCDetails • Preferred over -verbosegc as it's more detailed • Also useful: – -Xloggc:<file> – Rotate GC Log, After Java 1.6_34 (or 1.7_2): -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=10M
  • 25. JVM Performance Tuning GCViewer – Offline analysis of GC logs https://github.com/chewiebug/GCViewer
  • 26. JVM Performance Tuning GCViewer – Memory Leak Pattern
  • 27. JWorks GC Web (Beta) http://jworks.idv.tw/GcWeb/
  • 29. Hotspot JVM Heap Layout Total memory, for 32bits, max = 2^32 = 4GB. In windows is 2GB, so max JVM Heap is about 1.6GB ~ 1.8GB Native Young Old Young Generation – Eden where new objects get instantiated – 2 Survivor Spaces to hold live objects during minor GC Old Generation – For tenured objects Permanent Generation – JVM meta data
  • 30. Constraints of 32 Bits JVM • Normal Windows (2GB process memory) – ~1.5GB possible Java heap memory • Windows started with /3GB (3GB process memory) – ~2.8GB possible Java heap memory (2.6 or 2.7 GB recommended with WLS) • Linux, large process support enabled (3GB process memory) – ~2,8GB possible Java heap memory
  • 31. Hotspot Internals Generations & Object Lifecycle Eden S0 S1
  • 42. Hotspot Tuning Sizing Heap • Young Generation size determines • Frequency of minor GC • Number of objects reclaimed in minor GC • Old Generation Size • Should hold application's steady-state live data size • Try to minimize frequency of major GC’s • JVM footprint should not exceed physical memory • Max of 80-90% RAM (leave room for OS) • Thumb Rule: Try to maximize objects reclaimed in young gen. Minimize Full GC frequency
  • 43. Calculate Live Data Size (LDS) • Make sure you get full GCs during steady-state • Induce a couple if necessary • JConsole / VisualVM • Connect to the JVM, click on the “Perform GC” button • jmap • jmap -histo:live <pid> • Can even introduce a thread that does regular System.gc()'s • Just for this data gathering purpose, OK? Remove it before deployment. :-)
  • 44. Calculate Live Data Size (ii) • From the GC log you will get – Approximation of the Live Data Size (LDS) • It is the heap occupancy after each full GC – Approximation of max perm gen size • It is the perm gen occupancy after each full GC – Worst-case latency scenario due to the full GCs • GC log example:
  • 45. GC Triggered Heap Usage Size of ”long lived objects” Max Java Heap
  • 46. Initial Heap Configuration • You can now make an informed decision on choosing a reasonable heap size – Rule of thumb • Set -Xms and -Xmx to 3x to 4x LDS • Set both -XX:PermSize and -XX:MaxPermSize to around 1.2x to 1.5x the max perm gen size • Set the generation sizes accordingly – Rule of thumb • Young gen should be around 1x to 1.5x LDS • Old gen should be around 2x to 3x LDS • e.g., young gen should be around 1/3-1/4 of the heap size • e.g., For LDS of 512m : -Xmn768m -Xms2g -Xmx2g
  • 47. Hotspot JVM Heap Layout For LDS of 512m : -Xmn768m -Xms2g -Xmx2g -Xmn768m -Xms2g –Xmx2g Native
  • 48. GC Fundamentals Garbage Distribution – Objects die young • Typical object (Young object) is most likely to die shortly after it was created – Example: Local objects • Objects that have been around for a while (Old objects) will likely stay around for a while – Example: Objects initialized at the time of application startup • Only a few references from old objects to young objects exist Oracle confidential; Pending legal review
  • 49. GC Fundamentals Garbage Distribution - Generational Collection • Buckets ideally correspond to distribution curve • Collect each bucket with most efficient algorithm • Size buckets for best GC performance Oracle confidential; Pending legal review
  • 50. JVM Heap Tuning • Young generation sizing is second most important – -XX:NewSize=<n> -XX:MaxNewSize=<n> – Fixed Size young generation and Fixed Size Heap can provide better performance (less Full GC) • Set NewSize = MaxNewSize • Or, -Xmn<n> is a convenient option – More scalable flag is -XX:NewRatio=<r> http://blogs.sun.com/jonthecollector/entry/the_second_most_important_gc
  • 51. Memory Leak • How do you know there is memory leak? • OOM (OutOfMemory) after a while (a few hours/a few days) • Memory used for long lived objects increases over time • Usually not a JVM problem, but a problem in application Long lived objects
  • 52. JWorks GC Web (Beta) http://jworks.idv.tw/GcWeb/
  • 53. Types of Object Reference • Strong references – Normal • SoftReference – Used for cache – GC’ed any time after there are no strong references to the referent, but is typically retained until memory is low. – Try to use -XX:SoftRefLRUPolicyMSPerMB=0 • WeakReference – Used for cache – GC’ed any time after there re no strong or soft references to the referent. • PhantomReference – Used for housekeeping (without using finalize, don’t use finalize)
  • 55. Throughput vs. Latency • For most applications, GC overhead is small – 2% – 5% • Throughput GCs – Move most work to GC pauses – Application threads do as little as possible – Least overall GC overhead • Low Latency (Pause) GCs – Move work out of GC pauses – Application threads do more work • Bookkeeping for GC more expensive – More overall GC overhead
  • 56. Application Requirement • Different applications have different requirements – Higher Throughput: • Web application: pauses during garbage collection may be tolerable, or simply obscured by network latencies • Batch processing – Lower Latencies: • Interactive graphics application
  • 57. HotSpot Garbage Collectors in Java SE 6 -XX:+UseParallelGC -XX:+UseSerialGC -XX:+UseParNewGC G1 -XX:+UseG1GC -XX:+UseConcMarkSweepGC -XX:+UseParallelOldGC http://blogs.sun.com/jonthecollector/entry/our_collectors
  • 58. HotSpot Garbage Collectors in Java SE 6 -XX:+UseParallelGC -XX:+UseSerialGC -XX:+UseParNewGC G1 -XX:+UseG1GC -XX:+UseConcMarkSweepGC -XX:+UseParallelOldGC http://blogs.sun.com/jonthecollector/entry/our_collectors
  • 59. Selecting Garbage Collectors • Serial Collector (default for -client) (-XX:+UseSerialGC) – Works well in single processor configuration – Suitable for applications with small data sets – Co-locating multiple instances of WLS(JVM's)
  • 61. HotSpot Garbage Collectors in Java SE 6 -XX:+UseParallelGC -XX:+UseSerialGC -XX:+UseParNewGC G1 -XX:+UseG1GC -XX:+UseConcMarkSweepGC -XX:+UseParallelOldGC http://blogs.sun.com/jonthecollector/entry/our_collectors
  • 62. Selecting Garbage Collectors • Parallel Scavenge Collector (Throughput, -XX:+UseParallelGC) – Perform minor collections in parallel to improve performance on multi-core and multi-threaded CPU's – Designed for applications with medium to large data sets – Control GC Threads using -XX:ParallelGCThreads=<n> • By default, <n> is set to total number of “CPU’s” – In JDK 5 Update 6, parallel compaction for old generation was added (-XX:+UseParallelOldGC) – Minimize garbage collection impact on throughput – Parallel compaction is now default in JDK 6 • -XX:+UseParallelOldGC
  • 63. Serial vs Parallel Collector Serial App Thread GC Thread
  • 64. HotSpot Garbage Collectors in Java SE 6 -XX:+UseParallelGC -XX:+UseSerialGC -XX:+UseParNewGC G1 -XX:+UseG1GC -XX:+UseConcMarkSweepGC -XX:+UseParallelOldGC http://blogs.sun.com/jonthecollector/entry/our_collectors
  • 65. Selecting Garbage Collectors • Low Latencies (Pause) Collector (-XX:+UseConcMarkSweepGC) – Execute the application concurrently during Full GC – Constant response time on multi-CPU servers – To improve throughput, use the following for young gen • -XX:+UseParNewGC (and -XX:ParallelGCThreads=<n>)
  • 67. CMS Collector with ParNewGC App Thread GC Thread
  • 68. Hotspot JDK Heap Option Summary Generation Low Pause Collectors 1 CPU Young Serial Copying Collector (default) 2+ CPUs Parallel Copying Collector -XX:+UseParNewGC Throughput Collectors 1 CPU Serial Copying Collector (default) Heap Sizes 2+ CPUs Parallel Scavenge Collector -XX:NewSize -XX:MaxNewSize -XX:SurvivorRatio -XX:+UseParallelGC Concurrent Collector MarkCompact Collector (default) Old Permanent XX:+UseConcMarkSwe epGC MarkCompact Collector (default) Parallel Old -Xms -XX:+UseParallelOldGC -Xmx Can be turned off with –Xnoclassgc (use with care) New G1 Collector as of WLS10.3.1/JDK 6 Update 14 -XX:PermSize -XX:MaxPermSize
  • 69. G1 Collector • The Garbage-First Collector – – – – – – – – – Since JDK 6u14, officially supported as of JDK 7u4 -XX:+UseG1GC Future CMS Replacement Server “Style” low latency collector • Parallel • Concurrent Generational Good Throughput Compacting Improved ease-of-use Predictable (Soft Real-Time)
  • 70. G1 Collector • The Garbage-First Collector – – – – – – – – – Since JDK 6u14, officially supported as of JDK 7u4 -XX:+UseG1GC Future CMS Replacement Server “Style” low latency collector • Parallel • Concurrent Generational Good Throughput Compacting Improved ease-of-use Predictable (Soft Real-Time)
  • 71. G1 Collector: Parallelism & Concurrency App Thread GC Thread
  • 72. G1 – Garbage First Heap Layout Region Type S Eden S S Survivor Old Free
  • 73. CMS vs G1 Collectors • Heap split into regions • Young generation (A set of regions) • Old generation (A set of regions)
  • 77. G1 – Pros and Cons • Pros – Only one (concurrent) task needs to act on the whole heap • Nice since heaps are getting larger and larger – Parallel young and mixed collections • Nice since machines tend to have more and more cores – Has a lot of flexibility and built in heuristics for choosing young generation and the collection set – The only collector in Hotspot that is being actively developed • Cons – Heuristics in place but not fine tuned yet – Has a larger memory footprint – More concurrent work compared to other collectors
  • 78. G1 - Targeted Use Cases • Large heaps with limited GC latencies – Typically ~6GB or larger heaps • Applications that have – Varied object allocation rate – Undesired long GC or compaction pauses (greater than 0.5s) and want to lower down the pauses time • Tuning: – Garbage First Garbage Collector Tuning http://www.oracle.com/technetwork/articles/java/g1gc-1984535.html – Deep Dive into G1 Garbage Collector http://www.infoq.com/presentations/java-g1
  • 79. G1 - Currently Not Targeted Use Cases • Applications with very low latency requirements – Continue to use Deterministic GC or CMS • Maximum throughput with no latency requirements – Continue to use Throughput collector or Parallel/ParallelOld • Applications that continuously load and unload classes
  • 81. • Step-by-Step: Garbage Collection Tuning in the Java HotSpot™ Virtual Machine – JavaOne 2010 • The Garbage Collection Mythbusters – JavaOne 2010 • GC Tuning for the HotSpot JVM – JavaOne 2009 • http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html
  • 82. Hotspot Resources • Java Performance – Charlie Hunt, Binu John Hotspot Tuning Book • HotSpot GC Tuning Guide for Java SE 6 http://www.oracle.com/technetwork/java/javase/gc-tuning-6140523.html • Oracle University Training Java SE Performance Tuning Ed 1 • Memory Management in the Java HotSpot VM http://www.oracle.com/technetwork/java/javase/memorymana gement-whitepaper-150215.pdf • Java 6 Performance Whitepaper http://java.sun.com/performance/reference/whitepapers/6_performance.ht ml Oracle confidential; Pending legal review
  • 84. Java SE Advanced New • Both HotSpot and JRockit VMs under a single license • JRockit VM brings to the table • Intuitive, user-friendly tooling for monitoring, diagnosing and tuning a Java environment. • Dynamic Memory Leak Detection • Enterprise JRE features i.e. ability to turn auto update off, and usage tracking. Java SE Advanced * Oracle’s JRE * JRockit JDKs * Java(JRockit) Mission Control * Monitoring and Management features (including APIs for EM integration)
  • 85. Java (JRockit) Mission Control After JDK1.7.0_40 • Monitor health and performance in production • A suite of powerful tools for – Performance Tuning – Diagnostics – Support • Internal survey: 25% more efficient with JRMC 93
  • 88. Java(JRockit) Mission Control Profiling - Detect Hot Methods 96
  • 90. The Problem: The ”Intermittent Cycle” SLA Breach Server restart • [Sun 21:00] • [Sun 24:00] XXXX Analyze logs • [Mon 09:30] Turn on detailed logging • [Tue 13:00] Analyze logs • [Fri 09:00] Turn off detailed logging • [Fri 24:00] Analyze Logs and JFR • [Mon 09:30] 98
  • 91. How to use? • Java 7 update 40 above • Use following options to start the JMV which you want to monitor: – -XX:+UnlockCommercialFeatures – -XX:+FlightRecorder – -XX:FlightRecorderOptions=defaultrecording=true, dumponexit=true,dumponexitpath=/tmp/dumponexit.jfr” • Use Java Mission Control GUI (jmc) to analyze the result