Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Superior GC possibilities?  (Read 2026 times)
0 Members and 1 Guest are viewing this topic.
Offline philfrei
« Posted 2011-03-08 23:21:55 »

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.

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Online Riven
« League of Dukes »

JGO Overlord


Medals: 438
Projects: 4


Hand over your head.


« Reply #1 - Posted 2011-03-08 23:51:22 »

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.

1  
2  
-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.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline pjt33
« Reply #2 - Posted 2011-03-08 23:59:53 »

Riven, are you saying that you can set them using param tags or suchlike, or do you have to go into jcontrol?
Games published by our own members! Check 'em out!
Play the free demo of Revenge of the Titans!
Online Riven
« League of Dukes »

JGO Overlord


Medals: 438
Projects: 4


Hand over your head.


« Reply #3 - Posted 2011-03-09 00:03:13 »

You can set a few (useless ones) with the <param> 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.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline philfrei
« Reply #4 - Posted 2011-03-09 04:55:45 »

How is this done?  Huh

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.

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Offline CommanderKeith
« Reply #5 - Posted 2011-03-09 05:32:51 »

See this:

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

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (67 views)
2013-05-17 21:29:12

alaslipknot (76 views)
2013-05-16 21:24:48

gouessej (109 views)
2013-05-16 00:53:38

gouessej (104 views)
2013-05-16 00:17:58

theagentd (115 views)
2013-05-15 15:01:13

theagentd (104 views)
2013-05-15 15:00:54

StreetDoggy (149 views)
2013-05-14 15:56:26

kutucuk (172 views)
2013-05-12 17:10:36

kutucuk (170 views)
2013-05-12 15:36:09

UnluckyDevil (179 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.098 seconds with 20 queries.