Superior GC possibilities?

A friend uncovered this link from IBM:

http://domino.research.ibm.com/comm/research_projects.nsf/pages/metronome.harmonicon.html

In it, there is a demonstration of a midi file played with normal garbage collection and with their “MetronomeGC” JVM. The timing in the latter is very smooth, quite acceptable for most MIDI music, it seems to me.

As the software they are selling is over $7000 (as far as I can tell), I’m wondering there have been other alternatives along these lines. Is it even possible to change GC operations from an Applet or from a application Jar? I guess I am having some conceptual problems. I’ve never tried to alter the GC settings before. Nor do I know if one can simply change some settings to get this sort of performance, or if a major rewrite is needed. Seems like they’re just doing more frequent, but smaller grained GC, which could possibly be managed by changing some settings.

You can certain set a different GC for applets (a few) and applications (all of the GCs included in the JRE). There are actually really good ones, and you really have to try which one works best for you. Just keep in mind that the more advanced GC normally have a lot shorter pauses, but have more overall time spent in garbage collection.

-XX:NewRatio=16
-XX:+UseConcMarkSweepGC

With these parameters I get >5-8 collections per second of about ~3ms, in a small game producing rediculous amounts of garbage (by shooting bullets, explosions that mainly exist of thousands of individual pixels, where each pixel is a TransformNode in a scenegraph with Matrix4 instances for local and global transformations… etc etc) and giving each explosion it’s own sound source.

Smooth.

I haven’t tried GarbageFirst yet.

Riven, are you saying that you can set them using param tags or suchlike, or do you have to go into jcontrol?

You can set a few (useless ones) with the tag.

The one I just mentioned cannot be passed to an applet. You’d have to make a (signed) kicker applet that creates a new Java process.

How is this done? ???

I did a quick look at my two volume Core Java book and there is nothing about changing settings on the Garbage Collector.

I looked at the Java Tutorials, did a search on Garbage Collector and got the usual stuff about how it does its thing automatically, but nothing on how to change settings. There was an interesting section called VMX, an area that I haven’t explored in Java yet that might have something to do with this.

A signed kicker applet?? So, you are going in and tweaking the client’s JVM prior to running your program? I am quite mystified as how this might be done.

See this:

http://download.oracle.com/javase/6/docs/api/java/lang/Runtime.html#exec(java.lang.String)