Optimizing Java - (Chris Newland James Gough Benjamin J Evans) (Z-Library)

Author: Chris Newland & James Gough & Benjamin J Evans

技术

Performance tuning is an experimental science, but that doesn’t mean engineers should resort to guesswork and folklore to get the job done. Yet that’s often the case. With this practical book, intermediate to advanced Java technologists working with complex technology stacks will learn how to tune Java applications for performance using a quantitative, verifiable approach. Most resources on performance tend to discuss the theory and internals of Java virtual machines, but this book focuses on the practicalities of performance tuning by examining a wide range of aspects. There are no simple recipes, tips and tricks, or algorithms to learn. Performance tuning is a process of defining and determining desired outcomes. And it requires diligence. Learn how Java principles and technology make the best use of modern hardware and operating systems Explore several performance tests and common anti-patterns that can vex your team Understand the pitfalls of measuring Java performance numbers and the drawbacks of microbenchmarking Dive into JVM garbage collection logging, monitoring, tuning, and tools Explore JIT compilation and Java language performance techniques Learn performance aspects of the Java Collections API and get an overview of Java concurrency

📄 File Format: PDF
💾 File Size: 8.4 MB
49
Views
0
Downloads
0.00
Total Donations

📄 Text Preview (First 20 pages)

ℹ️

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

📄 Page 1
(This page has no text content)
📄 Page 2
1. Foreword 2. Preface a. Conventions Used in This Book b. Using Code Examples c. O’Reilly Safari d. How to Contact Us e. Acknowledgments 3. 1. Optimization and Performance Defined a. Java Performance—The Wrong Way b. Java Performance Overview
📄 Page 3
c. Performance as an Experimental Science d. A Taxonomy for Performance i. Throughput ii. Latency iii. Capacity iv. Utilization v. Efficiency vi. Scalability vii. Degradation viii. Connections Between the Observables
📄 Page 4
e. Reading Performance Graphs f. Summary 4. 2. Overview of the JVM a. Interpreting and Classloading b. Executing Bytecode c. Introducing HotSpot i. Introducing Just-in-Time Compilation d. JVM Memory Management e. Threading and the Java Memory Model
📄 Page 5
f. Meet the JVMs i. A Note on Licenses g. Monitoring and Tooling for the JVM i. VisualVM h. Summary 5. 3. Hardware and Operating Systems a. Introduction to Modern Hardware b. Memory i. Memory Caches
📄 Page 6
c. Modern Processor Features i. Translation Lookaside Buffer ii. Branch Prediction and Speculative Execution iii. Hardware Memory Models d. Operating Systems i. The Scheduler ii. A Question of Time iii. Context Switches e. A Simple System Model
📄 Page 7
f. Basic Detection Strategies i. Utilizing the CPU ii. Garbage Collection iii. I/O iv. Mechanical Sympathy g. Virtualization h. The JVM and the Operating System i. Summary 6. 4. Performance Testing Patterns and Antipatterns
📄 Page 8
a. Types of Performance Test i. Latency Test ii. Throughput Test iii. Load Test iv. Stress Test v. Endurance Test vi. Capacity Planning Test vii. Degradation Test b. Best Practices Primer i. Top-Down Performance
📄 Page 9
ii. Creating a Test Environment iii. Identifying Performance Requirements iv. Java-Specific Issues v. Performance Testing as Part of the SDLC c. Introducing Performance Antipatterns i. Boredom ii. Résumé Padding iii. Peer Pressure iv. Lack of Understanding
📄 Page 10
v. Misunderstood/Nonexistent Problem d. Performance Antipatterns Catalogue i. Distracted by Shiny ii. Distracted by Simple iii. Performance Tuning Wizard iv. Tuning by Folklore v. The Blame Donkey vi. Missing the Bigger Picture vii. UAT Is My Desktop viii. Production-Like Data Is Hard
📄 Page 11
e. Cognitive Biases and Performance Testing i. Reductionist Thinking ii. Confirmation Bias iii. Fog of War (Action Bias) iv. Risk Bias v. Ellsberg’s Paradox f. Summary 7. 5. Microbenchmarking and Statistics a. Introduction to Measuring Java Performance
📄 Page 12
b. Introduction to JMH i. Don’t Microbenchmark If You Can Help It (A True Story) ii. Heuristics for When to Microbenchmark iii. The JMH Framework iv. Executing Benchmarks c. Statistics for JVM Performance i. Types of Error ii. Non-Normal Statistics d. Interpretation of Statistics
📄 Page 13
e. Summary 8. 6. Understanding Garbage Collection a. Introducing Mark and Sweep i. Garbage Collection Glossary b. Introducing the HotSpot Runtime i. Representing Objects at Runtime ii. GC Roots and Arenas c. Allocation and Lifetime i. Weak Generational Hypothesis
📄 Page 14
d. Garbage Collection in HotSpot i. Thread-Local Allocation ii. Hemispheric Collection e. The Parallel Collectors i. Young Parallel Collections ii. Old Parallel Collections iii. Limitations of Parallel Collectors f. The Role of Allocation
📄 Page 15
g. Summary 9. 7. Advanced Garbage Collection a. Tradeoffs and Pluggable Collectors b. Concurrent GC Theory i. JVM Safepoints ii. Tri-Color Marking c. CMS i. How CMS Works ii. Basic JVM Flags for CMS
📄 Page 16
d. G1 i. G1 Heap Layout and Regions ii. G1 Algorithm Design iii. G1 Phases iv. Basic JVM Flags for G1 e. Shenandoah i. Concurrent Compaction ii. Obtaining Shenandoah f. C4 (Azul Zing)
📄 Page 17
i. The Loaded Value Barrier g. Balanced (IBM J9) i. J9 Object Headers ii. Large Arrays in Balanced iii. NUMA and Balanced h. Legacy HotSpot Collectors i. Serial and SerialOld ii. Incremental CMS (iCMS) iii. Deprecated and Removed GC Combinations
📄 Page 18
iv. Epsilon i. Summary 10. 8. GC Logging, Monitoring, Tuning, and Tools a. Introduction to GC Logging i. Switching On GC Logging ii. GC Logs Versus JMX iii. Drawbacks of JMX iv. Benefits of GC Log Data b. Log Parsing Tools
📄 Page 19
i. Censum ii. GCViewer iii. Different Visualizations of the Same Data c. Basic GC Tuning i. Understanding Allocation ii. Understanding Pause Time iii. Collector Threads and GC Roots d. Tuning Parallel GC e. Tuning CMS
📄 Page 20
i. Concurrent Mode Failures Due to Fragmentation f. Tuning G1 g. jHiccup h. Summary 11. 9. Code Execution on the JVM a. Overview of Bytecode Interpretation i. Introduction to JVM Bytecode ii. Simple Interpreters iii. HotSpot-Specific Details
The above is a preview of the first 20 pages. Register to read the complete e-book.

💝 Support Author

0.00
Total Amount (¥)
0
Donation Count

Login to support the author

Login Now
Back to List