Java Performance Optimization in Plain Terms cover

Java Performance Optimization in Plain Terms

Rating 2.6
Word count
993 words
Chapters
15
ISBN
9787121284816

Tags

Summary

Java Performance Optimization in Plain Terms is a practical Java performance-tuning book by Zhou Mingyao, drawing on years of experience in investment banking and distributed computing projects. Published by Publishing House of Electronics Industry in 2016 under the Broadview imprint, it runs 564 pages and about 993,000 Chinese characters. Unlike books that discuss only JVM parameters, the author treats performance optimization as a complete chain from hardware to code: first the optimization strategy and goal setting, then foundational knowledge of servers and hardware (memory, CPU/GPU, hard drives, network architecture), then layer by layer optimization advice for Java API calls, optimization at the program design level, parallel and concurrent program optimization, and finally JVM performance testing and monitoring, JVM tuning advice, and other related optimization topics. The book stresses that every chapter is backed by real cases, using business scenarios familiar to the public such as the 12306 ticket-booking system and e-commerce platforms to explain, through code comparisons, the costs behind specific technical choices such as object creation, method calls, the trade-off between local and member variables, multithreaded synchronization and locking, and garbage collection. The author repeatedly reminds readers that performance tuning is largely an art: locate the bottleneck first, then discuss optimization measures; and that it is not enough to care only about the continuous evolution of the JVM—one must also understand advances in the underlying hardware platform and operating system. The book can be read straight through for systematic study or used as a handbook, jumping to chapters of interest via the table of contents to find answers.

Editor's review

很多 Java 性能书一翻开就是 GC 日志和 JVM 参数表,读者记住了一堆选项,却依然不知道线上那次接口变慢该从哪儿下手。这本书的价值恰在于把视角往上抬了一层:性能问题从来不只是虚拟机的问题,它同时是代码写法问题、并发设计问题、服务器与网络问题。 作者周明耀有投资银行和分布式计算的一线经验,所以书中案例不是教科书里的虚构场景,而是 12306 订票、电商大促这类在国内读者心里有画面感的系统。讲优化点时也常给出正反两段代码对比,让读者看到“为什么这样写更划算”,而不是只背结论。像用 Clone() 替代频繁 new、局部变量替代成员变量、有条件地使用 final 这类细节,都是日常写代码时随手就能用上的。 需要提醒的是,这本书写于 2016 年,部分工具与版本信息已经过时,读者在参考时需要结合当前的 JDK 版本与监控工具自行更新。它的最佳用法是配合自己的项目当“排查思路手册”读,而非当作可以逐字照抄的参数大全。

Who it's for

A good fit for

  • 有两三年 Java 开发经验、想系统补齐性能调优知识地图的工程师
  • 负责线上系统稳定性、经常处理接口变慢与内存问题的后端开发
  • 准备面试或技术评审,需要梳理 JVM、并发、代码优化要点的读者
  • 计算机专业高年级学生与培训学员,希望从代码层过渡到系统层理解性能

Not a good fit for

  • 完全没有 Java 基础、连线程与对象模型都不熟悉的纯新手
  • 只想找一份可直接套用的 JVM 参数模板的读者
  • 需要覆盖 JDK 11 以后新特性与云原生可观测性体系的读者

Reading tips

  1. 先通读第1章建立优化目标与衡量指标的概念,避免陷入盲目调参
  2. 第3章建议对照自己的代码库阅读,边读边改几个热点方法,效果最好
  3. 第6、7章可结合线上监控工具实操,用真实压测数据验证书中的结论
  4. 遇到与当前 JDK 版本不符的内容时,以官方文档和实测结果为准

About the publisher

Publishing House of Electronics Industry China · Founded in 1982

