Java Performance
Format: PaperbackChange
Price:$48.56+Free shipping with Amazon Prime
Your rating(Clear)Rate this item


There was a problem filtering reviews right now. Please try again later.

27 of 29 people found the following review helpful
on January 11, 2012
This is an outstanding book and one of the few that, even after working through, I'll be keeping within reach at my desk. After almost a decade working on the JVM, I've only recently begun work on some software that really strains our systems, processing a million and some records a day with several instances each on multiple threads, and so until recently, performance has always been a secondary concern. While the app's code is certainly not perfect, I started wondering whether any of the mysterious extended options available to the JVM might take some of the weight off the system without having to wait until the next formal development/release cycle. This is what prompted me to look at this book, but as I'll describe, I found much more.

I was very impressed with the amount of information provided: unlike most computer-related books, this is dense with text, rather than long code samples, screenshots and diagrams. Why is this a good thing? This is not just a book on how to use the JVM and its related performance tools, but also a book on the JVM's internal architecture (including its memory model and garbage collectors) and on the art of benchmarking and performance testing. Though the prose can be dry, the authors are very patient about describing these topics to readers in a clear way, and sometimes with great detail. OTOH, as this is written with experienced developers in mind, beware that it can at times be challenging (even for someone who's done their fair share of coding!).

There are a few major areas covered:

1) Tuning the JVM. This usually involves applying command-line options to the JVM executable (I can almost guarantee you'll discover you have more control over the JVM than you thought you did!) The authors cover the JVM internal architecture, garbage collection and memory model to provide context on what these options actually do, as well as extensive descriptions of how and when to use the options.

2) Performance monitoring tools, profiling, heap-dump analysis. Much of the book is devoted to describing not only the tools available in the JDK, but those provided by popular OSes and 3rd parties.

3) Writing benchmarks. There is more an art to this than you might expect, especially when writing benchmarks for the JVM. Tips on benchmarking different types of applications (i.e. webapps, web services) are separated into different chapters.

The biggest downside, as another reviewer pointed out, is it's 'oracle-centricity'. For example, you'll find much said on Netbeans and Glassfish, while Eclipse and Tomcat don't get a single mention. These are tools that we all know about, but what great, more obscure, tools am I missing out on due to this obvious bias? This seriously damages the credibility of the authors as far as tool-selection is concerned, but in the end, it's the JVM and the performance testing concepts that are most important. Once I learn the vocabulary, I'll be able to figure out through Google which tools are best.
11 commentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
16 of 18 people found the following review helpful
on November 23, 2011
The last book to cover this topic n any detail was Steve Wilson et al's "Java Platform Performance", which was published in 2000. HotSpot has moved on a fair bit since then, so its good to see a new book covering the subject.

The sections on JVM tuning and profiling are particularly strong. There's also a decent section on HotSpot Garbage Collectors, though I would have liked to see some more discussion on alternative GC algorithms such as IBM's Balanced Garbage Collector and Azul's C4.

It should be noted that there is a definite bias towards Oracle's tools and hardware. For example the section on "Choosing the Right CPU architecture" concentrated mainly on Oracle's SPARC chips. Also the two profilers featured are the Oracle Solaris Studio Performance Analysiser Tool, and the NetBeans profiler. Likewise in the Java EE Section all the examples are based on Glassfish.

The book doesn't provide a recipe for solving every problem, but does provide enough information for non-performance specialist developers and others involved in application performance tuning work, to solve the majority of commonly encountered performance problems.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
7 of 8 people found the following review helpful
on March 14, 2012
The authors have spent an enormous amount of time and effort putting together a comprehensive and very thorough book on Java internals. I have read a similar book on C++ called the C++ Object Model, and have been waiting for a Java equivalent for years.

The book starts with the "basics" - which is considered advanced by many other texts, and covers system monitoring. Think of an entire book on system monitoring summarized in one chapter. You will know everything you need to know as a programmer about how to monitor and detect issues with your environment. The fun starts in chapter 3 with an overview of JVM and the VM's internals - including basics of memory management, process management, thread management, etc. Different types of Garbage collectors are then covered in detail; how they work, how objects are cleaned up, how objects are promoted, etc. By the end of this chapter, you will know GC. There is more, much more, but chapter 3 is a definite favorite.

There are many causes of application's performance issues, the authors spend chapter 6 on how to profile an application and how to actually detect whether GC is the issue. It could be IO, or your choice of a bad data structure, etc. The point is, there are options available to you as a programmer and you will know how to at least check if not fix the major and most common performance issues.

After the application, it is time for tuning the JVM. The Java VM has added many bells and whistles over the years to help you tune how it behaves under certain scenarios. These options are explained, and examples are shown to aid you with the learning process.

With the growth and penetration of multi-threaded applications mostly due to multicore systems, your know-how will be helpful in benchmarking and detecting performance issues. Examples are depicted throughout the chapter to show the output from tuning and changing options.

