Forgot your password?

typodupeerror
Books

Book Review: Java Performance->

Submitted by
jkauzlar
jkauzlar writes "The standard Oracle JVM has about sixty 'developer' (-XX) options which are directly related to performance monitoring or tuning. With names such as 'UseMPSS' or 'AllocatePrefetchStyle', it's clear that Joe Schmo Code Monkey was not meant to be touching them, at least until he/she learned how the forbidding inner recesses of the JVM work, particularly the garbage collectors and 'just-in-time' compiler. This dense, 600-page book will not only explain these developer options and the underlying JVM technology, but discusses performance, profiling, benchmarking and related tools in surprising breadth and detail. Not all developers will gain from this knowledge and a few will surrender to the book's side-effect of being an insomnia treatment, but for those responsible for maintaining production software, this will be essential reading and a useful long-term reference.

In my experience, performance tuning is not something that is given much consideration until a production program blows up and everyone is running around in circles with sirens blaring and red lights flashing. You shouldn't need a crisis however before worrying about slow responsiveness or long pauses while the JVM collects garbage at inconvenient times. If there's an opportunity to make something better, if only by five percent, you should take it, and the first step is to be aware of what those opportunities might be.

First off, here's a summary of the different themes covered:

The JVM technology: Chapter 3 in particular is dedicated to explaining, in gory detail, the internal design of the JVM, including the Just-In-Time Compiler and garbage collectors. Being requisite knowledge for anyone hoping to make any use of the rest of the book, especially the JVM tuning options, a reader would hope for this to be explained well, and it is.

JVM Tuning: Now that you know something about compilation and garbage collection, it's time to learn what control you actually have over these internals. As mentioned earlier, there are sixty developer options, as well as several standard options, at your disposal. The authors describe these throughout sections of the book, but summarize each in the first appendix.

Tools: The authors discuss tools useful for monitoring the JVM process at the OS level, tools for monitoring the internals of the JVM, profiling, and heap-dump analysis. When discussing OS tools, they're good about being vendor-neutral and cover Linux as well as Solaris and Windows. When discussing Java-specific tools, they tend to have bias toward Oracle products, opting, for example, to describe NetBean's profiler without mentioning Eclipse's. This is a minor complaint.

Benchmarking: But what good would knowledge of tuning and tools be without being able to set appropriate performance expectations. A good chunk of the text is devoted to lessons on the art of writing benchmarks for the JVM and for an assortment of application types.

Written by two engineers for Oracle's Java performance team (one former and one current), this book is as close to being the de facto document on the topic as you can get and there's not likely to be any detail related to JVM performance that these two men don't already know about.

Unlike most computer books, there's a lot of actual discussion in Java Performance, as opposed to just documentation of features. In other words, there are pages upon pages of imposing text, indicating that you actually need to sit down and read it instead of casually flipping to the parts you need at the moment. The subject matter is dry, and the authors thankfully don't try to disguise this with bad humor or speak down to the reader. In fact, it can be a difficult read at times, but intermediate to advanced developers will pick up on it quickly.

What are the book's shortcomings?

Lack of real-world case studies: Contrived examples are provided here and there, but I'm really, seriously curious to know what the authors, with probably two decades between them consulting on Java performance issues, have accomplished with the outlined techniques. Benchmarking and performance testing can be expensive processes and the main question I'm left with is whether it's actually worth it. The alternatives to performance tuning, which I'm more comfortable with, are rewriting the code or making environmental changes (usually hardware).

3rd Party tool recommendations: The authors have evidently made the decision not to try to wade through the copious choices we have for performance monitoring, profiling, etc, with few exceptions. That's understandable, because 1) they need to keep the number of pages within reasonable limits, and 2) there's a good chance they'll leave out a worthwhile product and have to apologize, or that better products will come along. From my point of view, however, these are still choices I have to make as a developer and it'd be nice to have the information with the text as I'm reading.

As you can see, the problems I have with the book are what is missing from it and not with what's already in there. It's really a fantastic resource and I can't say much more than that the material is extremely important and that if you're looking to improve your understanding of the material, this is the book to get."

Link to Original Source

Comment: Re:The power of privacy (Score 1) 720