The Publishing House of Electronics Industry is a comprehensive publisher distinguished by its focus on electronic information and related fields. Judging from the more than 3,000 titles in its catalogue, its publishing covers programming and design, artificial intelligence, computer science, finance and economics, photography, and social sciences, attending both to cutting-edge technology and to general readers. Representative titles include Factor Investing: Methods and Practice, x86 Assembly Language: From Real Mode to Protected Mode, The RISC-V Reader, Artificial Intelligence: Speech Recognition, Understanding and Practice, Phased Array Radar Technology, Radar Target Characteristics, and 100 Go Mistakes and How to Avoid Them, most of which centre on technical methods and engineering practice. Its authors include Shi Chuan, Li Zhong, Wang Xiaobo, David Patterson, Andrew Waterman, and Yu Zihao, among others from China and abroad. Owing to limited public information, no further publishing features are elaborated here.

Contents

  1. Chapter 1 Overview of Performance Tuning Strategies
  2. 1.1 Why Tuning Is Needed
  3. 1.2 Reference Factors for Performance Optimization (Divergences in Traditional Computer Architecture, Computing Resources That Cause System Bottlenecks, Program Performance Metrics, Performance Optimization Goals, Performance Optimization Strategies)
  4. 1.3 Classification Methods for Performance Tuning (Business, Foundational Technology, Components, Architecture, Layers)
  5. 1.4 Chapter Summary
  6. Chapter 2 Preparatory Knowledge Before Optimization
  7. 2.1 Server Knowledge (Memory, GPU/CPU, Hard Disks, Network Architecture)
  8. 2.2 Emerging Technologies
  9. Chapter 3 Java API Call Optimization Suggestions
  10. 3.1 Object-Oriented and Primitive Types (Creating Objects with Clone(), Avoiding boolean Checks, Using Conditional Operators More, Static Methods Instead of Instance Methods, Conditional Use of final, Avoiding Unnecessary instanceof, Using Local Variables More, Bitwise Operations, One-Dimensional Arrays Instead of Two-Dimensional Arrays, etc.)
  11. Chapter 4 Program Design Optimization Suggestions
  12. Chapter 5 Java Parallel Program Optimization Suggestions
  13. Chapter 6 JVM Performance Testing and Monitoring
  14. Chapter 7 JVM Performance Tuning Suggestions
  15. Chapter 8 Other Optimization Suggestions

FAQ

这本书主要讲 JVM 调优吗?
不完全是。作者刻意避免只讲 JVM,全书从优化策略、硬件与服务器知识讲起,再依次覆盖 Java API 调用、程序设计、并行计算、JVM 监控与调优等,JVM 只占其中两章左右。
零基础能直接读这本书吗?
不太建议。书中的案例多基于真实项目场景,需要读者熟悉 Java 语法、多线程和基本的 JVM 概念,否则很容易只记住结论而无法理解取舍背后的原因。
2016 年出版的书现在还适用吗?
方法论层面的内容依然成立,比如先定位瓶颈再优化、代码层与并发层的取舍原则。但具体工具、JDK 版本特性与部分参数建议已过时,需要结合当前环境核对。
书中案例是真实项目吗?
书中大量使用 12306 订票系统、电商平台等国内读者熟悉的业务场景作为分析背景,并以代码对比形式展示优化前后的差异,偏重说明原理而非复述项目细节。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

About the author

周明耀 Author

Zhou Mingyao is an author about whom limited public information is available; the library currently holds only one work by him, Deep Understanding of the JVM & G1 GC. Judging from the subject of this representative book, the author focuses on the internal mechanisms of the Java Virtual Machine and garbage collection technology, a writing direction within programming and design that leans toward system-level and principle-oriented topics. The book centers on the JVM and the G1 garbage collector and addresses developers who wish to understand runtime behavior in depth, showing clear technical depth and a focused, topic-specific approach. Based on the available information, Zhou Mingyao's writing style tends toward analysis of underlying principles rather than broad introductory overviews, making the book suitable for readers with some foundation. Owing to limited materials, details of his life, professional background, and other works cannot be confirmed, and readers may understand his technical focus through the work itself.

More by the same author

Top rated in the same category