SlideShare uma empresa Scribd logo
1 de 135
Baixar para ler offline
© 2013 IBM Corporation
Ryan	
  A.	
  Sciampacone	
  –	
  Managed	
  Run4me	
  Architect	
  
24	
  September	
  2013	
  
Garbage	
  Collec4on	
  Unleashed	
  
Demys4fying	
  the	
  Wizardry	
  
© 2013 IBM Corporation
Important	
  Disclaimers	
  
THE	
  INFORMATION	
  CONTAINED	
  IN	
  THIS	
  PRESENTATION	
  IS	
  PROVIDED	
  FOR	
  INFORMATIONAL	
  PURPOSES	
  ONLY.	
  	
  
WHILST	
  EFFORTS	
  WERE	
  MADE	
  TO	
  VERIFY	
  THE	
  COMPLETENESS	
  AND	
  ACCURACY	
  OF	
  THE	
  INFORMATION	
  CONTAINED	
  IN	
  THIS	
  
PRESENTATION,	
  IT	
  IS	
  PROVIDED	
  “AS	
  IS”,	
  WITHOUT	
  WARRANTY	
  OF	
  ANY	
  KIND,	
  EXPRESS	
  OR	
  IMPLIED.	
  	
  
ALL	
  PERFORMANCE	
  DATA	
  INCLUDED	
  IN	
  THIS	
  PRESENTATION	
  HAVE	
  BEEN	
  GATHERED	
  IN	
  A	
  CONTROLLED	
  ENVIRONMENT.	
  	
  YOUR	
  OWN	
  
TEST	
  RESULTS	
  MAY	
  VARY	
  BASED	
  ON	
  HARDWARE,	
  SOFTWARE	
  OR	
  INFRASTRUCTURE	
  DIFFERENCES.	
  
ALL	
  DATA	
  INCLUDED	
  IN	
  THIS	
  PRESENTATION	
  ARE	
  MEANT	
  TO	
  BE	
  USED	
  ONLY	
  AS	
  A	
  GUIDE.	
  
IN	
  ADDITION,	
  THE	
  INFORMATION	
  CONTAINED	
  IN	
  THIS	
  PRESENTATION	
  IS	
  BASED	
  ON	
  IBM’S	
  CURRENT	
  PRODUCT	
  PLANS	
  AND	
  STRATEGY,	
  
WHICH	
  ARE	
  SUBJECT	
  TO	
  CHANGE	
  BY	
  IBM,	
  WITHOUT	
  NOTICE.	
  	
  
IBM	
  AND	
  ITS	
  AFFILIATED	
  COMPANIES	
  SHALL	
  NOT	
  BE	
  RESPONSIBLE	
  FOR	
  ANY	
  DAMAGES	
  ARISING	
  OUT	
  OF	
  THE	
  USE	
  OF,	
  OR	
  OTHERWISE	
  
RELATED	
  TO,	
  THIS	
  PRESENTATION	
  OR	
  ANY	
  OTHER	
  DOCUMENTATION.	
  	
  
NOTHING	
  CONTAINED	
  IN	
  THIS	
  PRESENTATION	
  IS	
  INTENDED	
  TO,	
  OR	
  SHALL	
  HAVE	
  THE	
  EFFECT	
  OF:	
  	
  
-­‐	
  CREATING	
  ANY	
  WARRANT	
  OR	
  REPRESENTATION	
  FROM	
  IBM,	
  ITS	
  AFFILIATED	
  COMPANIES	
  OR	
  ITS	
  OR	
  THEIR	
  SUPPLIERS	
  AND/OR	
  
LICENSORS	
  
2
© 2013 IBM Corporation
Your	
  Speaker:	
  Ryan	
  A.	
  Sciampacone	
  
• Run4me	
  Architect	
  @	
  IBM	
  (JTC)	
  
•  Interpreters	
  
•  Garbage	
  Collec4on	
  
•  Plaaorm	
  interfacing	
  /	
  op4miza4on	
  
•  Hardware	
  exploita4on	
  
(E)	
  ryan_sciampacone@ca.ibm.com	
  
(T)	
  @rsciampacone	
  
• Visit	
  the	
  IBM	
  Booth	
  #5112	
  to	
  meet	
  
other	
  IBM	
  Developers	
  
3
© 2013 IBM Corporation
What	
  should	
  you	
  take	
  away	
  from	
  all	
  this?	
  
• Not	
  a	
  tuning	
  talk	
  
• Explore	
  some	
  (possibly)	
  unexpected	
  behavior	
  in	
  Java	
  
• Your	
  plaaorm	
  changes	
  performance	
  in	
  strange	
  ways	
  
• Add	
  to	
  your	
  “deep	
  knowledge”	
  toolkit	
  
• Most	
  importantly:	
  To	
  be	
  entertained	
  
4
© 2013 IBM Corporation
UP	
  TO	
  SPEED	
  
Let’s	
  get	
  everyone…	
  
5
© 2013 IBM Corporation
Compac4on	
  
6
Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
?	
  Allocate
Heap	
  
Object	
  
Thread	
  
© 2013 IBM Corporation
Compac4on	
  
7
Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
?	
  Allocate
Heap	
  
Object	
  
Thread	
  
© 2013 IBM Corporation
Compac4on	
  
8
Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
?	
  Allocate
Heap	
  
Object	
  
Thread	
  
© 2013 IBM Corporation
Compac4on	
  
9
Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
Allocate
Heap	
  
Object	
  
Thread	
  
© 2013 IBM Corporation
Genera4onal	
  
10
Heap	
  
Object	
  
Thread	
  
New Old
Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
© 2013 IBM Corporation
Genera4onal	
  
11
Heap	
  
Object	
  
Thread	
  
New Old
Allocate
Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
© 2013 IBM Corporation
Genera4onal	
  
12
Heap	
  
Object	
  
Thread	
  
New Old
Allocate
Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
© 2013 IBM Corporation
Genera4onal	
  
13
Heap	
  
Object	
  
Thread	
  
New Old
GC	
  
Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
© 2013 IBM Corporation
Genera4onal	
  
14
Heap	
  
Object	
  
Thread	
  
New Old
GC	
  
Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
© 2013 IBM Corporation
Genera4onal	
  
15
Heap	
  
Object	
  
Thread	
  
New Old
Allocate
Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
© 2013 IBM Corporation
Genera4onal	
  
16
Heap	
  
Object	
  
Thread	
  
New Old
Allocate
Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
© 2013 IBM Corporation
Genera4onal	
  
17
Heap	
  
Object	
  
Thread	
  
New Old
GC	
  
Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
© 2013 IBM Corporation
Genera4onal	
  
18
Heap	
  
Object	
  
Thread	
  
New Old
GC	
  
Tenure
Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
© 2013 IBM Corporation
Genera4onal	
  
19
Heap	
  
Object	
  
Thread	
  
New Old
Global	
  GC	
  
Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
© 2013 IBM Corporation
Stop	
  the	
  World	
  
20
Duke Logo: © Oracle
Recycle Symbol: Creative Commons http://commons.wikimedia.org/wiki/File:Recycle.jpg
© 2013 IBM Corporation
Concurrent	
  
21
Duke Logo: © Oracle
Recycle Symbol: Creative Commons http://commons.wikimedia.org/wiki/File:Recycle.jpg
Java	
  Ac4vity	
  	
  
GC	
  Ac4vity	
  	
  
© 2013 IBM Corporation
Parallel	
  
22
Duke Logo: © Oracle
Recycle Symbol: Creative Commons http://commons.wikimedia.org/wiki/File:Recycle.jpg
Java	
  Ac4vity	
  	
  
GC	
  Ac4vity	
  	
  
…	
  
© 2013 IBM Corporation
ALLOCATION	
  
Quick	
  look	
  at	
  the	
  mechanics	
  of…	
  
23
© 2013 IBM Corporation
Alloca4on	
  
24
Padlock: Public domain http://en.wikipedia.org/wiki/File:Viking_Age_lock.png
Heap	
  
Object	
  
Thread	
  
Allocate
© 2013 IBM Corporation
Alloca4on	
  
25
Padlock: Public domain http://en.wikipedia.org/wiki/File:Viking_Age_lock.png
Heap	
  
Object	
  
Thread	
  
Allocate
© 2013 IBM Corporation
Alloca4on	
  
26
Padlock: Public domain http://openclipart.org/detail/22179/lock-by-nicubunu
Heap	
  
Object	
  
Thread	
  
Allocate
Private	
  Buffer	
  
© 2013 IBM Corporation
Alloca4on	
  
27
Padlock: Public domain http://openclipart.org/detail/22179/lock-by-nicubunu
Heap	
  