The following couple of chapters are dedicated to java web applications including SOA, EJB, and general Web services. A section called "Factors that Affect Web Service Performance" goes into great detail, and covers the topic extremely well.

The summary of all the JVM commands end the book - each with fairly detailed explanation.

You cannot call yourself a Java "expert" unless you have read this book cover-to-cover. In fact, if the terms Eden Space, survivor space, minor GC, Full GC, Concurrent GC and many more until now obscure terms make you scratch your head, you need to read this book.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
10 of 12 people found the following review helpful
on April 9, 2013
I read somebody recommend this book and compare with Effective Java and Java Concurrency in Practice, so I started to read it. I am into chapter 3 now and found it is definitely NOT in the same tier with other two. The writing quality (especially in terms of being coherent to a theme, and explaining well what needs to be explained) is far inferior. It is still a book worth reading, but not as valuable as a classic.
11 commentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
14 of 19 people found the following review helpful
on January 19, 2013
This book is essentially a compilation of all internal product documentations and freely available online tutorials without good examples to corroborate the theories presented throughout the book. It discusses JVM tuning as an infinite set of variables, which look more like infinite variety and challenges to the reader than anything concrete and useful. It is an "okay" book if you just want to "read" about Java performance, but if you have a real project and a real Java performance issue to deal with, you'll have to try out all the permutations and find out yourself which ones are helpful and which ones are not - only if you have infinite amount of time to do so. In reality, sometimes we just want to get a Java performance issue resolved as quickly as possible so that we can move on to the next task on our busy agenda. This book has clearly failed to meet the basic criterion of being data-driven to be a practical, useful guide to helping readers resolve their Java performance issues they encounter with their projects. I hope the lead author can help improve it if he gets a chance to update this book in future.
33 commentsWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
3 of 4 people found the following review helpful
on January 25, 2012
Java Performance offers great information in regards to using the tools that come with a typical JDK download (jconsole and vmvisualizer) as well as Oracle/Sun based Java Profiling products. The level of detail and information provided as it relates to the architecture of the JVM, setting Java command line options, and benchmarking applications (JSE and JEE including EJB) is outstanding. I would suggest this book for an Java Developer and/or Architect looking to learn more about performance testing and tuning. The only knock I have on this book (and it is a small one at that) is they talk exclusively about Oracle Solaris Performance Analyzer as the tool they use to handle the code profiling. Which is fine, but it would have been nice to get a bit more than a sentence or two mentioning a couple of Windows based alternatives (Solaris Performance Analyzer only runs in *nix environments). A few lines about JProbe, JProfiler, etc. would have helped. But beyond that, this book is packed with tons of useful information that has helped me greatly understand the performance tuning, profiling, and benchmarking processes. If you are serious about wanting to improve the performance of your Java Applications, then this book is what you need whether you are a seasoned pro or just starting to understand the importance of performance testing.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
3 of 4 people found the following review helpful
on February 2, 2012
If you have the need to fine tune your java application / VM then look no further. This book covers in great detail how to look for problem areas in a variety of environments. The perspective that the authors have taken is varied. They teach you to measure performance at different levels - OS / Application / VM etc and also teach you to benchmark code. You also get a quick look at high level JVM architecture.

The chapters on GC and benchmarking were interesting and added some insight into those areas. I also enjoyed the introduction of tools/plugins which I previously did not know existed. For example I never knew that java JIT compiler activity can be monitored through a tool. Most tools work across operating systems like Windows / Linux and Solaris.

The only downside that I found while reading this book is that there are plugs to Sun/Oracle products peppered throughout the book. For example references to Solaris / Glassfish / Oracle Solaris studio / Netbeans etc. But since this is part of the java series I guess that is to be expected. I would recommend this book to a colleague.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
5 of 7 people found the following review helpful
on November 11, 2011
This book is for everybody who wants to know how java is as fast these days as it is and how to get the most out of the virtual machine. It contains detailed explanation on the HotSpot JIT compiler, describes all the garbage collectors and gives many helpful tips. Among these tips are explanations for many of the -XX: tuning parameters for the 1.6 JVM.

A full chapter is dedicated to explain how to analyse your memoryallocations, with detailed explanation on the use of jvisualvm / visualgc.

It furthermore describes pitfalls and best practices on the creation of (micro-)benchmarks.

To me, it seems an unmissable book for every performance oriented java developer.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
2 of 3 people found the following review helpful
on March 14, 2012
[...]

My Rating: 5 out of 5 stars. (Strong Buy)

Why you need to buy this book?
1) There is no other strong book on Java Performance in the market.
2) Written by experts who deal with improving the performance of the Hotspot Java VM, on a daily basis.
3) Extensive description on the internals of the Hotspot JVM. Previously the JVM was a blackbox that would run your Java applications. This book will lay out the JVM as an open book. So you have an opportunity to master the JVM.
4) It is from Addison Wesley who publish GREAT books.

