没有合适的资源?快使用搜索试试~ 我知道了~
Oracle-HotSpot Virtual Machine Garbage Collection.pdf
需积分: 5 1 下载量 165 浏览量
2023-07-19
18:13:10
上传
评论
收藏 720KB PDF 举报
温馨提示
试读
50页
技术文档分享。
资源推荐
资源详情
资源评论
Java Platform, Standard Edition
HotSpot Virtual Machine Garbage Collection
Tuning Guide
Release 14
F23390-01
March 2020
Java Platform, Standard Edition HotSpot Virtual Machine Garbage Collection Tuning Guide, Release 14
F23390-01
Copyright © 2015, 2020, Oracle and/or its affiliates.
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 embedded, installed or activated on delivered hardware, and modifications of such programs)
and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end
users are "commercial computer software" or “commercial computer software documentation” pursuant to the
applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use,
reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or
adaptation of i) Oracle programs (including any operating system, integrated software, any programs
embedded, installed or activated on delivered hardware, and modifications of such programs), ii) Oracle
computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the
license contained in the applicable contract. The terms governing the U.S. Government’s use of Oracle cloud
services are defined by the applicable contract for such services. 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 Inside 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, Epyc,
and the AMD 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 vi
Documentation Accessibility vi
Related Documents vi
Conventions vi
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-3
5
Available Collectors
Serial Collector 5-1
Parallel Collector 5-1
Garbage-First (G1) Garbage Collector 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
Garbage-First (G1) Garbage Collector
Introduction to Garbage-First (G1) Garbage Collector 7-1
Enabling G1 7-2
Basic Concepts 7-2
Heap Layout 7-2
Garbage Collection Cycle 7-3
Garbage Collection Pauses and Collection Set 7-5
Garbage-First Internals 7-5
Java Heap Sizing 7-5
Young-Only Phase Generation Sizing 7-6
Space-Reclamation Phase Generation Sizing 7-6
Periodic Garbage Collections 7-7
Determining Initiating Heap Occupancy 7-7
Marking 7-7
Behavior in Very Tight Heap Situations 7-8
iv
Humongous Objects 7-8
Ergonomic Defaults for G1 GC 7-9
Comparison to Other Collectors 7-10
8
Garbage-First Garbage Collector Tuning
General Recommendations for G1 8-1
Moving to G1 from Other Collectors 8-2
Improving G1 Performance 8-2
Observing Full Garbage Collections 8-2
Humongous Object Fragmentation 8-3
Tuning for Latency 8-3
Unusual System or Real-Time Usage 8-3
Reference Object Processing Takes Too Long 8-4
Young-Only Collections Within the Young-Only Phase Take Too Long 8-4
Mixed Collections Take Too Long 8-5
High Update RS and Scan RS Times 8-5
Tuning for Throughput 8-6
Tuning for Heap Size 8-7
Tunable Defaults 8-7
9
The Z Garbage Collector
Setting the Heap Size 9-1
Setting Number of Concurrent GC Threads 9-1
10
Other Considerations
Finalization and Weak, Soft, and Phantom References 10-1
Explicit Garbage Collection 10-1
Soft References 10-2
Class Metadata 10-2
v
剩余49页未读,继续阅读
资源评论
weixin_44079197
- 粉丝: 1220
- 资源: 599
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功