Object	
  
Thread	
  
Allocate
© 2013 IBM Corporation
Alloca4on	
  
28
Padlock: Public domain http://openclipart.org/detail/22179/lock-by-nicubunu
Heap	
  
Object	
  
Thread	
  
Allocate
© 2013 IBM Corporation
FINALIZATION	
  
Gekng	
  around	
  to	
  eventually	
  talking	
  about	
  something	
  you	
  inevitably	
  have	
  to…	
  
29
© 2013 IBM Corporation
The	
  meaning	
  of	
  “in	
  scope”	
  
30
© 2013 IBM Corporation
The	
  meaning	
  of	
  “in	
  scope”	
  
31
Simple	
  Finalizer	
  
© 2013 IBM Corporation
The	
  meaning	
  of	
  “in	
  scope”	
  
32
Create	
  instance	
  
of	
  finalizable	
  object	
  
© 2013 IBM Corporation
The	
  meaning	
  of	
  “in	
  scope”	
  
33
No	
  references	
  to	
  the	
  
finalizable	
  object	
  at	
  this	
  
point	
  
© 2013 IBM Corporation
The	
  meaning	
  of	
  “in	
  scope”	
  
34
Will	
  obj	
  be	
  finalized?	
  
© 2013 IBM Corporation
Example	
  
35
© 2013 IBM Corporation
Perhaps	
  a	
  bit	
  more	
  dangerous…	
  
36
© 2013 IBM Corporation
THE	
  ORDER	
  OF	
  THINGS	
  
Finaliza4on	
  
37
© 2013 IBM Corporation
What	
  can	
  we	
  expect	
  as	
  output?	
  
38
© 2013 IBM Corporation
Example	
  
39
© 2013 IBM Corporation
So	
  what	
  happened?	
  
40
New Old
FinalizableObject(2)	
  
FinalizableObject(1)	
  
© 2013 IBM Corporation
So	
  what	
  happened?	
  
41
New Old
FinalizableObject(2)	
  
FinalizableObject(1)	
  
© 2013 IBM Corporation
So	
  what	
  happened?	
  
42
New Old
FinalizableObject(2)	
  
FinalizableObject(1)	
  
GC	
  
© 2013 IBM Corporation
So	
  what	
  happened?	
  
43
New Old
FinalizableObject(2)	
  
FinalizableObject(1)	
  
GC	
  
Tenure
© 2013 IBM Corporation
So	
  what	
  happened?	
  
44
New Old
FinalizableObject(2)	
  
FinalizableObject(1)	
  
© 2013 IBM Corporation
So	
  what	
  happened?	
  
45
New Old
FinalizableObject(2)	
  
FinalizableObject(1)	
  
© 2013 IBM Corporation
So	
  what	
  happened?	
  
46
New Old
FinalizableObject(2)	
  
FinalizableObject(1)	
  
© 2013 IBM Corporation
So	
  what	
  happened?	
  
47
New Old
FinalizableObject(2)	
  
FinalizableObject(1)	
  
GC	
  
© 2013 IBM Corporation
So	
  what	
  happened?	
  
48
New Old
FinalizableObject(2)	
  
FinalizableObject(1)	
  
GC	
  
Finalized!
© 2013 IBM Corporation
ANCHOR	
  POINTS	
  AND	
  GC	
  
Finaliza4on	
  
49
© 2013 IBM Corporation
What	
  about	
  anchor	
  points?	
  
50
finalize()finalize()
© 2013 IBM Corporation
What	
  about	
  anchor	
  points?	
  
51
© 2013 IBM Corporation
Example	
  
52
© 2013 IBM Corporation
Why	
  only	
  one?	
  
53
finalize()finalize()
© 2013 IBM Corporation
Why	
  only	
  one?	
  
54
finalize()finalize()
© 2013 IBM Corporation
Why	
  only	
  one?	
  
55
New Old
© 2013 IBM Corporation
Why	
  only	
  one?	
  
56
New Old
Allocate?	
  
© 2013 IBM Corporation
Why	
  only	
  one?	
  
57
New Old
Allocate?	
  
© 2013 IBM Corporation
Why	
  only	
  one?	
  
58
New Old
Allocate?	
   Allocate?	
  
© 2013 IBM Corporation
Why	
  only	
  one?	
  
59
New Old
Allocate?	
   Allocate?	
  
GC	
  
© 2013 IBM Corporation
ICEBERGS	
  
What	
  lies	
  beneath	
  the	
  surface…	
  
60
© 2013 IBM Corporation61
Iceberg: Jesus Diaz, Gizmodo
© 2013 IBM Corporation
Out	
  of	
  Memory	
  (as	
  we	
  know	
  and	
  love	
  it)	
  
62
Heap	
  
Object	
  
Thread	
  
New Old
Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
Allocate
© 2013 IBM Corporation63
© 2013 IBM Corporation64
© 2013 IBM Corporation
Not	
  all	
  memory	
  is	
  “heap”	
  memory	
  
65
Heap	
  
Object	
  
Na4ve	
  Resource	
  
© 2013 IBM Corporation
Not	
  all	
  memory	
  is	
  “heap”	
  memory	
  
66
Heap	
  
Object	
  
Na4ve	
  Resource	
  
© 2013 IBM Corporation
Not	
  all	
  memory	
  is	
  “heap”	
  memory	
  
67
Heap	
  
Object	
  
Na4ve	
  Resource	
  
© 2013 IBM Corporation68
© 2013 IBM Corporation69
© 2013 IBM Corporation70
© 2013 IBM Corporation71
© 2013 IBM Corporation
Keep	
  track	
  /	
  Use	
  facili4es	
  available	
  
• Plenty	
  of	
  process	
  monitoring	
  somware	
  out	
  there	
  
• Consider	
  resource	
  limi4ng	
  /	
  thronling	
  facili4es	
  
72
© 2013 IBM Corporation
SHARING	
  MEMORY	
  
Two	
  for	
  me	
  and	
  one	
  for	
  you…	
  
73
© 2013 IBM Corporation
Two	
  threads	
  and	
  one	
  field	
  
74
Object	
  
Thread	
  
field1
field2
field<N>
…
“Same”	
  
© 2013 IBM Corporation
Two	
  threads	
  and	
  one	
  field	
  
75
Object	
  
Thread	
  
field1
field2
field<N>
…
field1
field2
field<N>
…
“Different”	
  
© 2013 IBM Corporation
Example	
  
76
© 2013 IBM Corporation
The	
  CPU	
  Cache	
  (High	
  level)	
  
77
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
(0x1F89DB04)	
  
Memory	
  
CPU	
  
© 2013 IBM Corporation
The	
  CPU	
  Cache	
  (High	
  level)	
  
78
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
(0x1F89DB04)	
  
Memory	
  
CPU	
  
Cache	
  
© 2013 IBM Corporation
The	
  CPU	
  Cache	
  (High	
  level)	
  
79
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
(0x1F89DB04)	
  
Memory	
  
CPU	
  
Cache	
  
© 2013 IBM Corporation
The	
  CPU	
  Cache	
  (High	
  level)	
  
80
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
(0x1F89DB04)	
  
Memory	
  
CPU	
  
Cache	
   Cache	
  
CPU	
  
© 2013 IBM Corporation
The	
  CPU	
  Cache	
  (High	
  level)	
  
81
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
(0x1F89DB04)	
  
Memory	
  
CPU	
  
Cache	
   Cache	
  
CPU	
  
© 2013 IBM Corporation
The	
  CPU	
  Cache	
  (High	
  level)	
  
82
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
(0x1F89DB04)	
  
Memory	
  
CPU	
  
Cache	
   Cache	
  
CPU	
  
© 2013 IBM Corporation
Two	
  threads	
  and	
  two	
  fields	
  
83
Object	
  
Thread	
  
field1
field2
field<N>
…
“Same”	
  
© 2013 IBM Corporation
Two	
  threads	
  and	
  two	
  fields	
  
84
Object	
  
Thread	
  
field1
field2
field<N>
…
field1
field2
field<N>
…
“Different”	
  
© 2013 IBM Corporation
Example	
  
85
© 2013 IBM Corporation
The	
  CPU	
  Cache	
  Pt.	
  2	
  (High	
  level)	
  
86
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
Memory	
  
CPU	
  
Cache	
  
© 2013 IBM Corporation
The	
  CPU	
  Cache	
  Pt.	
  2	
  (High	
  level)	
  
87
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
Memory	
  
CPU	
  
Cache	
  
Cache	
  Line	
  
