SlideShare a Scribd company logo
淺談 Java GC
原理、調教和
新發展
 
Leon Chen
陳逸嘉

Java Architect
文曄科技
陳逸嘉 (Leon	
  Chen)
•  Master	
  of	
  NTHU	
  CS	
  
•  More	
  than	
  15	
  years	
  in	
  Java/JEE,	
  as	
  
programmer,	
  architect,	
  developer	
  leader	
  and	
  
consultant,	
  in	
  finance/telecom	
  domain.	
  
•  工研院
•  得捷
•  新光人壽
•  Ericsson	
  
•  Oracle	
  
•  文曄科技 (WT	
  Microelectronics)	
  
2
著作
•  TW	
  Patent	
  182927,	
  一種文章切割方法,	
  2003,	
  陳逸嘉,	
  林一中
•  TW	
  Patent	
  206819,	
  自動服務組合方法及系統,	
  2004,	
  陳逸嘉,	
  許維德,	
  洪
鵬翔 
•  US	
  Patent	
  7,617,174,	
  Method	
  and	
  system	
  for	
  automaRc	
  service	
  
composiRon,	
  2009,	
  Leon	
  Chen,	
  Wei-­‐Tek	
  Hsu,	
  Peng-­‐Hsiang	
  Hung	
  
3
Garbage	
  CollecRon
4
我真的需要花時間去 
Tune GC 嗎?
Performance	
  Impact	
  of	
  GC
5
Java	
  SE	
  6	
  HotSpot[tm]	
  Virtual	
  Machine	
  Garbage	
  CollecRon	
  Tuning	
  
