Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (526)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
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 2410 times)
0 Members and 1 Guest are viewing this topic.
Offline philfrei
« Posted 2011-03-08 22: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.

"It's after the end of the world! Don't you know that yet?"
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 833
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1 - Posted 2011-03-08 22: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
Offline pjt33
« Reply #2 - Posted 2011-03-08 22: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!
Legends of Yore - The Casual Retro Roguelike
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 833
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #3 - Posted 2011-03-08 23: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
Offline philfrei
« Reply #4 - Posted 2011-03-09 03: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.

"It's after the end of the world! Don't you know that yet?"
Offline CommanderKeith
« Reply #5 - Posted 2011-03-09 04: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.

 

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

The first screenshot will be displayed as a thumbnail.

toopeicgaming1999 (72 views)
2014-11-26 15:22:04

toopeicgaming1999 (61 views)
2014-11-26 15:20:36

toopeicgaming1999 (15 views)
2014-11-26 15:20:08

SHC (28 views)
2014-11-25 12:00:59

SHC (27 views)
2014-11-25 11:53:45

Norakomi (32 views)
2014-11-25 11:26:43

Gibbo3771 (27 views)
2014-11-24 19:59:16

trollwarrior1 (40 views)
2014-11-22 12:13:56

xFryIx (78 views)
2014-11-13 12:34:49

digdugdiggy (56 views)
2014-11-12 21:11:50
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!