© 2013 IBM Corporation
The	
  CPU	
  Cache	
  Pt.	
  2	
  (High	
  level)	
  
88
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
Memory	
  
CPU	
  
Cache	
  
Cache	
  Line	
  
© 2013 IBM Corporation
The	
  CPU	
  Cache	
  Pt.	
  2	
  (High	
  level)	
  
89
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
Memory	
  
CPU	
  
Cache	
   Cache	
  
CPU	
  
Cache	
  Line	
  
© 2013 IBM Corporation
The	
  CPU	
  Cache	
  Pt.	
  2	
  (High	
  level)	
  
90
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
Memory	
  
CPU	
  
Cache	
   Cache	
  
CPU	
  
Cache	
  Line	
  
© 2013 IBM Corporation
The	
  CPU	
  Cache	
  Pt.	
  2	
  (High	
  level)	
  
91
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
Memory	
  
CPU	
  
Cache	
   Cache	
  
CPU	
  
Cache	
  Line	
  
© 2013 IBM Corporation
FIELD	
  ORDERING	
  
When	
  ordering	
  pizza	
  you	
  expect	
  the	
  crust	
  on	
  the	
  bonom…	
  
92
© 2013 IBM Corporation
Subclass	
  with	
  fields	
  “far	
  apart”	
  
93
© 2013 IBM Corporation
Subclass	
  with	
  fields	
  “far	
  apart”	
  
94
© 2013 IBM Corporation
Two	
  threads	
  and	
  two	
  fields	
  and	
  one	
  subclass	
  
95
Object	
  
Thread	
  
field1
field2
…
pad001
pad0NN
pad100 “Second”	
  
pad1NN
…
field3
© 2013 IBM Corporation
Two	
  threads	
  and	
  two	
  fields	
  and	
  one	
  subclass	
  
96
Object	
  
Thread	
  
field1
field2
…
pad001
pad0NN
pad100
pad1NN
…
“Third”	
  
field3
© 2013 IBM Corporation
Example	
  
97
© 2013 IBM Corporation
So	
  what	
  happened?	
  
98
© 2013 IBM Corporation
So	
  what	
  happened?	
  
99
field1
field2
…
pad001
pad0NN
pad100
pad1NN
…
field3
© 2013 IBM Corporation
So	
  what	
  happened?	
  
100
field1
field2
…
pad001
pad0NN
pad100
pad1NN
…
field3
© 2013 IBM Corporation
So	
  what	
  happened?	
  
101
field1 field2
…
pad001
pad0NN
pad100
pad1NN
…
field3
© 2013 IBM Corporation
So	
  what	
  happened?	
  
102
field1 field2
…
pad001
pad0NN
pad100
pad1NN
…
field3
© 2013 IBM Corporation
So	
  what	
  happened?	
  
103
field1 field2
…
pad001
pad0NN
pad100
pad1NN
…
field3
Cache	
  Line	
  
© 2013 IBM Corporation
So	
  what	
  happened?	
  (Alternate	
  version)	
  
104
field1
…
pad001
pad0NN
pad100
pad1NN
…
field2 field3
© 2013 IBM Corporation
CACHE	
  CAPACITY	
  
Spreading	
  things	
  out	
  doesn’t	
  always	
  reduce	
  collisions…	
  
105
© 2013 IBM Corporation
Small	
  data,	
  Big	
  problems	
  
106
byte[]	
  
© 2013 IBM Corporation
Small	
  data,	
  Big	
  problems	
  
107
Cache	
  Line	
  (64	
  Bytes)	
  
byte[]	
  
© 2013 IBM Corporation
Small	
  data,	
  Big	
  problems	
  
108
Cache	
  Line	
  (64	
  Bytes)	
  
byte[]	
  
© 2013 IBM Corporation
Small	
  data,	
  Big	
  problems	
  
109
4KB	
   4KB	
  
Cache	
  Line	
  (64	
  Bytes)	
  
byte[]	
  
© 2013 IBM Corporation
Small	
  data,	
  Big	
  problems	
  
110
4KB	
   4KB	
  
Cache	
  Line	
  (64	
  Bytes)	
  
byte[]	
  
© 2013 IBM Corporation
Small	
  data,	
  Big	
  problems	
  
111
4KB	
   4KB	
  
Cache	
  Line	
  (64	
  Bytes)	
  
byte[]	
  
© 2013 IBM Corporation
Small	
  data,	
  Big	
  problems	
  
112
4KB	
   4KB	
  
Cache	
  Line	
  (64	
  Bytes)	
  
byte[]	
  
© 2013 IBM Corporation
Small	
  data,	
  Big	
  problems	
  
113
4KB	
   4KB	
  
Cache	
  Line	
  (64	
  Bytes)	
  
byte[]	
  
© 2013 IBM Corporation
Small	
  data,	
  Big	
  problems	
  
•  Access	
  the	
  same	
  index	
  from	
  each	
  line	
  
•  Move	
  to	
  the	
  next	
  index	
  
•  Repeat	
  
114
4KB	
   4KB	
  
Cache	
  Line	
  (64	
  Bytes)	
  
byte[]	
  
© 2013 IBM Corporation
Example	
  
115
© 2013 IBM Corporation
Cache	
  “capacity”	
  is	
  less	
  than	
  you	
  think	
  
116
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
Cache	
  
© 2013 IBM Corporation
Cache	
  “capacity”	
  is	
  less	
  than	
  you	
  think	
  
117
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
Cache	
  
© 2013 IBM Corporation
Cache	
  “capacity”	
  is	
  less	
  than	
  you	
  think	
  
118
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
Cache	
  
© 2013 IBM Corporation
Cache	
  “capacity”	
  is	
  less	
  than	
  you	
  think	
  
119
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
Cache	
  
© 2013 IBM Corporation
Cache	
  “capacity”	
  is	
  less	
  than	
  you	
  think	
  
120
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
Cache	
  
© 2013 IBM Corporation
Cache	
  “capacity”	
  is	
  less	
  than	
  you	
  think	
  
121
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
Cache	
  
© 2013 IBM Corporation
Cache	
  “capacity”	
  is	
  less	
  than	
  you	
  think	
  
122
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
Cache	
  
8	
  Entries	
  
© 2013 IBM Corporation
HOW	
  MEMORY	
  WORKS	
  
Before	
  I	
  forget,	
  a	
  few	
  more	
  things	
  about…	
  
123
© 2013 IBM Corporation
Non	
  Uniform	
  Memory	
  Architecture	
  (NUMA)	
  
124
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
DRAM: Wikipedia Commons http://en.wikipedia.org/wiki/Dynamic_random-access_memory
© 2013 IBM Corporation
Non	
  Uniform	
  Memory	
  Architecture	
  (NUMA)	
  
125
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
DRAM: Wikipedia Commons http://en.wikipedia.org/wiki/Dynamic_random-access_memory
© 2013 IBM Corporation
Non	
  Uniform	
  Memory	
  Architecture	
  (NUMA)	
  
126
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
DRAM: Wikipedia Commons http://en.wikipedia.org/wiki/Dynamic_random-access_memory
© 2013 IBM Corporation
Non	
  Uniform	
  Memory	
  Architecture	
  (NUMA)	
  
127
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
DRAM: Wikipedia Commons http://en.wikipedia.org/wiki/Dynamic_random-access_memory
© 2013 IBM Corporation
Non	
  Uniform	
  Memory	
  Architecture	
  (NUMA)	
  
128
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
DRAM: Wikipedia Commons http://en.wikipedia.org/wiki/Dynamic_random-access_memory
© 2013 IBM Corporation
Non	
  Uniform	
  Memory	
  Architecture	
  (NUMA)	
  
129
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
DRAM: Wikipedia Commons http://en.wikipedia.org/wiki/Dynamic_random-access_memory
© 2013 IBM Corporation
Non	
  Uniform	
  Memory	
  Architecture	
  (NUMA)	
  
130
CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit
DRAM: Wikipedia Commons http://en.wikipedia.org/wiki/Dynamic_random-access_memory
© 2013 IBM Corporation
Non	
  Uniform	
  Memory	
  Architecture	
  
• JVMs	
  do	
  have	
  support	
  
•  Balanced	
  GC	
  policy	
  
•  -­‐Xnuma	
  
• Plaaorm	
  commands	
  for	
  thronling	
  /	
  afini4zing	
  
•  Taskset	
  
•  Numactl	
  
• Virtualiza4on	
  
131
© 2013 IBM Corporation
Resource	
  on	
  Memory	
  
132
© 2013 IBM Corporation
PARTING	
  REMARKS	
  
And	
  finally…	
  
