10 of 12 people found the following review helpful
4.0 out of 5 stars
Good, but rather Oracle Centric, Nov 23 2011
By Shakespeare "amazon12892" - Published on Amazon.com
This review is from: Java Performance (Paperback)
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.
6 of 7 people found the following review helpful
5.0 out of 5 stars
Essential information hard-to-find anywhere else, Jan 11 2012
By The Last Person You'd Expect - Published on Amazon.com
This review is from: Java Performance (Paperback)
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.
3 of 3 people found the following review helpful
5.0 out of 5 stars
Must read for any Java programmer, Mar 14 2012
By ART SEDIGHI - Published on Amazon.com
This review is from: Java Performance (Paperback)
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.