Tuning Java applications

I am on an internal mail alias at Sun where there are regularly discussions on how customer X can get the best from their Java application.

Barely without exception, the reply from the people-who-know is to use some arcane option or combination of options to the Java VM.

Now, the thing that irritates me (and yes, this is a rant) is that whilst these options are no black magic, they are pretty close to it, and it relies on the application deployer to be able to convey their performance issue in the correct terms, and the right person-who-knows to interpret that and pass on the appropriate suggestion using -XXflag. My problem is that I don't think that this should be necessary. Why do these options exist at all, except in an experimental environment where testing is required to determine how to get the best from the VM ?

Sure, I appreciate that the JVM is a complex beast (particularly in the area of GC), and different configurations are required for a lightweight client as opposed to a heavyweight server app (this, after all, is why we have the "-server" and "-client" options.

What I think is required is a dynamic tuning mechanism which allows the JVM to monitor itself and then adjust its configuration based on a number of parameters such as throughput, number of incoming/outgoing connections, database activity, etc. This probably requires an application of AI, but given that there is a good profiling interface to the JVM, maybe it wouldn't be that difficult to do (for someone with a brain the size of a small planet).

Oh, and in case you think I'm just picking on Java, try figuring out what options to use to the C/C++ compilers to get the best performance out of your code, and you'll see a very similar problem. Gone are the days when "-O4" was all that was needed :(

I'd like to put addressing this voodoo to the top of my Christmas list so it makes it easier for me as a developer and for application deployment teams to get the best from their apps.

Or perhaps we just need faster CPUs and faster memory busses ?

Comments:

The J2SE 5.0 release is the first version with performance sizing/tuning built in (called the performance ergonomics feature). In general its a most size fits all for server class machines. This leaves the door open to even more self tuning in the future.

However think back to a pure engineering discipline like performance cars or even street cars. Most cars are not tuned to the best performance, the reason? to sustain longer engine life. For the experts who have the time and resources to do tuning then they will be the ones who get the best performance, for the rest, some don't care or it doesn't make a difference.

Posted by Calvin Austin on December 15, 2004 at 02:54 PM GMT #

Post a Comment:
Comments are closed for this entry.
About

tdw

Search

Top Tags
Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today