133
© 2013 IBM Corporation
?	
  134
© 2013 IBM Corporation
Copyright	
  and	
  Trademarks	
  
©	
  IBM	
  Corpora4on	
  2013.	
  All	
  Rights	
  Reserved.	
  	
  
	
  
IBM,	
  the	
  IBM	
  logo,	
  and	
  ibm.com	
  are	
  trademarks	
  or	
  registered	
  trademarks	
  of	
  
Interna4onal	
  Business	
  Machines	
  Corp.,	
  and	
  registered	
  in	
  many	
  jurisdic4ons	
  
worldwide.	
  	
  
	
  
Other	
  product	
  and	
  service	
  names	
  might	
  be	
  trademarks	
  of	
  IBM	
  or	
  other	
  companies.	
  	
  
	
  
A	
  current	
  list	
  of	
  IBM	
  trademarks	
  is	
  available	
  on	
  the	
  Web	
  –	
  see	
  the	
  IBM	
  “Copyright	
  and	
  
trademark	
  informa4on”	
  page	
  at	
  URL:	
  	
  www.ibm.com/legal/copytrade.shtml	
  
135

Mais conteúdo relacionado

Mais procurados

JavaOne2013: Secure Engineering Practices for Java
JavaOne2013: Secure Engineering Practices for JavaJavaOne2013: Secure Engineering Practices for Java
JavaOne2013: Secure Engineering Practices for JavaChris Bailey
 
Bci for Beginners
Bci for BeginnersBci for Beginners
Bci for BeginnersIainLewis
 
Three key concepts for java batch
Three key concepts for java batchThree key concepts for java batch
Three key concepts for java batchtimfanelli
 
JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Healt...
JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Healt...JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Healt...
JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Healt...Chris Bailey
 
QCon Shanghai: Trends in Application Development
QCon Shanghai: Trends in Application DevelopmentQCon Shanghai: Trends in Application Development
QCon Shanghai: Trends in Application DevelopmentChris Bailey
 
Cast Iron Overview Webinar 6.13
Cast Iron Overview Webinar 6.13Cast Iron Overview Webinar 6.13
Cast Iron Overview Webinar 6.13gaborvodics
 
Cast iron presentation
Cast iron presentationCast iron presentation
Cast iron presentationSura Gonzalez
 
S200516 copy-data-management-ist2020-v2001c
S200516 copy-data-management-ist2020-v2001cS200516 copy-data-management-ist2020-v2001c
S200516 copy-data-management-ist2020-v2001cTony Pearson
 
Virtualization aware Java VM
Virtualization aware Java VMVirtualization aware Java VM
Virtualization aware Java VMTim Ellison
 
Cast Iron Cloud Integration Best Practices
Cast Iron Cloud Integration Best PracticesCast Iron Cloud Integration Best Practices
Cast Iron Cloud Integration Best PracticesSarath Ambadas
 
Munich 2016 - Z011599 Martin Packer - More Fun With DDF
Munich 2016 - Z011599 Martin Packer - More Fun With DDFMunich 2016 - Z011599 Martin Packer - More Fun With DDF
Munich 2016 - Z011599 Martin Packer - More Fun With DDFMartin Packer
 
Effective admin and development in iib
Effective admin and development in iibEffective admin and development in iib
Effective admin and development in iibm16k
 
L203326 intro-maria db-techu2020-v9
L203326 intro-maria db-techu2020-v9L203326 intro-maria db-techu2020-v9
L203326 intro-maria db-techu2020-v9Tony Pearson
 
Upgrade to IBM z/OS V2.5 Planning
Upgrade to IBM z/OS V2.5 PlanningUpgrade to IBM z/OS V2.5 Planning
Upgrade to IBM z/OS V2.5 PlanningMarna Walle
 
Memory Matters in 2011
Memory Matters in 2011Memory Matters in 2011
Memory Matters in 2011Martin Packer
 

Mais procurados (15)

JavaOne2013: Secure Engineering Practices for Java
JavaOne2013: Secure Engineering Practices for JavaJavaOne2013: Secure Engineering Practices for Java
JavaOne2013: Secure Engineering Practices for Java
 
Bci for Beginners
Bci for BeginnersBci for Beginners
Bci for Beginners
 
Three key concepts for java batch
Three key concepts for java batchThree key concepts for java batch
Three key concepts for java batch
 
JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Healt...
JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Healt...JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Healt...
JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Healt...
 
QCon Shanghai: Trends in Application Development
QCon Shanghai: Trends in Application DevelopmentQCon Shanghai: Trends in Application Development
QCon Shanghai: Trends in Application Development
 
Cast Iron Overview Webinar 6.13
Cast Iron Overview Webinar 6.13Cast Iron Overview Webinar 6.13
Cast Iron Overview Webinar 6.13
 
Cast iron presentation
Cast iron presentationCast iron presentation
Cast iron presentation
 
S200516 copy-data-management-ist2020-v2001c
S200516 copy-data-management-ist2020-v2001cS200516 copy-data-management-ist2020-v2001c
S200516 copy-data-management-ist2020-v2001c
 
Virtualization aware Java VM
Virtualization aware Java VMVirtualization aware Java VM
Virtualization aware Java VM
 
Cast Iron Cloud Integration Best Practices
Cast Iron Cloud Integration Best PracticesCast Iron Cloud Integration Best Practices
Cast Iron Cloud Integration Best Practices
 
Munich 2016 - Z011599 Martin Packer - More Fun With DDF
Munich 2016 - Z011599 Martin Packer - More Fun With DDFMunich 2016 - Z011599 Martin Packer - More Fun With DDF
Munich 2016 - Z011599 Martin Packer - More Fun With DDF
 
Effective admin and development in iib
Effective admin and development in iibEffective admin and development in iib
Effective admin and development in iib
 
L203326 intro-maria db-techu2020-v9
L203326 intro-maria db-techu2020-v9L203326 intro-maria db-techu2020-v9
L203326 intro-maria db-techu2020-v9
 
Upgrade to IBM z/OS V2.5 Planning
Upgrade to IBM z/OS V2.5 PlanningUpgrade to IBM z/OS V2.5 Planning
Upgrade to IBM z/OS V2.5 Planning
 
Memory Matters in 2011
Memory Matters in 2011Memory Matters in 2011
Memory Matters in 2011
 

Destaque

JPA Performance Myths -- JavaOne 2013
JPA Performance Myths -- JavaOne 2013JPA Performance Myths -- JavaOne 2013
JPA Performance Myths -- JavaOne 2013richardgcurtis
 
JavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVMJavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVMPaulThwaite
 
Whats Next for JCA?
Whats Next for JCA?Whats Next for JCA?
Whats Next for JCA?Fred Rowe
 
Resource management in java bof6823 - java one 2012
Resource management in java   bof6823 - java one 2012Resource management in java   bof6823 - java one 2012
Resource management in java bof6823 - java one 2012JavaNgmr
 
JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)Graeme_IBM
 
Efficient Memory and Thread Management in Highly Parallel Java Applications
Efficient Memory and Thread Management in Highly Parallel Java ApplicationsEfficient Memory and Thread Management in Highly Parallel Java Applications
Efficient Memory and Thread Management in Highly Parallel Java Applicationspkoza
 
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...timfanelli
 
G.U.N. Academy - earn and learn with us!
G.U.N. Academy - earn and learn with us!G.U.N. Academy - earn and learn with us!
G.U.N. Academy - earn and learn with us!Lucy Mcfarland
 
4 ways to increase your club's renewal ratio
4 ways to increase your club's renewal ratio4 ways to increase your club's renewal ratio
4 ways to increase your club's renewal ratioNizil Crasto
 
ΓΛΩΣΣΑ Γ ΓΥΜΝΑΣΙΟΥ
ΓΛΩΣΣΑ Γ ΓΥΜΝΑΣΙΟΥΓΛΩΣΣΑ Γ ΓΥΜΝΑΣΙΟΥ
ΓΛΩΣΣΑ Γ ΓΥΜΝΑΣΙΟΥmapekako
 
Cellebrite Retail Catalog 2013
Cellebrite Retail Catalog 2013Cellebrite Retail Catalog 2013
Cellebrite Retail Catalog 2013asolarino
 
Assistive Technology Presentation
Assistive Technology PresentationAssistive Technology Presentation
Assistive Technology Presentationdp01476
 
Bushi il breviario del guerriero
Bushi il breviario del guerrieroBushi il breviario del guerriero
Bushi il breviario del guerrieroiannumerosei
 
