S
Steve Brecher
I have a Java number-crunching application -- it's run by Sun's Java VM.
The Java folks didn't seem to have any specific ideas on this problem, so I
come to you.
The problem is that the run time -- same input, same output -- varies a lot,
making benchmarking of code changes (potential optimizations) difficult. On
my test case with one version of my application, the run times varied
between 120 and 180 seconds over a couple of dozen trials, with a majority
of the time clustered in the upper 120s and mid 160s. There's nothing
indeterministic or random in my Java code.
This is on my main (desktop) system. Meanwhile, a version of the same
application written in C runs in constant time (+- 0.5%). And the Java
application runs in constant time on another XP system, my laptop. So the
variation in performance is specific to my desktop + Java. My laptop has a
significantly slower CPU, so I'd like to use my desktop for performance
testing.
I've examined the list of processes and tried to remove everything that
might be a culprit. I've gazed at Task Monitor and perfmon for a while to
no effect, but I don't have much experience with the latter. No other
applications are running. Disabling the LAN connection doesn't help. I
have Norton AntiVirus 2006 installed; disabling auto-protect doesn't help.
To recap, the problem is the *variation* in application run times.
What may I have overlooked?
The Java folks didn't seem to have any specific ideas on this problem, so I
come to you.
The problem is that the run time -- same input, same output -- varies a lot,
making benchmarking of code changes (potential optimizations) difficult. On
my test case with one version of my application, the run times varied
between 120 and 180 seconds over a couple of dozen trials, with a majority
of the time clustered in the upper 120s and mid 160s. There's nothing
indeterministic or random in my Java code.
This is on my main (desktop) system. Meanwhile, a version of the same
application written in C runs in constant time (+- 0.5%). And the Java
application runs in constant time on another XP system, my laptop. So the
variation in performance is specific to my desktop + Java. My laptop has a
significantly slower CPU, so I'd like to use my desktop for performance
testing.
I've examined the list of processes and tried to remove everything that
might be a culprit. I've gazed at Task Monitor and perfmon for a while to
no effect, but I don't have much experience with the latter. No other
applications are running. Disabling the LAN connection doesn't help. I
have Norton AntiVirus 2006 installed; disabling auto-protect doesn't help.
To recap, the problem is the *variation* in application run times.
What may I have overlooked?