Johan's blog
Java and performance
Last week, I attended the PhD defense of Dries Buytaert , creative cohort and Drupal founder (in that order). I had the pleasure to be in his thesis committee, and that allowed me to ask some nasty questions. I was in good company, with James Gosling and Michael Hind being members of that thesis committee too.
The topic of the dissertation is "Profiling Techniques for Performance Analysis and Optimization of Java Applications". I have the impression that this subject receives less attention than it would have received 10 years ago. In the beginning days of Java, the major complain was that "Java is sooo slow". Today, the Java platform and the hardware have evolved in such a way that it is now possible to write Java programs that allow for a very fast runtime execution. However, this does not mean that performance is no issue anymore. At the contrary, I see enough reasons why performance is still important:
- there are a number of devices out there, ready to be Java-powered, but with less resources than daily PC's and servers.
- performance problems are in some cases related to logical/algorithmic problems. Not solving the performance issue (or solving it by adding hardware) does not eliminate the side problems
- customers are getting more and more demanding
- low performance == high energy
- ...
In the public presentation of his PhD defense, Dries compared the performance of a Java program with the consumption of energy/electricity in a household. People don't want to consume too much energy, and they want to know when they are consuming too much, and how this can be optimized. A very good analogy today, where more and more attention is paid to optimizing energy,
Dries deals in his work mainly with 3 procedures for measuring and/or optimizing the performance behavior of Java programs. Especially the third method, where Hardware Performance Monitors are used, is very promising - at least in certain environments where startup cost is important and execution time is rather short.
An important personal remark, however, is that avoiding performance problems is even better than solving them at runtime. Therefore, I am personally more interested in the measurement of performance, rather than in the capability of the runtime environment to optimize the performance. There are enough techniques that allow one to degrade the performance of a Java application. When developing a program, the developer does not necessarily knows how his program will be used in practice. If the first use of a program is monitored (e.g. using Javana, one of the 3 procedure Dries describes), the developer can use that feedback to determine where potential performance gains can be achieved.
It was an excellent PhD defense. Congratulations to Dries, and I hope he will keep on using his ideas for helping the Java community.