Dirk Aaccountants + Adviseurs - werken in / met de cloud
Dirk Aaccountants + Adviseurs - werken in / met de cloudDirk Aaccountants + Adviseurs - werken in / met de cloud
Dirk Aaccountants + Adviseurs - werken in / met de cloudDirk+ Accountants en Adviseurs
 

Destaque (20)

JPA Performance Myths -- JavaOne 2013
JPA Performance Myths -- JavaOne 2013JPA Performance Myths -- JavaOne 2013
JPA Performance Myths -- JavaOne 2013
 
JavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVMJavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVM
 
Whats Next for JCA?
Whats Next for JCA?Whats Next for JCA?
Whats Next for JCA?
 
Resource management in java bof6823 - java one 2012
Resource management in java   bof6823 - java one 2012Resource management in java   bof6823 - java one 2012
Resource management in java bof6823 - java one 2012
 
JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)
 
Efficient Memory and Thread Management in Highly Parallel Java Applications
Efficient Memory and Thread Management in Highly Parallel Java ApplicationsEfficient Memory and Thread Management in Highly Parallel Java Applications
Efficient Memory and Thread Management in Highly Parallel Java Applications
 
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
 
Citizen watches
Citizen watchesCitizen watches
Citizen watches
 
G.U.N. Academy - earn and learn with us!
G.U.N. Academy - earn and learn with us!G.U.N. Academy - earn and learn with us!
G.U.N. Academy - earn and learn with us!
 
4 ways to increase your club's renewal ratio
4 ways to increase your club's renewal ratio4 ways to increase your club's renewal ratio
4 ways to increase your club's renewal ratio
 
1 gab
1 gab1 gab
1 gab
 
ΓΛΩΣΣΑ Γ ΓΥΜΝΑΣΙΟΥ
ΓΛΩΣΣΑ Γ ΓΥΜΝΑΣΙΟΥΓΛΩΣΣΑ Γ ΓΥΜΝΑΣΙΟΥ
ΓΛΩΣΣΑ Γ ΓΥΜΝΑΣΙΟΥ
 
Cellebrite Retail Catalog 2013
Cellebrite Retail Catalog 2013Cellebrite Retail Catalog 2013
Cellebrite Retail Catalog 2013
 
Assistive Technology Presentation
Assistive Technology PresentationAssistive Technology Presentation
Assistive Technology Presentation
 
ANIMALES
ANIMALESANIMALES
ANIMALES
 
Analysis of your new plant
Analysis of your new plantAnalysis of your new plant
Analysis of your new plant
 
Tibco BW online training
Tibco BW online trainingTibco BW online training
Tibco BW online training
 
Bushi il breviario del guerriero
Bushi il breviario del guerrieroBushi il breviario del guerriero
Bushi il breviario del guerriero
 
Dirk Aaccountants + Adviseurs - werken in / met de cloud
Dirk Aaccountants + Adviseurs - werken in / met de cloudDirk Aaccountants + Adviseurs - werken in / met de cloud
Dirk Aaccountants + Adviseurs - werken in / met de cloud
 
Dirk Accountants + Adviseurs - fiscale beloning 2014
Dirk Accountants + Adviseurs - fiscale beloning 2014Dirk Accountants + Adviseurs - fiscale beloning 2014
Dirk Accountants + Adviseurs - fiscale beloning 2014
 

Semelhante a JavaOne 2013: Garbage Collection Unleashed - Demystifying the Wizardry

Presentation BP205 "Custom Controls: Powerful, But Not Rocket Science!" Conne...
Presentation BP205 "Custom Controls: Powerful, But Not Rocket Science!" Conne...Presentation BP205 "Custom Controls: Powerful, But Not Rocket Science!" Conne...
Presentation BP205 "Custom Controls: Powerful, But Not Rocket Science!" Conne...Martin Meijer
 
20191119 Cloud Native Java : GraalVM
20191119 Cloud Native Java : GraalVM20191119 Cloud Native Java : GraalVM
20191119 Cloud Native Java : GraalVMTaewan Kim
 
New Repository in AEM 6 by Michael Marth
New Repository in AEM 6 by Michael MarthNew Repository in AEM 6 by Michael Marth
New Repository in AEM 6 by Michael MarthAEM HUB
 
1040 ibm worklight delivering agility to mobile cloud deployments
1040 ibm worklight  delivering agility to mobile cloud deployments1040 ibm worklight  delivering agility to mobile cloud deployments
1040 ibm worklight delivering agility to mobile cloud deploymentsTodd Kaplinger
 
Aem hub oak 0.2 full
Aem hub oak 0.2 fullAem hub oak 0.2 full
Aem hub oak 0.2 fullMichael Marth
 
Groovy-Powered Microservices with Micronaut
Groovy-Powered Microservices with MicronautGroovy-Powered Microservices with Micronaut
Groovy-Powered Microservices with MicronautZachary Klein
 
JavaOne 2013: Introduction to PackedObjects
JavaOne 2013: Introduction to PackedObjectsJavaOne 2013: Introduction to PackedObjects
JavaOne 2013: Introduction to PackedObjectsRyan Sciampacone
 
Agile Practice in Drupal 8 Module Development
Agile Practice in Drupal 8 Module DevelopmentAgile Practice in Drupal 8 Module Development
Agile Practice in Drupal 8 Module DevelopmentDOCOMO Innovations, Inc.
 
IBM Lotusphere 2013 AD109: Using the IBM® Sametime® Proxy SDK: WebSphere Port...
IBM Lotusphere 2013 AD109: Using the IBM® Sametime® Proxy SDK: WebSphere Port...IBM Lotusphere 2013 AD109: Using the IBM® Sametime® Proxy SDK: WebSphere Port...
IBM Lotusphere 2013 AD109: Using the IBM® Sametime® Proxy SDK: WebSphere Port...William Holmes
 
Troubleshooting Ecommerce Performance
 Troubleshooting Ecommerce Performance Troubleshooting Ecommerce Performance
Troubleshooting Ecommerce PerformanceDiego Cardozo
 
Eclipse Demo Camp Kelper 2013
Eclipse Demo Camp Kelper 2013Eclipse Demo Camp Kelper 2013
Eclipse Demo Camp Kelper 2013mbendkowski
 
How To Visualize Graphs
How To Visualize GraphsHow To Visualize Graphs
How To Visualize GraphsJean Ihm
 
How to use the Social Business Development Environments
How to use the Social Business Development EnvironmentsHow to use the Social Business Development Environments
How to use the Social Business Development EnvironmentsIBM Connections Developers
 
DevOps for Mainframe: Open Source Fast Track
DevOps for Mainframe: Open Source Fast TrackDevOps for Mainframe: Open Source Fast Track
DevOps for Mainframe: Open Source Fast TrackDevOps.com
 
2109 mobile cloud integrating your mobile workloads with the enterprise
2109 mobile cloud  integrating your mobile workloads with the enterprise2109 mobile cloud  integrating your mobile workloads with the enterprise
2109 mobile cloud integrating your mobile workloads with the enterpriseTodd Kaplinger
 
A301 ctu madrid2016-monitoring
A301 ctu madrid2016-monitoringA301 ctu madrid2016-monitoring
A301 ctu madrid2016-monitoringMichael Dawson
 
CampDevOps keynote - DevOps: Using 'Lean' to eliminate Bottlenecks
CampDevOps keynote - DevOps: Using 'Lean' to eliminate BottlenecksCampDevOps keynote - DevOps: Using 'Lean' to eliminate Bottlenecks
CampDevOps keynote - DevOps: Using 'Lean' to eliminate BottlenecksSanjeev Sharma
 
Александр Белокрылов, Александр Мироненко. Java Embedded у вас дома
Александр Белокрылов, Александр Мироненко. Java Embedded у вас домаАлександр Белокрылов, Александр Мироненко. Java Embedded у вас дома
Александр Белокрылов, Александр Мироненко. Java Embedded у вас домаVolha Banadyseva
 
Why is Infrastructure-as-Code essential in the Cloud Age?
Why is Infrastructure-as-Code essential in the Cloud Age?Why is Infrastructure-as-Code essential in the Cloud Age?
Why is Infrastructure-as-Code essential in the Cloud Age?Andrew Ferrier
 

Semelhante a JavaOne 2013: Garbage Collection Unleashed - Demystifying the Wizardry (20)

Presentation BP205 "Custom Controls: Powerful, But Not Rocket Science!" Conne...
Presentation BP205 "Custom Controls: Powerful, But Not Rocket Science!" Conne...Presentation BP205 "Custom Controls: Powerful, But Not Rocket Science!" Conne...
Presentation BP205 "Custom Controls: Powerful, But Not Rocket Science!" Conne...
 