h[p://www.oracle.com/technetwork/java/javase/gc-­‐tuning-­‐6-­‐140523.html
0.6
0.2
8
 32
有資格被回收的物件?
6
Java	
  Memory	
  Management
7
Java	
  Memory	
  Management
8
h[ps://www.youtube.com/watch?v=450maTzSIvA	
  
Tracing	
  GC	
  Example
9
Tracing	
  GC	
  Example
10
Tracing	
  GC	
  Example
11
Tracing	
  GC	
  Example
12
Tracing	
  GC	
  Example
13
Tracing	
  GC	
  Example
14
JAVA	
  HEAP	
  STRUCTURE	
  AND	
  GC
15
Hotspot	
  JVM	
  Heap	
  Layout
16
Young	
   Old	
  (Tenured)	
   Permanent	
  
Eden	
   From	
   To	
  
Survivor	
  Spaces	
  
NaRve	
  
-­‐Xms	
  -­‐Xmx	
  
-­‐XX:PermSize	
  
-­‐XX:MaxPermSize	
  
NO	
  
GC	
  Fundamentals	
  
Garbage	
  DistribuRon	
  –	
  Objects	
  die	
  young
17
18
GC	
  Fundamentals	
  
Garbage	
  DistribuRon	
  –	
  Objects	
  die	
  young
Minor	
  GC	
  (Young	
  GeneraRon	
  GC)
19
Young	
   Old	
  
Eden	
   From	
   To	
  
Survivor	
  Spaces	
  
Minor	
  GC	
  (Young	
  GeneraRon	
  GC)
20
Young	
   Old	
  
Eden	
   From	
   To	
  
Survivor	
  Spaces	
  
!
! !! !
! !
Minor	
  GC	
  (Young	
  GeneraRon	
  GC)
21
Young	
   Old	
  
Eden	
   From	
   To	
  
Survivor	
  Spaces	
  
1
 1
1
Minor	
  GC	
  (Young	
  GeneraRon	
  GC)
22
Young	
   Old	
  
Eden	
   To	
   From	
  
Survivor	
  Spaces	
  
1
 1
1
Minor	
  GC	
  (Young	
  GeneraRon	
  GC)
23
!
Young	
   Old	
  
Eden	
   To	
   From	
  
Survivor	
  Spaces	
  
! ! !
! ! ! !
1
 !
1
1	
  
1	
  
Minor	
  GC	
  (Young	
  GeneraRon	
  GC)
24
Young	
   Old	
  
Eden	
   To	
   From	
  
Survivor	
  Spaces	
  
1	
   2	
  
1	
   2	
  
Minor	
  GC	
  (Young	
  GeneraRon	
  GC)
25
Young	
   Old	
  
Eden	
   From	
   To	
  
Survivor	
  Spaces	
  
1	
   2	
  
1	
   2	
  
Minor	
  GC	
  (Young	
  GeneraRon	
  GC)
26
Young	
   Old	
  
Eden	
   From	
   To	
  
Survivor	
  Spaces	
  
16	
   1	
  
16	
   2	
  
! ! ! !
! ! ! !
16	
  
16	
  
Promo
Minor	
  GC	
  (Young	
  GeneraRon	
  GC)
27
Young	
   Old	
  
Eden	
   To	
   From	
  
Survivor	
  Spaces	
  
17	
  
17	
  
1
 2
1
 3	
  
Major	
  GC	
  (Old	
  GeneraRon	
  GC,	
  Full	
  GC)
28
Young	
   Old	
  
Eden	
   To	
   From	
  
Survivor	
  Spaces	
  
Major	
  GC	
  (Old	
  GeneraRon	
  GC,	
  Full	
  GC)
29
Young	
   Old	
  
Eden	
   To	
   From	
  
Survivor	
  Spaces	
  
!
!
!!
!
Major	
  GC	
  (Old	
  GeneraRon	
  GC,	
  Full	
  GC)
30
Young	
   Old	
  
Eden	
   To	
   From	
  
Survivor	
  Spaces	
  
Compact
Tuning	
  Guideline
•  讓	
  heap	
  的 size	
  足以容納程式的一般運作	
  
•  Major	
  GC	
  通常會比	
  Minor	
  GC	
  花更多的時間
•  盡可能減少	
  Major	
  GC	
  的次數	
  
31
HOTSPOT	
  GC	
  TUNING
32
33
花太多時間做 GC → Performance變慢
Performance變慢→花太多時間做 GC
不一定!!!
Performance	
  Tuning	
  Methodology
34
Advanced	
  JVM	
  Tuning;	
  Java	
  One	
  2011;	
  David	
  Keenan,	
  Monica	
  Beckwith	
  
GC	
  Logging	
  in	
  ProducRon
•  Don’t	
  be	
  afraid	
  to	
  enable	
  GC	
  logging	
  in	
  
producRon	
  
– Very	
  helpful	
  when	
  diagnosing	
  producRon	
  issues	
  
•  Extremely	
  low	
  /	
  non-­‐existent	
  overhead	
  
– Maybe	
  some	
  large	
  files	
  in	
  your	
  file	
  system.	
  
– We	
  are	
  surprised	
  that	
  customers	
  are	
  sRll	
  afraid	
  to	
  
enable	
  it	
  
35
36
If	
  Someone	
  doesn’t	
  enable	
  	
  
GC	
  logging	
  in	
  producEon	
  
I	
  shoot	
  them!	
  
Most	
  Important	
  GC	
  Logging	
  
Parameters
•  You	
  need	
  at	
  least:	
  
–  -­‐XX:+PrintGCDetails	
  
–  -­‐XX:+PrintGCTimeStamps	
  
•  Add	
  -­‐XX:+PrintGCDateStamps	
  if	
  you	
  must	
  know	
  the	
  Rme	
  
•  Also	
  useful	
  
–  -­‐Xloggc:file	
  
–  Rotate	
  GC	
  Log,	
  Aqer	
  Java	
  1.6_34	
  (or	
  1.7_2):	
  
-­‐XX:+UseGCLogFileRotaRon	
  	
  
-­‐XX:NumberOfGCLogFiles=5	
  	
  
-­‐XX:GCLogFileSize=10M	
  
37
GCViewer	
  –	
  Offline	
  analysis	
  of	
  GC	
  logs	
  
h[ps://github.com/chewiebug/GCViewer
38
GCViewer	
  –	
  Memory	
  Leak	
  Pa[ern	
  
39
Footprint	
  
(Heap	
  Size)
Latencies
Throughput
Footprint	
  
(Heap	
  Size)
Latencies
Throughput
Hotspot	
  Tuning	
  -­‐	
  Sizing	
  Heap
•  Young	
  GeneraRon	
  size	
  determines	
  
•  Frequency	
  of	
  minor	
  GC	
  	
  
•  Number	
  of	
  objects	
  reclaimed	
  in	
  minor	
  GC	
  
•  Old	
  GeneraRon	
  Size	
  
•  Should	
  hold	
  applicaRon'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	
  
42
Calculate Live Data Size (LDS)
•  經過 full	
  GC	
  後,	
  所剩下的	
  heap	
  size	
  
•  Make	
  sure	
  you	
  get	
  full	
  GCs	
  during	
  steady-­‐state	
  
•  Induce	
  a	
  couple	
  if	
  necessary	
  
– JConsole	
  /	
  VisualVM	
  
– jmap	
  -­‐histo:live	
  pid	
  
– System.gc	
  
•  Remove	
  it	
  before	
  deployment.	
  :-­‐)
43
Calculate	
  Live	
  Data	
  Size
•  GC	
  log	
  example:	
  
44
Calculate	
  Live	
  Data	
  Size	
  by	
  GCViewer
45
IniRal	
  Heap	
  ConfiguraRon
•  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	
  generaRon	
  sizes	
  accordingly	
  
•  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	
  
46
Hotspot	
  JVM	
  Heap	
  Layout
47
Young	
  –Xmn768m	
   Old	
  (Tenured)	
   Permanent	
   NaRve	
  
-­‐Xms2g	
  –Xmx2g	
  
-­‐XX:PermSize	
  
-­‐XX:MaxPermSize	
  
For	
  LDS	
  of	
  512m	
  :	
  -­‐Xmn768m	
  -­‐Xms2g	
  -­‐Xmx2g	
  
48
Footprint	
  
(Heap	
  Size)
Latencies
Throughput
High	
  Throughput	
  vs.	
  Low	
  Latency
49
High	
  Throughput	
   Low	
  Latency	
  
	
  
App Thread
GC Thread
專心
 分心
較低
 較高
較長
 較短
Stop the world
Total Cost
High	
  Throughput	
  vs.	
  Low	
  Latency
•  For	
  most	
  applicaRons,	
  GC	
  overhead	
  is	
  small	
  
–  2%	
  –	
  5%	
  
•  High	
  Throughput	
  GCs	
  
–  Move	
  most	
  work	
  to	
  GC	
  pauses	
  
–  ApplicaRon	
  threads	
  do	
  as	
  li[le	
  as	
  possible	
  
–  Least	
  overall	
  GC	
  overhead	
  
•  Low	
  Latency	
  (Pause)	
  GCs	
  
–  Move	
  work	
  out	
  of	
  GC	
  pauses	
  
–  ApplicaRon	
  threads	
  do	
  more	
  work	
  
•  Bookkeeping	
  for	
  GC	
  more	
  expensive	
  
–  More	
  overall	
  GC	
  overhead	
  
50
ApplicaRon	
  Requirement
•  Different	
  applicaRons	
  have	
  different	
  
requirements	
  
– Higher	
  Throughput:	
  
•  Batch	
  processing	
  
•  Web	
  applicaRon:	
  pauses	
  during	
  garbage	
  collecRon	
  may	
  
be	
  tolerable,	
  or	
  simply	
  obscured	
  by	
  network	
  latencies	
  	
  
– Lower	
  Latencies:	
  
•  InteracRve	
  graphics	
  applicaRon	
  
51
HotSpot	
  Garbage	
  Collectors	
  in	
  Java	
  SE	
  6
52
G1	
  
-XX:+UseSerialGC
-XX:+UseConcMarkSweepGC -XX:+UseParallelOldGC
-XX:+UseParallelGC
-­‐XX:+UseParNewGC
HotSpot	
  Garbage	
  Collectors	
  in	
  Java	
  SE	
  6
53
G1	
  
-XX:+UseSerialGC
-XX:+UseConcMarkSweepGC -XX:+UseParallelOldGC
-XX:+UseParallelGC
-­‐XX:+UseParNewGC
Serial	
  Collector
54
App Thread
GC Thread
stop-­‐the-­‐world	
  
pause	
  
Serial	
  
Collector	
  
HotSpot	
  Garbage	
  Collectors	
  in	
  Java	
  SE	
  6
55
G1	
  
-XX:+UseSerialGC
-XX:+UseConcMarkSweepGC -XX:+UseParallelOldGC
-XX:+UseParallelGC
-­‐XX:+UseParNewGC
Serial	
  VS	
  Parallel	
  Collector
56
App Thread
GC Thread
stop-­‐the-­‐world	
  
pause	
  
Serial	
  
Collector	
  
Parallel	
  
Collector	
  
HotSpot	
  Garbage	
  Collectors	
  in	
  Java	
  SE	
  6
57
G1	
  
-XX:+UseSerialGC
-XX:+UseConcMarkSweepGC -XX:+UseParallelOldGC
-XX:+UseParallelGC
-­‐XX:+UseParNewGC
CMS	
  Collector
58
App Thread
GC Thread
iniRal	
  mark	
  
concurrent	
  
marking	
  
remark	
  
concurrent	
  sweeping	
  
CMS	
  Collector	
  with	
  ParNewGC
59
App Thread
GC Thread
GC	
  SuggesRons
60
Low	
  Latency	
  Collectors	
   Throughput	
  Collectors	
  GeneraRon	
  
Young	
  
Old	
  
2+	
  CPUs	
  
-XX:+UseParNewGC
2+	
  CPUs	
  
-XX:+UseParallelGC
-XX:
+UseConcMarkSweepGC
-XX:+UseParallelOldGC
New	
  G1	
  Collector	
  as	
  of	
  WLS10.3.1/JDK	
  6	
  Update	
  14	
  
NEXT	
  GENERATION	
  GC
Problems	
  of	
  Current	
  GC
•  Memory	
  is	
  cheaper	
  and	
  cheaper	
  
•  64	
  bits	
  JVM	
  
•  We	
  can	
  use	
  very	
  large	
  heap!
Young	
   Old	
  
How	
  to	
  handle	
  large	
  heap	
  size?
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	
  
–  GeneraRonal	
  
–  Good	
  Throughput	
  
–  CompacRng	
  
–  Improved	
  ease-­‐of-­‐use	
  
–  Predictable	
  (Soq	
  Real-­‐Time)	
  
63
G1	
  –	
  Heap	
  Layout
64
S
S
Old
Eden
S Survivor
Free
Region Type
CMS	
  vs	
  G1	
  Collectors
65
• 	
  Heap	
  split	
  into	
  regions	
  	
  
• 	
  Young	
  generaRon	
  (A	
  set	
  of	
  regions)	
  
• 	
  Old	
  generaRon	
  (A	
  set	
  of	
  regions)	
  
G1	
  Collector:	
  	
  
Parallelism	
  	
  Concurrency
66
App Thread
GC Thread
GC	
  Comparison
67
GC	
  Comparison
68
GC	
  Comparison
69
GC	
  Comparison
70
h[p://blog.mgm-­‐tp.com/2013/03/garbage-­‐collecRon-­‐tuning/
什麼時候該使用G1?
•  Large	
  heaps	
  
– Typically	
  ~6GB	
  or	
  larger	
  heaps	
  
•  ApplicaRons	
  that	
  needs	
  low	
  pauses	
  
71
什麼時候不該使用 G1?
•  G1需要更多的compuRng	
  resources和
memory	
  來運行	
  
•  No	
  large	
  heaps	
  
– Typically	
  smaller	
  than	
  6GB	
  
•  ApplicaRons	
  that	
  don’t	
  need	
  low	
  pauses	
  
	
  
72
SUMMARIZE
Summarize
•  Professional	
  developer	
  必須非常了解	
  
variables,	
  objects	
  的	
  life	
  cycle,	
  objects	
  何時有
資格被會收	
  
•  GC	
  will	
  hurt	
  system	
  performance	
  
•  Must	
  monitor	
  GC	
  acRviRes	
  
•  Must	
  enable	
  GC	
  logging	
  
Tuning	
  Procedures
•  Observer	
  LDS	
  to	
  decide	
  iniRal	
  size	
  se~ng	
  
•  Use	
  parallel	
  GC	
  first	
  
•  If	
  the	
  GC	
  pause	
  Rme	
  can’t	
  be	
  accepted,	
  then	
  
trying	
  to	
  use	
  CMS	
  
•  If	
  heap	
  is	
  over	
  6G,	
  and	
  look	
  for	
  lower	
  down	
  
pause	
  Rme,	
  you	
  can	
  consider	
  G1	
  
•  Monitoring	
  -­‐	
  Analyzing	
  -­‐	
  Tuning	
  -­‐	
  
Monitoring	
  -­‐	
  …
75
REFERENCES
76
References
•  Step-­‐by-­‐Step:	
  Garbage	
  CollecRon	
  Tuning	
  in	
  the	
  
Java	
  HotSpot™	
  Virtual	
  Machine	
  –	
  JavaOne	
  2010	
  
•  The	
  Garbage	
  CollecRon	
  Mythbusters	
  –	
  JavaOne	
  
2010	
  
•  GC	
  Tuning	
  for	
  the	
  HotSpot	
  JVM	
  –	
  JavaOne	
  2009	
  
•  uPortal	
  Performance	
  OpRmizaRon.	
  Faizan	
  
Ahmed.	
  Architect	
  and	
  Engineering	
  Group.	
  
Enterprise	
  Systems	
  	
  Services.	
  RUTGERS.	
  
faizan@rutgers.edu.	
  
•  h[p://java.sun.com/javase/technologies/hotspot/gc/
gc_tuning_6.html	
  
•  Java	
  Performance	
  –	
  	
  
Charlie	
  Hunt,	
  Binu	
  John	
  	
  
•  HotSpot	
  GC	
  Tuning	
  Guide	
  	
  
for	
  Java	
  SE	
  6	
  
h[p://www.oracle.com/technetwork/java/javase/gc-­‐
tuning-­‐6-­‐140523.html	
  
•  Memory	
  Management	
  in	
  the	
  
Java	
  HotSpot	
  VM	
  
h[p://www.oracle.com/technetwork/java/javase/
memorymanagement-­‐whitepaper-­‐150215.pdf	
  
•  Java	
  6	
  Performance	
  Whitepaper	
  
h]p://java.sun.com/performance/reference/whitepapers/6_performance.html	
  
78
QA
79
Parallel	
  
Concurrent	
  
(CMS)	
  
G1	
  

More Related Content

What's hot

Gatling overview
Gatling overviewGatling overview
Gatling overview
Viral Jain
 
Splunking the JVM (Java Virtual Machine)
Splunking the JVM (Java Virtual Machine)Splunking the JVM (Java Virtual Machine)
Splunking the JVM (Java Virtual Machine)
Damien Dallimore
 
Apache kafka performance(latency)_benchmark_v0.3
Apache kafka performance(latency)_benchmark_v0.3Apache kafka performance(latency)_benchmark_v0.3
Apache kafka performance(latency)_benchmark_v0.3
SANG WON PARK
 
Lessons learned from operating Data Platform on Kubernetes(EKS)
Lessons learned from operating Data Platform on Kubernetes(EKS)Lessons learned from operating Data Platform on Kubernetes(EKS)
Lessons learned from operating Data Platform on Kubernetes(EKS)
창언 정
 
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
Amazon Web Services Korea
 
AxonIQ GDPR Module Overview - Feb 2018
AxonIQ GDPR Module Overview - Feb 2018AxonIQ GDPR Module Overview - Feb 2018
AxonIQ GDPR Module Overview - Feb 2018
Frans van Buul
 
Playwright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern WebPlaywright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern Web
Applitools
 
Papel do QA na Transformação Ágil
Papel do QA na Transformação ÁgilPapel do QA na Transformação Ágil
Papel do QA na Transformação Ágil
Elias Nogueira
 
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
SANG WON PARK
 
VM과 컨테이너 상에서 Apache & Tomcat 설치, 실행 그리고 배포 데모
VM과 컨테이너 상에서 Apache & Tomcat 설치, 실행 그리고 배포 데모VM과 컨테이너 상에서 Apache & Tomcat 설치, 실행 그리고 배포 데모
VM과 컨테이너 상에서 Apache & Tomcat 설치, 실행 그리고 배포 데모
Opennaru, inc.
 
서버리스 데이터 플로우 개발기 - 김재현 (Superb AI) :: AWS Community Day 2020
서버리스 데이터 플로우 개발기 - 김재현 (Superb AI) :: AWS Community Day 2020서버리스 데이터 플로우 개발기 - 김재현 (Superb AI) :: AWS Community Day 2020
서버리스 데이터 플로우 개발기 - 김재현 (Superb AI) :: AWS Community Day 2020
AWSKRUG - AWS한국사용자모임
 
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
José Paumard
 
Python Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkPython Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on Flink
Aljoscha Krettek
 
Quarkus k8s
Quarkus   k8sQuarkus   k8s
실전 서버 부하테스트 노하우
실전 서버 부하테스트 노하우 실전 서버 부하테스트 노하우
실전 서버 부하테스트 노하우
YoungSu Son
 
Postman과 Newman을 이용한 RestAPI 테스트 자동화 가이드
Postman과 Newman을 이용한 RestAPI 테스트 자동화 가이드 Postman과 Newman을 이용한 RestAPI 테스트 자동화 가이드
Postman과 Newman을 이용한 RestAPI 테스트 자동화 가이드
SangIn Choung
 
20190319 AWS Black Belt Online Seminar Amazon FSx for Lustre
20190319 AWS Black Belt Online Seminar Amazon FSx for Lustre20190319 AWS Black Belt Online Seminar Amazon FSx for Lustre
20190319 AWS Black Belt Online Seminar Amazon FSx for Lustre
Amazon Web Services Japan
 
Creating_scheduled_reports_with_Zabbix.pdf
Creating_scheduled_reports_with_Zabbix.pdfCreating_scheduled_reports_with_Zabbix.pdf
Creating_scheduled_reports_with_Zabbix.pdf
ITDispendik
 
Spring Cloud Data Flow Overview
Spring Cloud Data Flow OverviewSpring Cloud Data Flow Overview
Spring Cloud Data Flow Overview
VMware Tanzu
 
How Booking.com avoids and deals with replication lag
How Booking.com avoids and deals with replication lagHow Booking.com avoids and deals with replication lag
How Booking.com avoids and deals with replication lag
Jean-François Gagné
 

What's hot (20)

Gatling overview
Gatling overviewGatling overview
Gatling overview
 
Splunking the JVM (Java Virtual Machine)
Splunking the JVM (Java Virtual Machine)Splunking the JVM (Java Virtual Machine)
Splunking the JVM (Java Virtual Machine)
 
Apache kafka performance(latency)_benchmark_v0.3
Apache kafka performance(latency)_benchmark_v0.3Apache kafka performance(latency)_benchmark_v0.3
Apache kafka performance(latency)_benchmark_v0.3
 
Lessons learned from operating Data Platform on Kubernetes(EKS)
Lessons learned from operating Data Platform on Kubernetes(EKS)Lessons learned from operating Data Platform on Kubernetes(EKS)
Lessons learned from operating Data Platform on Kubernetes(EKS)
 
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
 
AxonIQ GDPR Module Overview - Feb 2018
AxonIQ GDPR Module Overview - Feb 2018AxonIQ GDPR Module Overview - Feb 2018
AxonIQ GDPR Module Overview - Feb 2018
 
Playwright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern WebPlaywright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern Web
 
Papel do QA na Transformação Ágil
Papel do QA na Transformação ÁgilPapel do QA na Transformação Ágil
Papel do QA na Transformação Ágil
 
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
 
VM과 컨테이너 상에서 Apache & Tomcat 설치, 실행 그리고 배포 데모
VM과 컨테이너 상에서 Apache & Tomcat 설치, 실행 그리고 배포 데모VM과 컨테이너 상에서 Apache & Tomcat 설치, 실행 그리고 배포 데모
VM과 컨테이너 상에서 Apache & Tomcat 설치, 실행 그리고 배포 데모
 
서버리스 데이터 플로우 개발기 - 김재현 (Superb AI) :: AWS Community Day 2020
서버리스 데이터 플로우 개발기 - 김재현 (Superb AI) :: AWS Community Day 2020서버리스 데이터 플로우 개발기 - 김재현 (Superb AI) :: AWS Community Day 2020
서버리스 데이터 플로우 개발기 - 김재현 (Superb AI) :: AWS Community Day 2020
 
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
 
Python Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkPython Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on Flink
 
Quarkus k8s
Quarkus   k8sQuarkus   k8s
Quarkus k8s
 
실전 서버 부하테스트 노하우
실전 서버 부하테스트 노하우 실전 서버 부하테스트 노하우
실전 서버 부하테스트 노하우
 
Postman과 Newman을 이용한 RestAPI 테스트 자동화 가이드
Postman과 Newman을 이용한 RestAPI 테스트 자동화 가이드 Postman과 Newman을 이용한 RestAPI 테스트 자동화 가이드
Postman과 Newman을 이용한 RestAPI 테스트 자동화 가이드
 
20190319 AWS Black Belt Online Seminar Amazon FSx for Lustre
20190319 AWS Black Belt Online Seminar Amazon FSx for Lustre20190319 AWS Black Belt Online Seminar Amazon FSx for Lustre
20190319 AWS Black Belt Online Seminar Amazon FSx for Lustre
 
Creating_scheduled_reports_with_Zabbix.pdf
Creating_scheduled_reports_with_Zabbix.pdfCreating_scheduled_reports_with_Zabbix.pdf
Creating_scheduled_reports_with_Zabbix.pdf
 
Spring Cloud Data Flow Overview
Spring Cloud Data Flow OverviewSpring Cloud Data Flow Overview
Spring Cloud Data Flow Overview
 
How Booking.com avoids and deals with replication lag
How Booking.com avoids and deals with replication lagHow Booking.com avoids and deals with replication lag
How Booking.com avoids and deals with replication lag
 

Viewers also liked

淺談JavaFX 遊戲程式
淺談JavaFX 遊戲程式淺談JavaFX 遊戲程式
淺談JavaFX 遊戲程式
CodeData
 
JVM及其调优
JVM及其调优JVM及其调优
JVM及其调优
zhongbing liu
 
Introduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission ControlIntroduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission Control
Leon Chen
 
Java Garbage Collection(GC)- Study
Java Garbage Collection(GC)- StudyJava Garbage Collection(GC)- Study
Java Garbage Collection(GC)- Study
Dhanu Gupta
 
Java GC, Off-heap workshop
Java GC, Off-heap workshopJava GC, Off-heap workshop
Java GC, Off-heap workshop
Valerii Moisieienko
 
全文搜尋引擎的進階實作與應用
全文搜尋引擎的進階實作與應用全文搜尋引擎的進階實作與應用
全文搜尋引擎的進階實作與應用建興 王
 
Spock:願你的測試長長久久、生生不息
Spock:願你的測試長長久久、生生不息Spock:願你的測試長長久久、生生不息
Spock:願你的測試長長久久、生生不息
Shihpeng Lin
 
Java GC Tuning
Java GC TuningJava GC Tuning
Java GC Tuning
pprun
 
What could hadoop do for us
What could hadoop do for us What could hadoop do for us
What could hadoop do for us
Simon Hsu
 
Jvm基础调优实践(v1.0)
Jvm基础调优实践(v1.0)Jvm基础调优实践(v1.0)
Jvm基础调优实践(v1.0)
ddviplinux
 
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
 
淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合
Kyle Lin
 
自己的JVM自己救: 解救 OOM 實務經驗談 (JCConf 2015)
自己的JVM自己救: 解救 OOM 實務經驗談  (JCConf 2015)自己的JVM自己救: 解救 OOM 實務經驗談  (JCConf 2015)
自己的JVM自己救: 解救 OOM 實務經驗談 (JCConf 2015)
Leon Chen
 
大型网站架构演变
大型网站架构演变大型网站架构演变
大型网站架构演变
xiaozhen1900
 
Lock Interface in Java
Lock Interface in JavaLock Interface in Java
Lock Interface in Java
Home
 
App开发过程的演变之路
App开发过程的演变之路App开发过程的演变之路
App开发过程的演变之路
诸葛修车网-诸葛商城
 
Git基础培训
Git基础培训Git基础培训
Save JVM by Yourself: Real War Experiences of OOM
Save JVM by Yourself: Real War Experiences of OOMSave JVM by Yourself: Real War Experiences of OOM
Save JVM by Yourself: Real War Experiences of OOM
Leon Chen
 
Building a lock profiler on the JVM
Building a lock profiler on the JVMBuilding a lock profiler on the JVM
Building a lock profiler on the JVM
Pierre Laporte
 

Viewers also liked (20)

淺談JavaFX 遊戲程式
淺談JavaFX 遊戲程式淺談JavaFX 遊戲程式
淺談JavaFX 遊戲程式
 
JVM及其调优
JVM及其调优JVM及其调优
JVM及其调优
 
Introduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission ControlIntroduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission Control
 
Java Garbage Collection(GC)- Study
Java Garbage Collection(GC)- StudyJava Garbage Collection(GC)- Study
Java Garbage Collection(GC)- Study
 
Java GC, Off-heap workshop
Java GC, Off-heap workshopJava GC, Off-heap workshop
Java GC, Off-heap workshop
 
全文搜尋引擎的進階實作與應用
全文搜尋引擎的進階實作與應用全文搜尋引擎的進階實作與應用
全文搜尋引擎的進階實作與應用
 
Java GC
Java GCJava GC
Java GC
 
Spock:願你的測試長長久久、生生不息
Spock:願你的測試長長久久、生生不息Spock:願你的測試長長久久、生生不息
Spock:願你的測試長長久久、生生不息
 
Java GC Tuning
Java GC TuningJava GC Tuning
Java GC Tuning
 
What could hadoop do for us
What could hadoop do for us What could hadoop do for us
What could hadoop do for us
 
Jvm基础调优实践(v1.0)
Jvm基础调优实践(v1.0)Jvm基础调优实践(v1.0)
Jvm基础调优实践(v1.0)
 
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
 
淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合
 
自己的JVM自己救: 解救 OOM 實務經驗談 (JCConf 2015)
自己的JVM自己救: 解救 OOM 實務經驗談  (JCConf 2015)自己的JVM自己救: 解救 OOM 實務經驗談  (JCConf 2015)
自己的JVM自己救: 解救 OOM 實務經驗談 (JCConf 2015)
 
大型网站架构演变
大型网站架构演变大型网站架构演变
大型网站架构演变
 
Lock Interface in Java
Lock Interface in JavaLock Interface in Java
Lock Interface in Java
 
App开发过程的演变之路
App开发过程的演变之路App开发过程的演变之路
App开发过程的演变之路
 
Git基础培训
Git基础培训Git基础培训
Git基础培训
 
Save JVM by Yourself: Real War Experiences of OOM
Save JVM by Yourself: Real War Experiences of OOMSave JVM by Yourself: Real War Experiences of OOM
Save JVM by Yourself: Real War Experiences of OOM
 
Building a lock profiler on the JVM
Building a lock profiler on the JVMBuilding a lock profiler on the JVM
Building a lock profiler on the JVM
 

Similar to 淺談 Java GC 原理、調教和 新發展

Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...
Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...
Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...
Monica Beckwith
 
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GCHadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Erik Krogen
 
Basics of JVM Tuning
Basics of JVM TuningBasics of JVM Tuning
Basics of JVM Tuning
Vladislav Gangan
 
[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
Bruno Borges
 
Secrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on KubernetesSecrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on Kubernetes
Bruno Borges
 
ZGC-SnowOne.pdf
ZGC-SnowOne.pdfZGC-SnowOne.pdf
ZGC-SnowOne.pdf
Monica Beckwith
 
GC Tuning Confessions Of A Performance Engineer
GC Tuning Confessions Of A Performance EngineerGC Tuning Confessions Of A Performance Engineer
GC Tuning Confessions Of A Performance Engineer
Monica Beckwith
 
Tuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issuesTuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issues
Sergey Podolsky
 
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
Spark Summit
 
this-is-garbage-talk-2022.pptx
this-is-garbage-talk-2022.pptxthis-is-garbage-talk-2022.pptx
this-is-garbage-talk-2022.pptx
Tier1 app
 
High Performance Erlang - Pitfalls and Solutions
High Performance Erlang - Pitfalls and SolutionsHigh Performance Erlang - Pitfalls and Solutions
High Performance Erlang - Pitfalls and Solutions
Yinghai Lu
 
Java Performance Tuning
Java Performance TuningJava Performance Tuning
Java Performance Tuning
Ender Aydin Orak
 
Troubleshooting Memory Problems in Java Applications
Troubleshooting Memory Problems in Java ApplicationsTroubleshooting Memory Problems in Java Applications
Troubleshooting Memory Problems in Java Applications
Poonam Bajaj Parhar
 
Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Am I reading GC logs Correctly?
Am I reading GC logs Correctly?
Tier1 App
 
Java performance tuning
Java performance tuningJava performance tuning
Java performance tuning
Mohammed Fazuluddin
 
Slices Of Performance in Java - Oleksandr Bodnar
Slices Of Performance in Java - Oleksandr BodnarSlices Of Performance in Java - Oleksandr Bodnar
Slices Of Performance in Java - Oleksandr Bodnar
GlobalLogic Ukraine
 
Sun jdk 1.6内存管理 -实现篇 -毕玄
Sun jdk 1.6内存管理 -实现篇 -毕玄Sun jdk 1.6内存管理 -实现篇 -毕玄
Sun jdk 1.6内存管理 -实现篇 -毕玄锐 张
 
JVM @ Taobao - QCon Hangzhou 2011
JVM @ Taobao - QCon Hangzhou 2011JVM @ Taobao - QCon Hangzhou 2011
JVM @ Taobao - QCon Hangzhou 2011
Kris Mok
 
Clr jvm implementation differences
Clr jvm implementation differencesClr jvm implementation differences
Clr jvm implementation differences
Jean-Philippe BEMPEL
 
Performance Tuning - Understanding Garbage Collection
Performance Tuning - Understanding Garbage CollectionPerformance Tuning - Understanding Garbage Collection
Performance Tuning - Understanding Garbage Collection
Haribabu Nandyal Padmanaban
 

Similar to 淺談 Java GC 原理、調教和 新發展 (20)

Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...
Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...
Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...
 
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GCHadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
 
Basics of JVM Tuning
Basics of JVM TuningBasics of JVM Tuning
Basics of JVM Tuning
 
[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
 
Secrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on KubernetesSecrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on Kubernetes
 
ZGC-SnowOne.pdf
ZGC-SnowOne.pdfZGC-SnowOne.pdf
ZGC-SnowOne.pdf
 
GC Tuning Confessions Of A Performance Engineer
GC Tuning Confessions Of A Performance EngineerGC Tuning Confessions Of A Performance Engineer
GC Tuning Confessions Of A Performance Engineer
 
Tuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issuesTuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issues
 
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
 
this-is-garbage-talk-2022.pptx
this-is-garbage-talk-2022.pptxthis-is-garbage-talk-2022.pptx
this-is-garbage-talk-2022.pptx
 
High Performance Erlang - Pitfalls and Solutions
High Performance Erlang - Pitfalls and SolutionsHigh Performance Erlang - Pitfalls and Solutions
High Performance Erlang - Pitfalls and Solutions
 
Java Performance Tuning
Java Performance TuningJava Performance Tuning
Java 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
 
Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Am I reading GC logs Correctly?
Am I reading GC logs Correctly?
 
Java performance tuning
Java performance tuningJava performance tuning
Java performance tuning
 
Slices Of Performance in Java - Oleksandr Bodnar
Slices Of Performance in Java - Oleksandr BodnarSlices Of Performance in Java - Oleksandr Bodnar
Slices Of Performance in Java - Oleksandr Bodnar
 
Sun jdk 1.6内存管理 -实现篇 -毕玄
Sun jdk 1.6内存管理 -实现篇 -毕玄Sun jdk 1.6内存管理 -实现篇 -毕玄
Sun jdk 1.6内存管理 -实现篇 -毕玄
 
JVM @ Taobao - QCon Hangzhou 2011
JVM @ Taobao - QCon Hangzhou 2011JVM @ Taobao - QCon Hangzhou 2011
JVM @ Taobao - QCon Hangzhou 2011
 
Clr jvm implementation differences
Clr jvm implementation differencesClr jvm implementation differences
Clr jvm implementation differences
 
Performance Tuning - Understanding Garbage Collection
Performance Tuning - Understanding Garbage CollectionPerformance Tuning - Understanding Garbage Collection
Performance Tuning - Understanding Garbage Collection
 

Recently uploaded

Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
MayankTawar1
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 

Recently uploaded (20)

Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 

淺談 Java GC 原理、調教和 新發展

  • 1. 淺談 Java GC 原理、調教和 新發展   Leon Chen 陳逸嘉 Java Architect 文曄科技
  • 2. 陳逸嘉 (Leon  Chen) •  Master  of  NTHU  CS   •  More  than  15  years  in  Java/JEE,  as   programmer,  architect,  developer  leader  and   consultant,  in  finance/telecom  domain.   •  工研院 •  得捷 •  新光人壽 •  Ericsson   •  Oracle   •  文曄科技 (WT  Microelectronics)   2
  • 3. 著作 •  TW  Patent  182927,  一種文章切割方法,  2003,  陳逸嘉,  林一中 •  TW  Patent  206819,  自動服務組合方法及系統,  2004,  陳逸嘉,  許維德,  洪 鵬翔 •  US  Patent  7,617,174,  Method  and  system  for  automaRc  service   composiRon,  2009,  Leon  Chen,  Wei-­‐Tek  Hsu,  Peng-­‐Hsiang  Hung   3
  • 5. Performance  Impact  of  GC 5 Java  SE  6  HotSpot[tm]  Virtual  Machine  Garbage  CollecRon  Tuning   h[p://www.oracle.com/technetwork/java/javase/gc-­‐tuning-­‐6-­‐140523.html 0.6 0.2 8 32
  • 15. JAVA  HEAP  STRUCTURE  AND  GC 15
  • 16. Hotspot  JVM  Heap  Layout 16 Young   Old  (Tenured)   Permanent   Eden   From   To   Survivor  Spaces   NaRve   -­‐Xms  -­‐Xmx   -­‐XX:PermSize   -­‐XX:MaxPermSize   NO  
  • 17. GC  Fundamentals   Garbage  DistribuRon  –  Objects  die  young 17
  • 18. 18 GC  Fundamentals   Garbage  DistribuRon  –  Objects  die  young
  • 19. Minor  GC  (Young  GeneraRon  GC) 19 Young   Old   Eden   From   To   Survivor  Spaces  
  • 20. Minor  GC  (Young  GeneraRon  GC) 20 Young   Old   Eden   From   To   Survivor  Spaces   ! ! !! ! ! !
  • 21. Minor  GC  (Young  GeneraRon  GC) 21 Young   Old   Eden   From   To   Survivor  Spaces   1 1 1
  • 22. Minor  GC  (Young  GeneraRon  GC) 22 Young   Old   Eden   To   From   Survivor  Spaces   1 1 1
  • 23. Minor  GC  (Young  GeneraRon  GC) 23 ! Young   Old   Eden   To   From   Survivor  Spaces   ! ! ! ! ! ! ! 1 ! 1 1   1  
  • 24. Minor  GC  (Young  GeneraRon  GC) 24 Young   Old   Eden   To   From   Survivor  Spaces   1   2   1   2  
  • 25. Minor  GC  (Young  GeneraRon  GC) 25 Young   Old   Eden   From   To   Survivor  Spaces   1   2   1   2  
  • 26. Minor  GC  (Young  GeneraRon  GC) 26 Young   Old   Eden   From   To   Survivor  Spaces   16   1   16   2   ! ! ! ! ! ! ! ! 16   16   Promo
  • 27. Minor  GC  (Young  GeneraRon  GC) 27 Young   Old   Eden   To   From   Survivor  Spaces   17   17   1 2 1 3  
  • 28. Major  GC  (Old  GeneraRon  GC,  Full  GC) 28 Young   Old   Eden   To   From   Survivor  Spaces  
  • 29. Major  GC  (Old  GeneraRon  GC,  Full  GC) 29 Young   Old   Eden   To   From   Survivor  Spaces   ! ! !! !
  • 30. Major  GC  (Old  GeneraRon  GC,  Full  GC) 30 Young   Old   Eden   To   From   Survivor  Spaces   Compact
  • 31. Tuning  Guideline •  讓  heap  的 size  足以容納程式的一般運作   •  Major  GC  通常會比  Minor  GC  花更多的時間 •  盡可能減少  Major  GC  的次數   31
  • 33. 33 花太多時間做 GC → Performance變慢 Performance變慢→花太多時間做 GC 不一定!!!
  • 34. Performance  Tuning  Methodology 34 Advanced  JVM  Tuning;  Java  One  2011;  David  Keenan,  Monica  Beckwith  
  • 35. GC  Logging  in  ProducRon •  Don’t  be  afraid  to  enable  GC  logging  in   producRon   – Very  helpful  when  diagnosing  producRon  issues   •  Extremely  low  /  non-­‐existent  overhead   – Maybe  some  large  files  in  your  file  system.   – We  are  surprised  that  customers  are  sRll  afraid  to   enable  it   35
  • 36. 36 If  Someone  doesn’t  enable     GC  logging  in  producEon   I  shoot  them!  
  • 37. Most  Important  GC  Logging   Parameters •  You  need  at  least:   –  -­‐XX:+PrintGCDetails   –  -­‐XX:+PrintGCTimeStamps   •  Add  -­‐XX:+PrintGCDateStamps  if  you  must  know  the  Rme   •  Also  useful   –  -­‐Xloggc:file   –  Rotate  GC  Log,  Aqer  Java  1.6_34  (or  1.7_2):   -­‐XX:+UseGCLogFileRotaRon     -­‐XX:NumberOfGCLogFiles=5     -­‐XX:GCLogFileSize=10M   37
  • 38. GCViewer  –  Offline  analysis  of  GC  logs   h[ps://github.com/chewiebug/GCViewer 38
  • 39. GCViewer  –  Memory  Leak  Pa[ern   39
  • 42. Hotspot  Tuning  -­‐  Sizing  Heap •  Young  GeneraRon  size  determines   •  Frequency  of  minor  GC     •  Number  of  objects  reclaimed  in  minor  GC   •  Old  GeneraRon  Size   •  Should  hold  applicaRon'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   42
  • 43. Calculate Live Data Size (LDS) •  經過 full  GC  後,  所剩下的  heap  size   •  Make  sure  you  get  full  GCs  during  steady-­‐state   •  Induce  a  couple  if  necessary   – JConsole  /  VisualVM   – jmap  -­‐histo:live  pid   – System.gc   •  Remove  it  before  deployment.  :-­‐) 43
  • 44. Calculate  Live  Data  Size •  GC  log  example:   44
  • 45. Calculate  Live  Data  Size  by  GCViewer 45
  • 46. IniRal  Heap  ConfiguraRon •  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  generaRon  sizes  accordingly   •  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   46
  • 47. Hotspot  JVM  Heap  Layout 47 Young  –Xmn768m   Old  (Tenured)   Permanent   NaRve   -­‐Xms2g  –Xmx2g   -­‐XX:PermSize   -­‐XX:MaxPermSize   For  LDS  of  512m  :  -­‐Xmn768m  -­‐Xms2g  -­‐Xmx2g  
  • 49. High  Throughput  vs.  Low  Latency 49 High  Throughput   Low  Latency     App Thread GC Thread 專心 分心 較低 較高 較長 較短 Stop the world Total Cost
  • 50. High  Throughput  vs.  Low  Latency •  For  most  applicaRons,  GC  overhead  is  small   –  2%  –  5%   •  High  Throughput  GCs   –  Move  most  work  to  GC  pauses   –  ApplicaRon  threads  do  as  li[le  as  possible   –  Least  overall  GC  overhead   •  Low  Latency  (Pause)  GCs   –  Move  work  out  of  GC  pauses   –  ApplicaRon  threads  do  more  work   •  Bookkeeping  for  GC  more  expensive   –  More  overall  GC  overhead   50
  • 51. ApplicaRon  Requirement •  Different  applicaRons  have  different   requirements   – Higher  Throughput:   •  Batch  processing   •  Web  applicaRon:  pauses  during  garbage  collecRon  may   be  tolerable,  or  simply  obscured  by  network  latencies     – Lower  Latencies:   •  InteracRve  graphics  applicaRon   51
  • 52. HotSpot  Garbage  Collectors  in  Java  SE  6 52 G1   -XX:+UseSerialGC -XX:+UseConcMarkSweepGC -XX:+UseParallelOldGC -XX:+UseParallelGC -­‐XX:+UseParNewGC
  • 53. HotSpot  Garbage  Collectors  in  Java  SE  6 53 G1   -XX:+UseSerialGC -XX:+UseConcMarkSweepGC -XX:+UseParallelOldGC -XX:+UseParallelGC -­‐XX:+UseParNewGC
  • 54. Serial  Collector 54 App Thread GC Thread stop-­‐the-­‐world   pause   Serial   Collector  
  • 55. HotSpot  Garbage  Collectors  in  Java  SE  6 55 G1   -XX:+UseSerialGC -XX:+UseConcMarkSweepGC -XX:+UseParallelOldGC -XX:+UseParallelGC -­‐XX:+UseParNewGC
  • 56. Serial  VS  Parallel  Collector 56 App Thread GC Thread stop-­‐the-­‐world   pause   Serial   Collector   Parallel   Collector  
  • 57. HotSpot  Garbage  Collectors  in  Java  SE  6 57 G1   -XX:+UseSerialGC -XX:+UseConcMarkSweepGC -XX:+UseParallelOldGC -XX:+UseParallelGC -­‐XX:+UseParNewGC
  • 58. CMS  Collector 58 App Thread GC Thread iniRal  mark   concurrent   marking   remark   concurrent  sweeping  
  • 59. CMS  Collector  with  ParNewGC 59 App Thread GC Thread
  • 60. GC  SuggesRons 60 Low  Latency  Collectors   Throughput  Collectors  GeneraRon   Young   Old   2+  CPUs   -XX:+UseParNewGC 2+  CPUs   -XX:+UseParallelGC -XX: +UseConcMarkSweepGC -XX:+UseParallelOldGC New  G1  Collector  as  of  WLS10.3.1/JDK  6  Update  14  
  • 62. Problems  of  Current  GC •  Memory  is  cheaper  and  cheaper   •  64  bits  JVM   •  We  can  use  very  large  heap! Young   Old   How  to  handle  large  heap  size?
  • 63. 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   –  GeneraRonal   –  Good  Throughput   –  CompacRng   –  Improved  ease-­‐of-­‐use   –  Predictable  (Soq  Real-­‐Time)   63
  • 64. G1  –  Heap  Layout 64 S S Old Eden S Survivor Free Region Type
  • 65. CMS  vs  G1  Collectors 65 •   Heap  split  into  regions     •   Young  generaRon  (A  set  of  regions)   •   Old  generaRon  (A  set  of  regions)  
  • 66. G1  Collector:     Parallelism    Concurrency 66 App Thread GC Thread
  • 71. 什麼時候該使用G1? •  Large  heaps   – Typically  ~6GB  or  larger  heaps   •  ApplicaRons  that  needs  low  pauses   71
  • 72. 什麼時候不該使用 G1? •  G1需要更多的compuRng  resources和 memory  來運行   •  No  large  heaps   – Typically  smaller  than  6GB   •  ApplicaRons  that  don’t  need  low  pauses     72
  • 74. Summarize •  Professional  developer  必須非常了解   variables,  objects  的  life  cycle,  objects  何時有 資格被會收   •  GC  will  hurt  system  performance   •  Must  monitor  GC  acRviRes   •  Must  enable  GC  logging  
  • 75. Tuning  Procedures •  Observer  LDS  to  decide  iniRal  size  se~ng   •  Use  parallel  GC  first   •  If  the  GC  pause  Rme  can’t  be  accepted,  then   trying  to  use  CMS   •  If  heap  is  over  6G,  and  look  for  lower  down   pause  Rme,  you  can  consider  G1   •  Monitoring  -­‐  Analyzing  -­‐  Tuning  -­‐   Monitoring  -­‐  … 75
  • 77. References •  Step-­‐by-­‐Step:  Garbage  CollecRon  Tuning  in  the   Java  HotSpot™  Virtual  Machine  –  JavaOne  2010   •  The  Garbage  CollecRon  Mythbusters  –  JavaOne   2010   •  GC  Tuning  for  the  HotSpot  JVM  –  JavaOne  2009   •  uPortal  Performance  OpRmizaRon.  Faizan   Ahmed.  Architect  and  Engineering  Group.   Enterprise  Systems    Services.  RUTGERS.   faizan@rutgers.edu.   •  h[p://java.sun.com/javase/technologies/hotspot/gc/ gc_tuning_6.html  
  • 78. •  Java  Performance  –     Charlie  Hunt,  Binu  John     •  HotSpot  GC  Tuning  Guide     for  Java  SE  6   h[p://www.oracle.com/technetwork/java/javase/gc-­‐ tuning-­‐6-­‐140523.html   •  Memory  Management  in  the   Java  HotSpot  VM   h[p://www.oracle.com/technetwork/java/javase/ memorymanagement-­‐whitepaper-­‐150215.pdf   •  Java  6  Performance  Whitepaper   h]p://java.sun.com/performance/reference/whitepapers/6_performance.html   78
  • 79. QA 79