This slide talk about more details about Docker and what is Docker Swarm mode.
There are also some examples in this slide, you can follow them to practice.
This document provides an overview of garbage collection in Java. It begins with an introduction to the presenter Leon Chen and his background. It then discusses Java memory management and garbage collection fundamentals, including the young and old generations, minor and major garbage collections, and how objects are promoted between generations. The document provides examples of garbage collection using diagrams and discusses tuning the Java heap size based on the live data size. It emphasizes the importance of garbage collection logging for performance analysis.
The document discusses Java garbage collection. It begins with an introduction to garbage collection, explaining that it is used to release unused memory and each JVM can implement its own garbage collection algorithms. It then covers the main garbage collection algorithms of reference counting, mark and sweep, and stop and copy. It also discusses finalize() methods, reference types in Java including strong, soft, weak and phantom references, and tips for improving garbage collection performance in Java programs.
This slide talk about more details about Docker and what is Docker Swarm mode.
There are also some examples in this slide, you can follow them to practice.
This document provides an overview of garbage collection in Java. It begins with an introduction to the presenter Leon Chen and his background. It then discusses Java memory management and garbage collection fundamentals, including the young and old generations, minor and major garbage collections, and how objects are promoted between generations. The document provides examples of garbage collection using diagrams and discusses tuning the Java heap size based on the live data size. It emphasizes the importance of garbage collection logging for performance analysis.
The document discusses Java garbage collection. It begins with an introduction to garbage collection, explaining that it is used to release unused memory and each JVM can implement its own garbage collection algorithms. It then covers the main garbage collection algorithms of reference counting, mark and sweep, and stop and copy. It also discusses finalize() methods, reference types in Java including strong, soft, weak and phantom references, and tips for improving garbage collection performance in Java programs.
Introduction of Java GC Tuning and Java Java Mission ControlLeon Chen
?
This document provides an introduction and overview of Java garbage collection (GC) tuning and the Java Mission Control tool. It begins with information about the speaker, Leon Chen, including his background and patents. It then outlines the Java and JVM roadmap and upcoming features. The bulk of the document discusses GC tuning concepts like heap sizing, generation sizing, footprint vs throughput vs latency. It provides examples and recommendations for GC logging, analysis tools like GCViewer and JWorks GC Web. The document is intended to outline Oracle's product direction and future plans for Java GC tuning and tools.
This document describes a testing framework for analyzing Java garbage collection (GC) performance. It consists of:
1. A properties file that specifies test parameters like the GC algorithm, heap size, and object lifetimes.
2. A script file that defines the sequence of object creations and workload.
3. Classes that execute the script, measure GC performance, and write output to log files.
4. A script that iterates the tests, varying a property each time and analyzing the results.
Java garbage collection has evolved significantly since its inception in 1959. The modern Hotspot JVM uses generational garbage collection with a young and old generation. It employs concurrent and parallel techniques like CMS to minimize pauses. OutOfMemoryErrors require increasing heap sizes or fixing leaks. Finalizers are generally avoided due to performance impacts. GC tuning must be tested under realistic loads rather than one-size-fits-all settings. Analysis tools help correlate GC logs with application behavior.
English version of the presentation we gave at Devoxx FR 2012.
In depth analysis on how java Garbage collector works and how to minimise pause in your application.
The Java Memory Model describes the behavior of memory in Java programs. It defines how threads share access to data and the possible effects of optimizations and reordering of code by compilers and processors. The model introduces the concepts of synchronization actions, happens-before ordering, and volatile variables to define the visibility and ordering of memory reads and writes between threads.
Вячеслав Блинов ?Java Garbage Collection: A Performance Impact?Anna Shymchenko
?
This document discusses Java garbage collection and its performance impact. It provides an overview of garbage collection, including that garbage collectors reclaim memory from objects no longer in use. It describes the different Java GC algorithms like serial, parallel, CMS, and G1 collectors and how to choose between them based on factors like heap size and CPU availability. It also gives guidance on basic GC tuning techniques like sizing the heap and generations as well as using adaptive sizing controls.
This document discusses Java concurrency and the Java memory model. It begins with an agenda that covers the Java memory model, thread confinement, the Java atomic API, immutable objects, and memory consumption. It then goes into more detail on the Java memory model, discussing topics like ordering, visibility, and atomicity. It provides examples and references to help understand concepts like sequential consistency and data races. It also covers thread confinement techniques like ad hoc confinement, stack confinement, and using ThreadLocal.
The Java Memory Model describes how threads interact with shared memory in Java programs. It allows compiler optimizations but also provides constructs like synchronized, volatile, and final to establish "happens-before" ordering between threads and ensure visibility and atomicity of memory operations. The model is designed to enable both efficient multithreaded execution and correct synchronization in user code.
This document discusses the Java Memory Model (JMM). It begins by introducing the goals of familiarizing the attendee with the JMM, how processors work, and how the Java compiler and JVM work. It then covers key topics like data races, synchronization, atomicity, and examples. The document provides examples of correctly synchronized programs versus programs with data races. It explains concepts like happens-before ordering, volatile variables, and atomic operations. It also discusses weaknesses in some common multi-threading constructs like double-checked locking and discusses how constructs like final fields can enable safe publication of shared objects. The document concludes by mentioning planned improvements to the JMM in JEP 188.
Николай Папирный Тема: "Java memory model для простых смертных"Ciklum Minsk
?
This document provides an overview of the Java Memory Model (JMM). It begins by explaining why developers should learn about the JMM and covers key concepts like program order, sequential consistency, synchronization actions, synchronization order, happens-before relationships, and double checked locking. The document uses examples and diagrams to illustrate these concepts and how the JMM handles issues like visibility and atomicity in multithreaded programs. It aims to explain the essential aspects of the JMM in an accessible way for developers.
Java Memory Consistency Model - concepts and contextTomek Borek
?
Java Memory Consistency Model is a difficult topic.
It's useful in making sure that multi-threaded programs on multi-threaded cores will interact with each other (and through memory) in a consistent manner.
It's specification is damn hard (even according to folks with lots of concurrent experience, like Doug Lea) to read, understand and routinely follow without error.
This presentation talks about some fallacies surrounding memory model, explains it, offers definitions and reasons for it's existence. It ain't deep, it's more entry level stuff.
This slide will explain about building blocks of JVM optimization for you java based application.
It explains basics of heap concepts and different type of java garbage collectors.
This presentation is primarily based on Oracle's "Java SE 6 HotSpot? Virtual Machine Garbage Collection Tuning" document.
This introduces how Java manages memory using generations, available garbage collectors and how to tune them to achieve desired performance.
This document discusses the Java Memory Model (JMM) and how it describes how threads interact through memory in Java. It covers key aspects of the JMM including happens-before ordering, memory barriers, visibility rules, and how final fields and atomic instructions interact with the memory model. It also discusses performance considerations and how different processor architectures implement memory ordering.
The Java Memory Model defines rules for how threads interact through shared memory in Java. It specifies rules for atomicity, ordering, and visibility of memory operations. The JMM provides guarantees for code safety while allowing compiler optimizations. It defines a happens-before ordering of instructions. The ordering rules and visibility rules ensure threads see updates from other threads as expected. The JMM implementation inserts memory barriers as needed to maintain the rules on different hardware platforms.
The workshop is based on several Nikita Salnikov-Tarnovski lectures + my own research. The workshop consists of 2 parts. The first part covers:
- different Java GCs, their main features, advantages and disadvantages;
- principles of GC tuning;
- work with GC Viewer as tool for GC analysis;
- first steps tuning demo;
- comparison primary GCs on Java 1.7 and Java 1.8
The second part covers:
- work with Off-Heap: ByteBuffer / Direct ByteBuffer / Unsafe / MapDB;
- examples and comparison of approaches;
The off-heap-demo: https://github.com/moisieienko-valerii/off-heap-demo
In the last year, we've gone from millions of pieces of data to billions of pieces of data. I will speak on a solution for scaling up and about the challenges presented. Also covered will be the future of data at Qihoo 360 with MongoDB.
Pegasus: Designing a Distributed Key Value System (Arch summit beijing-2016)涛 吴
?
This slide delivered by Zuoyan Qin, Chief engineer from XiaoMi Cloud Storage Team, was for talk at Arch summit Beijing-2016 regarding how Pegasus was designed.
24. Serial GC
? minor GC
– Eden 中的 live 对象被拷贝到空闲的 Survivor Space
– 太大没法在 survivor space 存下的直接送往年长代
– live 对象 , 分两成两组
? 相对还是比较 年轻 的,送往空闲的 Survivor Space
? 已经足够老的送往 年长代
– 当 minor GC 结束后
? Eden 清空
? 先前非空的 Survivor Space 被清空
? 先前空的 Survivor Space 存放幸存的对象
? major GC
– 年长 和 永久代代都是通过顺序式 mark-sweep-compact 算法进行
– mark 阶段标识哪些对象仍然 live
– sweep 阶段清除没有被标识的对象(即垃圾)
– compact 将 live 对象移到各个堆的开头,剩下的一边是连续的空闲空间
25. Parallel GC
?
顺应当今主流硬件:廉价内存和多核 CPU
?
minor GC
– 算法同 Serial GC 的 minor GC 一样
– 分而治之,充分利用所有的 CPU
– 仍然 stop the world
– 只不过是采用并行的版本,时间大大缩短
– 吞吐量提升
?
major GC
– 算法同 Serial GC 的 major GC 一样 :
顺序式 mark-sweep-compact
47. 通用策略
? 年轻代 Eden 空间大小
– 关系到 minor GC 的频率
? 越小越容易填满 , 频率越高
? 不利于对象成为垃圾
– 关系到在伊甸园中夭折对象的比例
? 在 Major GC 中耗费力气
– 增加 Eden 大小并不总是减小 minor GC 的时间
? 拷贝 Eden 中的 age=0 的对象到 survivor space TO
? 处理 survivor space FROM 中的 age>0 的对象
48. 通用策略
? 年轻代 Survivor 空间大小
– 存在两个 Survivor: from, to
– -XX:SurvivorRatio=<ratio>
? 单个 Survivor 与 Eden 的比例
? ratio=6 表示 每个 Survivor / Eden = 1/6, 即每个
Survivor 是整个年轻代的 1/8 ,因为有两个
Survivor Space:
2s + e = y
s/e = 1/6
2s + 6s = y
S = y/8