My Favorite Chapters:
Chapter 3: JVM Overview.
Chapter 4: JVM Performance Monitoring
Chapter 5: Tuning the JVM, Step by Step

Review:
I have had this book for a month now. But I have not read it completely. The reason is that this is an advanced topic. The book goes into deep lengths to describe the Hotspot JVM concepts that you have to tread very slowly. I mean very very slowly.

My approach has been to go to the chapters which I am interested in. Then go back to the chapters that give background information. I strongly recommend that you keep this book close to your work area, because you will require it often, to not only brush up on your reading but also to use it as a reference, when you tune your Java applications. BUT THIS BOOK IS A DEFINITE MUST FOR YOUR COLLECTION.

Let us go chapter by chapter on the ones I have read.

Chapter 2: Operating System Performance Monitoring
I particularly liked the treatment on "monitoring CPU utilization" on various operating systems (windows, linux etc).
There is a lot of information on Memory Usage Monitoring, Disk IO Monitoring that a performance engineer will definitely need.

Chapter 3: JVM Overview
This is a brilliantly written chapter.
Right at the start, the authors state that the users of Java technology see the JVM as a blackbox. My opinion : Well, this is the irony or fact or destiny or whatever. Java Performance has been voodoo over the years. Extensive documentation (that is not confusing) along with reasonable JVM defaults, is the way to go.

The chapter does very well to talk about the ordinary object pointers (OOPS) and the new JDK6+ feature called "compressed oops" to get 32bit like performance on 64bit JVMs. The gist is that compressed oops feature will improve the cpu cache utilization.

The chapter goes into great length to talk about class loading, internal VM architecture etc. A very very good chapter. Read the section on Garbage collection. There is great discussion on the generations as well as on collectors etc.

Chapter 7: Tuning the JVM step by step

This chapter is just a beauty. There is around 70 pages devoted to this chapter. So much content just for JVM tuning. Probably, this topic requires a 1000 pages. But the authors have done the JVM tuning as part of their jobs. So they have condensed the topic in to 70 pages based on their years of experience.

I will update this review as I finish reading the other chapters. I can grumble that the book is very intense but it is a happy grumbling.

Final Commentary:
I have attended talks by Charlie Hunt over the years. Charlie is extremely knowledgeable and is very passionate about the JVM. No wonder, he has turned up a gem of a book.

Anil Saldhana
- JBoss Community
- Chicago Java Users Group.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
6 of 9 people found the following review helpful
VINE VOICEon November 29, 2011
Being new to Java I am interested in finding out the low level nettigritty details of the Java HotSpot VM. This book was definitely the right choice for that.

I must admit being a veteran .NET developer helped when digging into the different concepts and there are a ton of them. One of the things I really liked about the book is that although it leaned towards Oracle, it also included Windows and Solaris.

There are 12 chapters. Chapter 1: Strategies, Approaches, and Methodologies, Chapter 2: Operating System Performance Monitoring, Chapter 3: JVM Overview, Chapter 4: JVM Performance Monitoring, Chapter 5: Java Application Profiling, Chapter 6: Java Application Profiling Tips and Tricks, Chapter 7: Tuning the JVM, Step by Step, Chapter 8: Benchmarking Java Applications, Chapter 9: Benchmarking Multitiered Applications, Chapter 10: Web Application Performance, Chapter 11: Web Services Performance, and Chapter 12: Java Persistence and Enterprise Java Beans Performance.

The book ends with two great appendices. HotSpot VM Command Line Options of Interest and Profiling Tips and Tricks Example Source Code.

The authors do a great job of introducing a lot of different tools as well as the useful commands lines needed for performance monitoring, profiling, and tuning. Although there are a few that only work on Solaris and Linux the author provides alternatives for Windows and Mac users where possible. They do a great job introducing VisualVM and NetBeans Profiler. The coverage of Adaptive Tuning and Garbage Collection in these sections was really great.

The chapters on Benchmarking are great. This is often an overlooked process. It is really important to have proper benchmarks in place so when performance issues creep up you have a baseline to narrow the problem down with. I have seen plenty of enterprises without them and when performance issues come up they are looking for a needle in a haystack... in the dark.

The web application and web service chapters are also packed with great advice. Although Glassfish is used a lot of the advice applies to most application servers.

I really like Appendix A: HotSpot VM Command Line Options of Interest. It contains a really nice list of the HotSpot command lines options that are related to performance.

My one gripe is that Appendix B contains some really nice code examples, but it does not appear there are any plans to make the code available for download.

I found the authors writing style made the book a really easy read especially for such low level complex topics.

All in all if you have anything to do with Java development this book has got to be on your shelf.
22 commentsWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Send us feedback

How can we make Amazon Customer Reviews better for you?
Let us know here.