20191119 Cloud Native Java : GraalVM
20191119 Cloud Native Java : GraalVM20191119 Cloud Native Java : GraalVM
20191119 Cloud Native Java : GraalVM
 
New Repository in AEM 6 by Michael Marth
New Repository in AEM 6 by Michael MarthNew Repository in AEM 6 by Michael Marth
New Repository in AEM 6 by Michael Marth
 
1040 ibm worklight delivering agility to mobile cloud deployments
1040 ibm worklight  delivering agility to mobile cloud deployments1040 ibm worklight  delivering agility to mobile cloud deployments
1040 ibm worklight delivering agility to mobile cloud deployments
 
Aem hub oak 0.2 full
Aem hub oak 0.2 fullAem hub oak 0.2 full
Aem hub oak 0.2 full
 
Open j9 jdk on RISC-V
Open j9 jdk on RISC-VOpen j9 jdk on RISC-V
Open j9 jdk on RISC-V
 
Groovy-Powered Microservices with Micronaut
Groovy-Powered Microservices with MicronautGroovy-Powered Microservices with Micronaut
Groovy-Powered Microservices with Micronaut
 
JavaOne 2013: Introduction to PackedObjects
JavaOne 2013: Introduction to PackedObjectsJavaOne 2013: Introduction to PackedObjects
JavaOne 2013: Introduction to PackedObjects
 
Agile Practice in Drupal 8 Module Development
Agile Practice in Drupal 8 Module DevelopmentAgile Practice in Drupal 8 Module Development
Agile Practice in Drupal 8 Module Development
 
IBM Lotusphere 2013 AD109: Using the IBM® Sametime® Proxy SDK: WebSphere Port...
IBM Lotusphere 2013 AD109: Using the IBM® Sametime® Proxy SDK: WebSphere Port...IBM Lotusphere 2013 AD109: Using the IBM® Sametime® Proxy SDK: WebSphere Port...
IBM Lotusphere 2013 AD109: Using the IBM® Sametime® Proxy SDK: WebSphere Port...
 
Troubleshooting Ecommerce Performance
 Troubleshooting Ecommerce Performance Troubleshooting Ecommerce Performance
Troubleshooting Ecommerce Performance
 
Eclipse Demo Camp Kelper 2013
Eclipse Demo Camp Kelper 2013Eclipse Demo Camp Kelper 2013
Eclipse Demo Camp Kelper 2013
 
How To Visualize Graphs
How To Visualize GraphsHow To Visualize Graphs
How To Visualize Graphs
 
How to use the Social Business Development Environments
How to use the Social Business Development EnvironmentsHow to use the Social Business Development Environments
How to use the Social Business Development Environments
 
DevOps for Mainframe: Open Source Fast Track
DevOps for Mainframe: Open Source Fast TrackDevOps for Mainframe: Open Source Fast Track
DevOps for Mainframe: Open Source Fast Track
 
2109 mobile cloud integrating your mobile workloads with the enterprise
2109 mobile cloud  integrating your mobile workloads with the enterprise2109 mobile cloud  integrating your mobile workloads with the enterprise
2109 mobile cloud integrating your mobile workloads with the enterprise
 
A301 ctu madrid2016-monitoring
A301 ctu madrid2016-monitoringA301 ctu madrid2016-monitoring
A301 ctu madrid2016-monitoring
 
CampDevOps keynote - DevOps: Using 'Lean' to eliminate Bottlenecks
CampDevOps keynote - DevOps: Using 'Lean' to eliminate BottlenecksCampDevOps keynote - DevOps: Using 'Lean' to eliminate Bottlenecks
CampDevOps keynote - DevOps: Using 'Lean' to eliminate Bottlenecks
 
Александр Белокрылов, Александр Мироненко. Java Embedded у вас дома
Александр Белокрылов, Александр Мироненко. Java Embedded у вас домаАлександр Белокрылов, Александр Мироненко. Java Embedded у вас дома
Александр Белокрылов, Александр Мироненко. Java Embedded у вас дома
 
Why is Infrastructure-as-Code essential in the Cloud Age?
Why is Infrastructure-as-Code essential in the Cloud Age?Why is Infrastructure-as-Code essential in the Cloud Age?
Why is Infrastructure-as-Code essential in the Cloud Age?
 

Último

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Último (20)

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

