Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Virtual Machine / January 2005

Tip: Looking for answers? Try searching our database.

Dynamic Optimization

Thread view: 
Adam Preble - 20 Jan 2005 16:15 GMT
Some of you may have noticed JVM vendors are starting to work on dynamic
optimization.  This means that your code could be recompiled many
times, based on how much it runs, and using data on how it is being run.
 This throws off benchmarks that don't anticipate this--if the
benchmark finishes before the JVM can seriously catch up, then the
scores won't make much sense.  To counter this, the JVM can be "trained"
by running the test code a few times before actually testing it.

I don't think many people have thought about how this kind of thing will
affect programming.  I'm curious if anybody here has studied it a little
 and is aware of it.  Furthermore, if anybody knows any microbenchmarks
that take dynamic optimization into consideration, I'd love to know.
Ian Rogers - 20 Jan 2005 17:18 GMT
There's an MSc thesis titled "Jikes RVM Adaptive Optimization System
with Intelligent Algorithms" available at
http://www.cs.man.ac.uk/apt/projects/jamaica/index.html#Publications
which considers the use of genetic and random mutation hill climbing
algorithms to evolve optimisation plans within the JikesRVM JVM. The
point being, that rather than basing dynamic compilation behaviour on
the average benchmark case, the behaviour can be tuned to dynamically
fit the benchmark currently running. The results show an overall
improvement in benchmark performance.

Ian Rogers

> Some of you may have noticed JVM vendors are starting to work on dynamic
> optimization.  This means that your code could be recompiled many times,
[quoted text clipped - 8 lines]
>  and is aware of it.  Furthermore, if anybody knows any microbenchmarks
> that take dynamic optimization into consideration, I'd love to know.
Adam Preble - 21 Jan 2005 05:06 GMT
This is close to what I was thinking about.  I'll be browsing those
papers in general.  You seem to have suggested a case where the JVM fits
the benchmark, not the benchmark fits the JVM.  I suppose that's
ultimately what is supposed to happen.  What I'm seeing now, however,
are microbenchmarks that are written without considering dynamic
optimization.  Oftentimes, the test run so quickly that the JVM cannot
catch up.  If it runs for awhile, it may be that the method never
finishes, which means the dynamic optimizer never gets a change to issue
a recompile of the code.

> There's an MSc thesis titled "Jikes RVM Adaptive Optimization System
> with Intelligent Algorithms" available at
[quoted text clipped - 22 lines]
>> microbenchmarks that take dynamic optimization into consideration, I'd
>> love to know.
Ian Rogers - 21 Jan 2005 10:15 GMT
If optimizing the micro benchmark will take longer than actually running
the micro benchmark, then no optimization should be performed. The aim
of the adaptive compilation system is minimize the overall runtime of a
program. Sometimes the best thing to do for a method is to optimise it
at the highest level, other times the system can save time by just
interpreting the method. The speed up over interpreting vs the time
spent compiling is approximately an exponential function, and this is
why simple JIT compilers do such a great job.

If you are using the HotSpot JVM you can specify the -server flag to
make it favor optimization slightly more. You can also write harnesses
around the micro benchmarks so that they run for longer.

Ian Rogers

> This is close to what I was thinking about.  I'll be browsing those
> papers in general.  You seem to have suggested a case where the JVM fits
[quoted text clipped - 32 lines]
>>> microbenchmarks that take dynamic optimization into consideration,
>>> I'd love to know.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.