没有合适的资源?快使用搜索试试~ 我知道了~
JDK12-hotspot-virtual-machine-garbage-collection-tuning-guide
需积分: 5 1 下载量 185 浏览量
2023-08-08
07:34:18
上传
评论
收藏 556KB PDF 举报
温馨提示
试读
58页
JDK12-hotspot-virtual-machine-garbage-collection-tuning-guide
资源推荐
资源详情
资源评论
Java Platform, Standard Edition
HotSpot Virtual Machine Garbage Collection
Tuning Guide
Release 12
F13888-01
March 2019
Java Platform, Standard Edition HotSpot Virtual Machine Garbage Collection Tuning Guide, Release 12
F13888-01
Copyright © 2015, 2019, Oracle and/or its affiliates. All rights reserved.
This software and related documentation are provided under a license agreement containing restrictions on
use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your
license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify,
license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means.
Reverse engineering, disassembly, or decompilation of this software, unless required by law for
interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If
you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on
behalf of the U.S. Government, then the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software,
any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are
"commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-
specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the
programs, including any operating system, integrated software, any programs installed on the hardware,
and/or documentation, shall be subject to license terms and license restrictions applicable to the programs.
No other rights are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management applications.
It is not developed or intended for use in any inherently dangerous applications, including applications that
may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you
shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its
safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this
software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of
their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are
used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron,
the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro
Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content, products,
and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly
disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise
set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be
responsible for any loss, costs, or damages incurred due to your access to or use of third-party content,
products, or services, except as set forth in an applicable agreement between you and Oracle.
Contents
Preface
Audience vii
Documentation Accessibility vii
Related Documents vii
Conventions vii
1
Introduction to Garbage Collection Tuning
What Is a Garbage Collector? 1-1
Why Does the Choice of Garbage Collector Matter? 1-2
Supported Operating Systems in Documentation 1-3
2
Ergonomics
Garbage Collector, Heap, and Runtime Compiler Default Selections 2-1
Behavior-Based Tuning 2-1
Maximum Pause-Time Goal 2-2
Throughput Goal 2-2
Footprint 2-2
Tuning Strategy 2-2
3
Garbage Collector Implementation
Generational Garbage Collection 3-1
Generations 3-2
Performance Considerations 3-3
Throughput and Footprint Measurement 3-4
4
Factors Affecting Garbage Collection Performance
Total Heap 4-1
Heap Options Affecting Generation Size 4-1
Default Option Values for Heap Size 4-2
iii
Conserving Dynamic Footprint by Minimizing Java Heap Size 4-3
The Young Generation 4-3
Young Generation Size Options 4-3
Survivor Space Sizing 4-4
5
Available Collectors
Serial Collector 5-1
Parallel Collector 5-1
The Mostly Concurrent Collectors 5-1
The Z Garbage Collector 5-2
Selecting a Collector 5-2
6
The Parallel Collector
Number of Parallel Collector Garbage Collector Threads 6-1
Arrangement of Generations in Parallel Collectors 6-2
Parallel Collector Ergonomics 6-2
Options to Specify Parallel Collector Behaviors 6-2
Priority of Parallel Collector Goals 6-3
Parallel Collector Generation Size Adjustments 6-3
Parallel Collector Default Heap Size 6-3
Specification of Parallel Collector Initial and Maximum Heap Sizes 6-4
Excessive Parallel Collector Time and OutOfMemoryError 6-4
Parallel Collector Measurements 6-4
7
The Mostly Concurrent Collectors
Overhead of Mostly Concurrent Collectors 7-1
8
Concurrent Mark Sweep (CMS) Collector
Concurrent Mark Sweep Collector Performance and Structure 8-1
Concurrent Mode Failure 8-2
Excessive GC Time and OutOfMemoryError 8-2
Concurrent Mark Sweep Collector and Floating Garbage 8-2
Concurrent Mark Sweep Collector Pauses 8-3
Concurrent Mark Sweep Collector Concurrent Phases 8-3
Starting a Concurrent Collection Cycle 8-3
Scheduling Pauses 8-4
Concurrent Mark Sweep Collector Measurements 8-4
iv
9
Garbage-First Garbage Collector
Introduction to Garbage-First Garbage Collector 9-1
Enabling G1 9-2
Basic Concepts 9-2
Heap Layout 9-2
Garbage Collection Cycle 9-3
Garbage Collection Pauses and Collection Set 9-5
Garbage-First Internals 9-5
Java Heap Sizing 9-5
Young-Only Phase Generation Sizing 9-6
Space-Reclamation Phase Generation Sizing 9-6
Periodic Garbage Collections 9-7
Determining Initiating Heap Occupancy 9-7
Marking 9-7
Behavior in Very Tight Heap Situations 9-8
Humongous Objects 9-8
Ergonomic Defaults for G1 GC 9-9
Comparison to Other Collectors 9-10
10
Garbage-First Garbage Collector Tuning
General Recommendations for G1 10-1
Moving to G1 from Other Collectors 10-2
Improving G1 Performance 10-2
Observing Full Garbage Collections 10-2
Humongous Object Fragmentation 10-3
Tuning for Latency 10-3
Unusual System or Real-Time Usage 10-3
Reference Object Processing Takes Too Long 10-4
Young-Only Collections Within the Young-Only Phase Take Too Long 10-4
Mixed Collections Take Too Long 10-5
High Update RS and Scan RS Times 10-5
Tuning for Throughput 10-6
Tuning for Heap Size 10-7
Tunable Defaults 10-7
11
The Z Garbage Collector
Setting the Heap Size 11-1
Setting Number of Concurrent GC Threads 11-1
v
剩余57页未读,继续阅读
资源评论
weixin_40191861_zj
- 粉丝: 62
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功