Skip to main content

JDK 6 on Windows XP performance improving across JVM restarts

1 reply [Last post]
Joined: 2004-11-10

I am seeing that the performance of my Java application improves over time, *even across JVM restarts*. I don't remember seeing this behavior with JDK 5. For example, I launched the JVM 100 times and I saw performance of my test improve fairly steadily each time the JVM started/shutdown.

Is JDK 6 doing some form of stateful/persistent optimization. The best reference I found was here:

But it did not mention this capability. I would like to better understand this behavior to gather predictable performance measurements.

Daniel Selman

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2005-07-11

We are not currently doing anything that survives from one run to the next.
It's quite typical to see natural variance from run to run due to thread
scheduling difference, incidential timing of GC and compilation events,
and due to cache effects, both processor $i and $d cache and file system
cache. That said, though, I wouldn't expect to see these effects to incrementally
improve over 100s of consecutive invocations. Maybe there's some level
of application data caching that's also at play here?

If you reboot your system and start your measurements anew, you'll likely
return to the initial level of performance, unless there's application level
data caching.