Solaris Java 2D Performance

I’m using some accelerated graphics for Mini Adventure (http://www.newdawnsoftware.com/miniad). I’m using soley bitmask transparency.

On Windows, even with onboard graphics and a 1gz machine I get a fair 50fps.

At best on Linux (with supporting drivers), on a graphics card enabled machine I can get reasonable frame rates (~700 on a GF4 for instance)

On MacOSX there appears to still be no hardware acceleration at all, So frame rates are sub 30 (basically unplayable). However, I believe Apple are meant to be sorting this out.

However, on Solaris, the Sun Flag Ship, I get sub 30 fps on relatively decent hardware (440, Creative 3D card, 348 MB memory).

So:

  • Is the Solaris Java2D implementation really that bad?
  • Will 1.5 fix this using the OpenGL pipeline?
  • Are there options I can turn on for solaris to get better performance?

Any help, comments appreciated…

Kev

PS. Apple future intentions is only based on rumours.

[quote] At best on Linux (with supporting drivers), on a graphics card enabled machine I can get reasonable frame rates (~700 on a GF4 for instance)
[/quote]
700 Fps :o

Are you using OGL acceleration ?
Did you try without it ?

Nope, I don’t use any OpenGL acceleration (part of the remit of Mini Adventure was its pure Java2D).

Its just on my GF4 4200i, Gentoo, Nvidia Graphics Drivers. Machine is a Athlon 2000XP, 512MB.

Fraid I don’t know enough about how Linux X works under the hood to know if standard drawing in 2D could be getting boosts from the Nvidia drivers.

Kev

Well, my question is: are you using “-Dsun.java2d.opengl=true” ?

My guess is NO. Can’t you try it ?

See: http://java.sun.com/j2se/1.5.0/docs/guide/2d/new_features.html#ogl

I could, except I haven’t got 1.5 yet… I’ve not tried Mini Adventure on it…

I can do tho, unfortunately, I don’t have a sparc to test on.

Kev

So maybe it’s time to get j2sdk1.5 and check its performance for your case. …And don’t forget to let us know…

Cheers,

Mik

Unfortunately, in my current stage of development I only deploy with webstart. So unless I force the next solaris user I can find to download 1.5 before running the game I can’t auto-update them to 1.5

And at the moment, trying out 1.5 for the platforms I do have (windows, linux) is going to be pretty low priority.

Kev

EDIT: Of course, if someone with a solaris box is happy to get in touch I can put in the option for the OpenGL pipeline to test with.

[quote]EDIT: Of course, if someone with a solaris box is happy to get in touch I can put in the option for the OpenGL pipeline to test with.
[/quote]
Hey Kev, we’ve got a couple (and by couple I mean 8 billion) Solaris/SPARC machines here… I’d be glad to try out your game to see how it performs on Solaris (with and w/o OGL enabled). Please send me mail (at the address in my profile).

Actually, from your above posts, it wasn’t clear whether you were referring to Solaris/SPARC or Solaris/x86… Most of the performance issues depend on the underlying hardware. For example, Sun doesn’t currently ship accelerated OGL libraries for Solaris/x86 (although Xi Graphics does, for a fee). This is likely to change in the coming months though… Stay tuned.

There are some flags that can sometimes help improve performance on Solaris, see here:
http://java.sun.com/products/java-media/2D/perf_graphics.html

Mr. Trembovetski might have some more specific hints about Solaris performance…

Chris

Hey Chris,

do you want to test Castalia, my Java2D-intensive app too ?

Let me know,

Mik

Okie, for anyone who wants to try miniad with some command line switches, heres an executable jar:

http://www.cokeandcode.com/miniad/miniad.jar

You’ll also need to download all the other jars from:

http://www.cokeandcode.com/miniad/

and stick them in the same directory.

Be aware that it sets the following things progmatically:


System.setProperty("sun.java2d.translaccel", "true"); 
System.setProperty("sun.java2d.ddforcevram", "true"); 

I’m not 100% whether these are good or bad, just seemed to help out while I was experimenting.

EDIT: Solaris (SPARC) btw, not x86.
EDIT2: I’d really appreciate results that people get (solaris or otherwise).

Kev

EDIT3: PS. Recent source is available at http://www.cokeandcode.com/miniad/src

Campbell’s response after trying mini adventure out on a sparc or two.

Also note:

So far, I’ve only had reports of “stuttering” under 1.5beta conditions (either beta 1 or 2). However, I’m not ruling this out as bug in the code just yet. I’m working on some nicer timer implementations as we speak so this might resolve some of those issues.

Cheers for testing it out for me Chris!

Kev

[quote]Hey Chris,

do you want to test Castalia, my Java2D-intensive app too ?

Let me know,

Mik
[/quote]
Hi Mik,

Sure, send it along to the address in my profile. I’ll try to get to it next week.

Thanks,
Chris

[quote] Sure, send it along to the address in my profile. I’ll try to get to it next week.
[/quote]
I’ve put it in a public area. Check your email.

Cheers,

Mik.

OK, so what’s the technical difference between this and the jerkiness I’ve always been getting with miniad? :slight_smile:

Oops, I’d forgotten about that! Its seems since its been raised a few others have come forward.

Unfortunately, I’ve yet to get it to happen locally so I’m having trouble tracking it down.

Hopefully when I get to next dev cycle on the client it’ll probably be first issue. For now I’m working on the background toolset.

Kev