GetJava Download Button XML Feed
All | About | Flying | General | Java | Solaris 10
20070821 Tuesday August 21, 2007

Tiered compilation update

Its been a while since I've gotten around to blogging and much longer since I've talked  about the state of tiered compilation. Just a quick note about what's been happening. Almost nothing. 

The only significant that has happened is that I've putback a fix to the jvm that will prevent the uncommon trap loops that for whatever reason seem to plage the jvm when tiered compilation is enabled. This fix should appear in B19 which should be built this week and will appears sometime later. This removes a large performance pothole that tiered  has suffered with. Generally if you've been having this problem then you will typically see your app run at interpreter speed or worse. In the past you could sometimes work around this by tuning the compile thresholds but not always. Hopefully this issue is pretty much dead.

Unfortunately tiered still has performance and tuning issues. I recently looked at some logs from someone that is using tiered and not seeing the results we'd like. At some compilation thresholds they are seeing the uncommon trap loop problem but at other levels that problem is gone but they see worse performance than just using client.

Their app seems to be my worst nightmare. The app seems to be composed of lots of methods that are mostly lukewarm and not many that are significantly hot. By messing with thresholds they may be able to get better behavior but I'm not optimistic.

This has convinced me that the techniques I'm using for controlling the tiered jvm are fatally flawed. They will never be able to do the correct thing for a variety of apps with out very careful and tricky tuning by the user. That just isn't going to make it. So I've been thinking about a new strategy and I've been working on protyping it. If this prototype shows promise then I'll be blogging about it in the near future.

Aug 21 2007, 11:32:32 AM EDT Permalink

Comments:

Are external storage of profiling information and caching of native executables being considered? Thanks for keeping us posted.

Posted by Curt Cox on August 21, 2007 at 01:03 PM EDT #

They've been considered for quite some time. Given the resources we (Sun) has they are very unlikely to appear in JDK7. Internally there have been experiments with code caching and while they do improve startup it isn't nearly as dramatic as some might expect or hope. That said for the customer that I was examining their logs code caching would answer their prayers. Proper behavior from tiered would also be an answer for them.

Posted by fatcatair on August 21, 2007 at 01:45 PM EDT #

I'm against persistent code caching for security and robustness reasons, though I'm happy to be convinced otherwise, but inter-run performance stats (ie meta-data) retention would still be high on my wishlist...

Sorry to hear that the tiered stuff has gotten into a rut: I was just going to start making enquiries. I'll try to give it a whirl after B19.

Rgds

Damon

Posted by Damon Hart-Davis on August 22, 2007 at 06:03 AM EDT #

And of course it's not to be diminished/forgotten that you've made the thing work at all, ie welded together the evil C1 and C2 twins. So now you're just on what I call "tuning"!

I'm still happy that you've taken it this far...

Rgds

Damon

Posted by Damon Hart-Davis on August 22, 2007 at 06:22 AM EDT #

I use tiered compilation since, i think, a month with eclipse,
and no crash during this period.

In term of performance, eclipse doesn't seem to be faster when you start it
or when you run it (by default it use client VM),
but some specific operations like a full rebuild are significantly faster.

Posted by Rémi Forax on August 22, 2007 at 03:11 PM EDT #

I'm dissapointed to hear that Tiered is not working as well as hoped. I really dont want to have to manually tune compile thresholds for each application. Please keep us updated with how this new strategy goes.

Posted by Ben Loud on September 10, 2007 at 11:24 PM EDT #

Post a Comment:

Comments are closed for this entry.