by jkauzlar (#38916621) Attached to: Do You Like Online Privacy? You May Be a Terrorist

It wouldn't shock me to find out that a person using anonymous proxies, VPNs, encryption, blah blah, is up to no good, but that's not the real issue here. Why are they jumping to the conclusion that these nerds are terrorists?

A terrorist is someone who performs indiscriminate mass violence to make populations afraid, for political reasons. A hacker is NOT a terrorist. Why do they call them terrorists? So they can treat them as enemy combatants, hold them indefinitely in custody (or kill them) without a trial. Same thing with that dotcom/megaupload guy. They destroyed his business without even going through the courts. This is literally part of a suprisingly successful movement to bypass due process when dealing with anyone that threatens big money. We should really be concerned by the gov'ts use of this word.

Comment: Re:Great rationalization there (Score 1) 386

by jkauzlar (#38916405) Attached to: In Xhengzhou, Thousands Vie For Foxconn Jobs
I agree. It also says a lot that liberal economists like Paul Krugman support the 'sweatshops.' It brings millions of dollars to impoverished local economies and will slowly improve the standard of living for everyone there. On the other hand, the turnover at Foxconn is ridiculous. I can't find a precise number, but it's somewhere between 5% and 40% monthly. With something like 400,000 workers, that's at least 20,000 a month! This tells me two things: 1) it's not necessarily slave labor if they can leave at will. 2) Foxconn might eventually find it more profitable to improve standards to retain their labor.

Comment: Re:Tolkien's prose (Score 1) 505

by jkauzlar (#38655690) Attached to: JRR Tolkien Denied Nobel Due To Low Quality Prose

That's one of the major criticisms I've heard, that it's too episodic. I've also noticed he uses 'ex deus machina' too often: there's the big battle in Two Towers (Minas Tirith?) that goes on forever, but when everything looks hopeless, the Ents storm in and save the day. That happened again in the third book with the spirits that Aragorn (if I remember correctly) summons. You can probably find more examples.

That said, I think they're great books and probably the best feat of world-building in the history of fantasy writing, afaik. They're incredibly rich and detailed in this regard, and that, in my mind, is what makes them fun to read.

Comment: Re:"Pure evil" (Score 1) 164

by jkauzlar (#38507300) Attached to: Israeli Spyware Sold To Iran

Your making the fallacy that ALL muslims think like that. Right-wing muslims, christians and jews are all the same, and they all spread fear and hatred toward the other religions because it helps them make money and keep power. Right now, a Muslim and a Jew are both writing the same thing you just wrote but with some religion names switched around, because they have the same money and power controlled media as we do and the same asses that believe every dumb simplification that gets repeated on that media.

BTW:

They are the new nazi's.

Godwin's law. You lose.

Comment: Re:spin. (Score 0) 523

by jkauzlar (#38129334) Attached to: Bradley Manning's Court Date Finally Set

As a Manning supporter, I agree that in all fairness he should be punished if found guilty, but the punishment he's endured so far is beyond the law as we know it, and I should hope it's given it's day in court as well. And you're right that it's ridiculous to contend that he did nothing illegal. There's no way around that. However, the issue, for me, is whether what he did was for the greater good. I happen to believe that it was.

Also, we here on slashdot know a collective thing or two about security. Security by intimidation is not good security. If the information was THAT secret, it should've been more secure. We blame website developers for creating potential SQL injection attacks, but we don't blame the gov't for allowing what they believe to be top-secret information to be retrieved and disseminated so easily?

Comment: Re:spin. (Score 3, Interesting) 523

by jkauzlar (#38128852) Attached to: Bradley Manning's Court Date Finally Set

I wonder if the treatment he received in prison will play into the trial at all? I agree he should of course be punished, as the law is the law, but let's not forget these leaks were a catalyst for the Tunisian uprising, which lead to the revolts in Egypt and Libya, which is leading to the ongoing riots in Syria, etc. Some would argue the Arab Spring was furthermore a catalyst for OWS and the earlier protests in Wisconsin.

Of course, by the looks of it, he leaked everything he could get his hands on and so had no particular motive in mind except to undermine the classification system, but wittingly or not, the man's a hero. I wish him the best of luck.

"Today, of course, it is considered very poor taste to use the F-word except in major motion pictures." -- Dave Barry, "$#$%#^%!^%&@%@!"

Working...