I have a JAVA process that runs every day and takes about 1,000 or 2,000 hits before it is fully optimized by the JIT. What I'd like to do is save the JIT info so that the next day it can start in an optimized state. It seems like this should be possible, but I have not been able to find any method for doing so.
views:
156answers:
2
+2
A:
You could use an ahead-of-time compiler like JET or GCJ, but I don't believe there's any standard way to save the JIT form. Keep in mind that this ties your program into the architecture you're running on, but it sounds like you're aware and accepting of this.
Jon
2010-02-01 17:25:35
Some more info from http://www.javalobby.org/forums/thread.jspa?threadID=15812: Apparently the current research shows that loading the cached JIT is slower than recompiling it in most cases, but that you may want to give JRockit a try.
Jon
2010-02-01 17:27:39
that thread is 6 years old - i'm not sure it qualifies as "current" research" :)
Peter Recore
2010-02-01 17:41:21
You make an excellent point that I should have noticed (or checked). I'm still just reeling from that Bush-Kerry race.
Jon
2010-02-01 17:51:01
on the other hand, it is possible the research hasn't changed at all since then! processors are still a lot faster than disks (if anything, they are even more faster than disks than they were before, unless you are lucky enough to be running a solid state disk in your servers.)
Peter Recore
2010-02-01 18:00:01
A:
Can you just keep your app running? What happens if you just have your app sleep until the next day rather than shutting down? You will then save time starting up the JVM as well as potentially skipping the jitting phase.
Peter Recore
2010-02-01 17:41:58
this is attractive, but i don't have that level of control over the enterprise decisions.
Zip
2010-02-01 17:44:51