JavaOne 2013: Garbage Collection Unleashed - Demystifying the Wizardry

  • 1. © 2013 IBM Corporation Ryan  A.  Sciampacone  –  Managed  Run4me  Architect   24  September  2013   Garbage  Collec4on  Unleashed   Demys4fying  the  Wizardry  
  • 2. © 2013 IBM Corporation Important  Disclaimers   THE  INFORMATION  CONTAINED  IN  THIS  PRESENTATION  IS  PROVIDED  FOR  INFORMATIONAL  PURPOSES  ONLY.     WHILST  EFFORTS  WERE  MADE  TO  VERIFY  THE  COMPLETENESS  AND  ACCURACY  OF  THE  INFORMATION  CONTAINED  IN  THIS   PRESENTATION,  IT  IS  PROVIDED  “AS  IS”,  WITHOUT  WARRANTY  OF  ANY  KIND,  EXPRESS  OR  IMPLIED.     ALL  PERFORMANCE  DATA  INCLUDED  IN  THIS  PRESENTATION  HAVE  BEEN  GATHERED  IN  A  CONTROLLED  ENVIRONMENT.    YOUR  OWN   TEST  RESULTS  MAY  VARY  BASED  ON  HARDWARE,  SOFTWARE  OR  INFRASTRUCTURE  DIFFERENCES.   ALL  DATA  INCLUDED  IN  THIS  PRESENTATION  ARE  MEANT  TO  BE  USED  ONLY  AS  A  GUIDE.   IN  ADDITION,  THE  INFORMATION  CONTAINED  IN  THIS  PRESENTATION  IS  BASED  ON  IBM’S  CURRENT  PRODUCT  PLANS  AND  STRATEGY,   WHICH  ARE  SUBJECT  TO  CHANGE  BY  IBM,  WITHOUT  NOTICE.     IBM  AND  ITS  AFFILIATED  COMPANIES  SHALL  NOT  BE  RESPONSIBLE  FOR  ANY  DAMAGES  ARISING  OUT  OF  THE  USE  OF,  OR  OTHERWISE   RELATED  TO,  THIS  PRESENTATION  OR  ANY  OTHER  DOCUMENTATION.     NOTHING  CONTAINED  IN  THIS  PRESENTATION  IS  INTENDED  TO,  OR  SHALL  HAVE  THE  EFFECT  OF:     -­‐  CREATING  ANY  WARRANT  OR  REPRESENTATION  FROM  IBM,  ITS  AFFILIATED  COMPANIES  OR  ITS  OR  THEIR  SUPPLIERS  AND/OR   LICENSORS   2
  • 3. © 2013 IBM Corporation Your  Speaker:  Ryan  A.  Sciampacone   • Run4me  Architect  @  IBM  (JTC)   •  Interpreters   •  Garbage  Collec4on   •  Plaaorm  interfacing  /  op4miza4on   •  Hardware  exploita4on   (E)  ryan_sciampacone@ca.ibm.com   (T)  @rsciampacone   • Visit  the  IBM  Booth  #5112  to  meet   other  IBM  Developers   3
  • 4. © 2013 IBM Corporation What  should  you  take  away  from  all  this?   • Not  a  tuning  talk   • Explore  some  (possibly)  unexpected  behavior  in  Java   • Your  plaaorm  changes  performance  in  strange  ways   • Add  to  your  “deep  knowledge”  toolkit   • Most  importantly:  To  be  entertained   4
  • 5. © 2013 IBM Corporation UP  TO  SPEED   Let’s  get  everyone…   5
  • 6. © 2013 IBM Corporation Compac4on   6 Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg ?  Allocate Heap   Object   Thread  
  • 7. © 2013 IBM Corporation Compac4on   7 Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg ?  Allocate Heap   Object   Thread  
  • 8. © 2013 IBM Corporation Compac4on   8 Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg ?  Allocate Heap   Object   Thread  
  • 9. © 2013 IBM Corporation Compac4on   9 Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg Allocate Heap   Object   Thread  
  • 10. © 2013 IBM Corporation Genera4onal   10 Heap   Object   Thread   New Old Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
  • 11. © 2013 IBM Corporation Genera4onal   11 Heap   Object   Thread   New Old Allocate Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
  • 12. © 2013 IBM Corporation Genera4onal   12 Heap   Object   Thread   New Old Allocate Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
  • 13. © 2013 IBM Corporation Genera4onal   13 Heap   Object   Thread   New Old GC   Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
  • 14. © 2013 IBM Corporation Genera4onal   14 Heap   Object   Thread   New Old GC   Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
  • 15. © 2013 IBM Corporation Genera4onal   15 Heap   Object   Thread   New Old Allocate Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
  • 16. © 2013 IBM Corporation Genera4onal   16 Heap   Object   Thread   New Old Allocate Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
  • 17. © 2013 IBM Corporation Genera4onal   17 Heap   Object   Thread   New Old GC   Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
  • 18. © 2013 IBM Corporation Genera4onal   18 Heap   Object   Thread   New Old GC   Tenure Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
  • 19. © 2013 IBM Corporation Genera4onal   19 Heap   Object   Thread   New Old Global  GC   Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg
  • 20. © 2013 IBM Corporation Stop  the  World   20 Duke Logo: © Oracle Recycle Symbol: Creative Commons http://commons.wikimedia.org/wiki/File:Recycle.jpg
  • 21. © 2013 IBM Corporation Concurrent   21 Duke Logo: © Oracle Recycle Symbol: Creative Commons http://commons.wikimedia.org/wiki/File:Recycle.jpg Java  Ac4vity     GC  Ac4vity    
  • 22. © 2013 IBM Corporation Parallel   22 Duke Logo: © Oracle Recycle Symbol: Creative Commons http://commons.wikimedia.org/wiki/File:Recycle.jpg Java  Ac4vity     GC  Ac4vity     …  
  • 23. © 2013 IBM Corporation ALLOCATION   Quick  look  at  the  mechanics  of…   23
  • 24. © 2013 IBM Corporation Alloca4on   24 Padlock: Public domain http://en.wikipedia.org/wiki/File:Viking_Age_lock.png Heap   Object   Thread   Allocate
  • 25. © 2013 IBM Corporation Alloca4on   25 Padlock: Public domain http://en.wikipedia.org/wiki/File:Viking_Age_lock.png Heap   Object   Thread   Allocate
  • 26. © 2013 IBM Corporation Alloca4on   26 Padlock: Public domain http://openclipart.org/detail/22179/lock-by-nicubunu Heap   Object   Thread   Allocate Private  Buffer  
  • 27. © 2013 IBM Corporation Alloca4on   27 Padlock: Public domain http://openclipart.org/detail/22179/lock-by-nicubunu Heap   Object   Thread   Allocate
  • 28. © 2013 IBM Corporation Alloca4on   28 Padlock: Public domain http://openclipart.org/detail/22179/lock-by-nicubunu Heap   Object   Thread   Allocate
  • 29. © 2013 IBM Corporation FINALIZATION   Gekng  around  to  eventually  talking  about  something  you  inevitably  have  to…   29
  • 30. © 2013 IBM Corporation The  meaning  of  “in  scope”   30
  • 31. © 2013 IBM Corporation The  meaning  of  “in  scope”   31 Simple  Finalizer  
  • 32. © 2013 IBM Corporation The  meaning  of  “in  scope”   32 Create  instance   of  finalizable  object  
  • 33. © 2013 IBM Corporation The  meaning  of  “in  scope”   33 No  references  to  the   finalizable  object  at  this   point  
  • 34. © 2013 IBM Corporation The  meaning  of  “in  scope”   34 Will  obj  be  finalized?  
  • 35. © 2013 IBM Corporation Example   35
  • 36. © 2013 IBM Corporation Perhaps  a  bit  more  dangerous…   36
  • 37. © 2013 IBM Corporation THE  ORDER  OF  THINGS   Finaliza4on   37
  • 38. © 2013 IBM Corporation What  can  we  expect  as  output?   38
  • 39. © 2013 IBM Corporation Example   39
  • 40. © 2013 IBM Corporation So  what  happened?   40 New Old FinalizableObject(2)   FinalizableObject(1)  
  • 41. © 2013 IBM Corporation So  what  happened?   41 New Old FinalizableObject(2)   FinalizableObject(1)  
  • 42. © 2013 IBM Corporation So  what  happened?   42 New Old FinalizableObject(2)   FinalizableObject(1)   GC  
  • 43. © 2013 IBM Corporation So  what  happened?   43 New Old FinalizableObject(2)   FinalizableObject(1)   GC   Tenure
  • 44. © 2013 IBM Corporation So  what  happened?   44 New Old FinalizableObject(2)   FinalizableObject(1)  
  • 45. © 2013 IBM Corporation So  what  happened?   45 New Old FinalizableObject(2)   FinalizableObject(1)  
  • 46. © 2013 IBM Corporation So  what  happened?   46 New Old FinalizableObject(2)   FinalizableObject(1)  
  • 47. © 2013 IBM Corporation So  what  happened?   47 New Old FinalizableObject(2)   FinalizableObject(1)   GC  
  • 48. © 2013 IBM Corporation So  what  happened?   48 New Old FinalizableObject(2)   FinalizableObject(1)   GC   Finalized!
  • 49. © 2013 IBM Corporation ANCHOR  POINTS  AND  GC   Finaliza4on   49
  • 50. © 2013 IBM Corporation What  about  anchor  points?   50 finalize()finalize()
  • 51. © 2013 IBM Corporation What  about  anchor  points?   51
  • 52. © 2013 IBM Corporation Example   52
  • 53. © 2013 IBM Corporation Why  only  one?   53 finalize()finalize()
  • 54. © 2013 IBM Corporation Why  only  one?   54 finalize()finalize()
  • 55. © 2013 IBM Corporation Why  only  one?   55 New Old
  • 56. © 2013 IBM Corporation Why  only  one?   56 New Old Allocate?  
  • 57. © 2013 IBM Corporation Why  only  one?   57 New Old Allocate?  
  • 58. © 2013 IBM Corporation Why  only  one?   58 New Old Allocate?   Allocate?  
  • 59. © 2013 IBM Corporation Why  only  one?   59 New Old Allocate?   Allocate?   GC  
  • 60. © 2013 IBM Corporation ICEBERGS   What  lies  beneath  the  surface…   60
  • 61. © 2013 IBM Corporation61 Iceberg: Jesus Diaz, Gizmodo
  • 62. © 2013 IBM Corporation Out  of  Memory  (as  we  know  and  love  it)   62 Heap   Object   Thread   New Old Thread Graphic: Wikimedia Commons http://en.m.wikipedia.org/wiki/File:Process_vs._thread.svg Allocate
  • 63. © 2013 IBM Corporation63
  • 64. © 2013 IBM Corporation64
  • 65. © 2013 IBM Corporation Not  all  memory  is  “heap”  memory   65 Heap   Object   Na4ve  Resource  
  • 66. © 2013 IBM Corporation Not  all  memory  is  “heap”  memory   66 Heap   Object   Na4ve  Resource  
  • 67. © 2013 IBM Corporation Not  all  memory  is  “heap”  memory   67 Heap   Object   Na4ve  Resource  
  • 68. © 2013 IBM Corporation68
  • 69. © 2013 IBM Corporation69
  • 70. © 2013 IBM Corporation70
  • 71. © 2013 IBM Corporation71
  • 72. © 2013 IBM Corporation Keep  track  /  Use  facili4es  available   • Plenty  of  process  monitoring  somware  out  there   • Consider  resource  limi4ng  /  thronling  facili4es   72
  • 73. © 2013 IBM Corporation SHARING  MEMORY   Two  for  me  and  one  for  you…   73
  • 74. © 2013 IBM Corporation Two  threads  and  one  field   74 Object   Thread   field1 field2 field<N> … “Same”  
  • 75. © 2013 IBM Corporation Two  threads  and  one  field   75 Object   Thread   field1 field2 field<N> … field1 field2 field<N> … “Different”  
  • 76. © 2013 IBM Corporation Example   76
  • 77. © 2013 IBM Corporation The  CPU  Cache  (High  level)   77 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit (0x1F89DB04)   Memory   CPU  
  • 78. © 2013 IBM Corporation The  CPU  Cache  (High  level)   78 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit (0x1F89DB04)   Memory   CPU   Cache  
  • 79. © 2013 IBM Corporation The  CPU  Cache  (High  level)   79 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit (0x1F89DB04)   Memory   CPU   Cache  
  • 80. © 2013 IBM Corporation The  CPU  Cache  (High  level)   80 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit (0x1F89DB04)   Memory   CPU   Cache   Cache   CPU  
  • 81. © 2013 IBM Corporation The  CPU  Cache  (High  level)   81 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit (0x1F89DB04)   Memory   CPU   Cache   Cache   CPU  
  • 82. © 2013 IBM Corporation The  CPU  Cache  (High  level)   82 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit (0x1F89DB04)   Memory   CPU   Cache   Cache   CPU  
  • 83. © 2013 IBM Corporation Two  threads  and  two  fields   83 Object   Thread   field1 field2 field<N> … “Same”  
  • 84. © 2013 IBM Corporation Two  threads  and  two  fields   84 Object   Thread   field1 field2 field<N> … field1 field2 field<N> … “Different”  
  • 85. © 2013 IBM Corporation Example   85
  • 86. © 2013 IBM Corporation The  CPU  Cache  Pt.  2  (High  level)   86 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit Memory   CPU   Cache  
  • 87. © 2013 IBM Corporation The  CPU  Cache  Pt.  2  (High  level)   87 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit Memory   CPU   Cache   Cache  Line  
  • 88. © 2013 IBM Corporation The  CPU  Cache  Pt.  2  (High  level)   88 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit Memory   CPU   Cache   Cache  Line  
  • 89. © 2013 IBM Corporation The  CPU  Cache  Pt.  2  (High  level)   89 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit Memory   CPU   Cache   Cache   CPU   Cache  Line  
  • 90. © 2013 IBM Corporation The  CPU  Cache  Pt.  2  (High  level)   90 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit Memory   CPU   Cache   Cache   CPU   Cache  Line  
  • 91. © 2013 IBM Corporation The  CPU  Cache  Pt.  2  (High  level)   91 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit Memory   CPU   Cache   Cache   CPU   Cache  Line  
  • 92. © 2013 IBM Corporation FIELD  ORDERING   When  ordering  pizza  you  expect  the  crust  on  the  bonom…   92
  • 93. © 2013 IBM Corporation Subclass  with  fields  “far  apart”   93
  • 94. © 2013 IBM Corporation Subclass  with  fields  “far  apart”   94
  • 95. © 2013 IBM Corporation Two  threads  and  two  fields  and  one  subclass   95 Object   Thread   field1 field2 … pad001 pad0NN pad100 “Second”   pad1NN … field3
  • 96. © 2013 IBM Corporation Two  threads  and  two  fields  and  one  subclass   96 Object   Thread   field1 field2 … pad001 pad0NN pad100 pad1NN … “Third”   field3
  • 97. © 2013 IBM Corporation Example   97
  • 98. © 2013 IBM Corporation So  what  happened?   98
  • 99. © 2013 IBM Corporation So  what  happened?   99 field1 field2 … pad001 pad0NN pad100 pad1NN … field3
  • 100. © 2013 IBM Corporation So  what  happened?   100 field1 field2 … pad001 pad0NN pad100 pad1NN … field3
  • 101. © 2013 IBM Corporation So  what  happened?   101 field1 field2 … pad001 pad0NN pad100 pad1NN … field3
  • 102. © 2013 IBM Corporation So  what  happened?   102 field1 field2 … pad001 pad0NN pad100 pad1NN … field3
  • 103. © 2013 IBM Corporation So  what  happened?   103 field1 field2 … pad001 pad0NN pad100 pad1NN … field3 Cache  Line  
  • 104. © 2013 IBM Corporation So  what  happened?  (Alternate  version)   104 field1 … pad001 pad0NN pad100 pad1NN … field2 field3
  • 105. © 2013 IBM Corporation CACHE  CAPACITY   Spreading  things  out  doesn’t  always  reduce  collisions…   105
  • 106. © 2013 IBM Corporation Small  data,  Big  problems   106 byte[]  
  • 107. © 2013 IBM Corporation Small  data,  Big  problems   107 Cache  Line  (64  Bytes)   byte[]  
  • 108. © 2013 IBM Corporation Small  data,  Big  problems   108 Cache  Line  (64  Bytes)   byte[]  
  • 109. © 2013 IBM Corporation Small  data,  Big  problems   109 4KB   4KB   Cache  Line  (64  Bytes)   byte[]  
  • 110. © 2013 IBM Corporation Small  data,  Big  problems   110 4KB   4KB   Cache  Line  (64  Bytes)   byte[]  
  • 111. © 2013 IBM Corporation Small  data,  Big  problems   111 4KB   4KB   Cache  Line  (64  Bytes)   byte[]  
  • 112. © 2013 IBM Corporation Small  data,  Big  problems   112 4KB   4KB   Cache  Line  (64  Bytes)   byte[]  
  • 113. © 2013 IBM Corporation Small  data,  Big  problems   113 4KB   4KB   Cache  Line  (64  Bytes)   byte[]  
  • 114. © 2013 IBM Corporation Small  data,  Big  problems   •  Access  the  same  index  from  each  line   •  Move  to  the  next  index   •  Repeat   114 4KB   4KB   Cache  Line  (64  Bytes)   byte[]  
  • 115. © 2013 IBM Corporation Example   115
  • 116. © 2013 IBM Corporation Cache  “capacity”  is  less  than  you  think   116 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit Cache  
  • 117. © 2013 IBM Corporation Cache  “capacity”  is  less  than  you  think   117 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit Cache  
  • 118. © 2013 IBM Corporation Cache  “capacity”  is  less  than  you  think   118 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit Cache  
  • 119. © 2013 IBM Corporation Cache  “capacity”  is  less  than  you  think   119 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit Cache  
  • 120. © 2013 IBM Corporation Cache  “capacity”  is  less  than  you  think   120 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit Cache  
  • 121. © 2013 IBM Corporation Cache  “capacity”  is  less  than  you  think   121 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit Cache  
  • 122. © 2013 IBM Corporation Cache  “capacity”  is  less  than  you  think   122 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit Cache   8  Entries  
  • 123. © 2013 IBM Corporation HOW  MEMORY  WORKS   Before  I  forget,  a  few  more  things  about…   123
  • 124. © 2013 IBM Corporation Non  Uniform  Memory  Architecture  (NUMA)   124 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit DRAM: Wikipedia Commons http://en.wikipedia.org/wiki/Dynamic_random-access_memory
  • 125. © 2013 IBM Corporation Non  Uniform  Memory  Architecture  (NUMA)   125 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit DRAM: Wikipedia Commons http://en.wikipedia.org/wiki/Dynamic_random-access_memory
  • 126. © 2013 IBM Corporation Non  Uniform  Memory  Architecture  (NUMA)   126 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit DRAM: Wikipedia Commons http://en.wikipedia.org/wiki/Dynamic_random-access_memory
  • 127. © 2013 IBM Corporation Non  Uniform  Memory  Architecture  (NUMA)   127 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit DRAM: Wikipedia Commons http://en.wikipedia.org/wiki/Dynamic_random-access_memory
  • 128. © 2013 IBM Corporation Non  Uniform  Memory  Architecture  (NUMA)   128 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit DRAM: Wikipedia Commons http://en.wikipedia.org/wiki/Dynamic_random-access_memory
  • 129. © 2013 IBM Corporation Non  Uniform  Memory  Architecture  (NUMA)   129 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit DRAM: Wikipedia Commons http://en.wikipedia.org/wiki/Dynamic_random-access_memory
  • 130. © 2013 IBM Corporation Non  Uniform  Memory  Architecture  (NUMA)   130 CPU: Wikipedia Commons https://en.wikipedia.org/wiki/Central_processing_unit DRAM: Wikipedia Commons http://en.wikipedia.org/wiki/Dynamic_random-access_memory
  • 131. © 2013 IBM Corporation Non  Uniform  Memory  Architecture   • JVMs  do  have  support   •  Balanced  GC  policy   •  -­‐Xnuma   • Plaaorm  commands  for  thronling  /  afini4zing   •  Taskset   •  Numactl   • Virtualiza4on   131
  • 132. © 2013 IBM Corporation Resource  on  Memory   132
  • 133. © 2013 IBM Corporation PARTING  REMARKS   And  finally…   133
  • 134. © 2013 IBM Corporation ?  134
  • 135. © 2013 IBM Corporation Copyright  and  Trademarks   ©  IBM  Corpora4on  2013.  All  Rights  Reserved.       IBM,  the  IBM  logo,  and  ibm.com  are  trademarks  or  registered  trademarks  of   Interna4onal  Business  Machines  Corp.,  and  registered  in  many  jurisdic4ons   worldwide.       Other  product  and  service  names  might  be  trademarks  of  IBM  or  other  companies.       A  current  list  of  IBM  trademarks  is  available  on  the  Web  –  see  the  IBM  “Copyright  and   trademark  informa4on”  page  at  URL:    www.ibm.com/legal/copytrade.shtml   135