News for hackers. Stuff that matters.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by tpxl on Friday September 17, 2021 @06:51AM (#28563766)
I was testing ZGC the other day on my machine (24vcores, 64GB RAM) and it ate through about 4GB/s of garbage with about 10milisec of pauses over 220sec of runtime (24 threads doing nothing but allocations). G1 ate through about 2x as much garbage but with higher pause times. It's amazing how far we've come.

I hope this means we can get more games in Java since I'd like to code one or two in my favorite language :)

Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by MaxBarraclough on Friday September 17, 2021 @04:08PM (#28570337)
> it ate through about 4GB/s of garbage

Perhaps a nitpick: 'moving' garbage collectors [0] like Shenandoah don't 'eat through' memory occupied by now-unreachable objects. They work by copying/moving the still-reachable objects. Their performance is a function of the number of still-reachable objects, and their size, rather than the unreachable objects.

[0] https://en.wikipedia.org/wiki/Tracing_garbage_collection#Mov...

Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by brunoborges on Tuesday September 21, 2021 @11:27PM (#28612822)
Friendly reminder that Minecraft: Java Edition, is still pretty active and now runs and ships with Java 16 (MS Build of OpenJDK).

Gaming in Java has always been possible.

Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by syspec on Friday September 17, 2021 @09:07AM (#28565018)
Wasn't Minecraft written in Java?
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by plainnoodles on Friday September 17, 2021 @10:02AM (#28565590)
Yes, but as someone who ran a medium-sized server (200ish players), depending on what your map looked like, you occasionally found yourself spending a lot of time doing GC tuning, especially back in java 7 days when we didn't even have the first generation of G1GC.

Ah, good times. I currently work in Hadoop and it's honestly stupid how much tuning a Spark job is like tuning a Minecraft server (from the JVM level anyway). Life's path is strange sometimes.

Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by ohgodplsno on Friday September 17, 2021 @11:21AM (#28566502)
It was, although it got bitten at one update explicitly by the GC: entity positions moved from a bunch of arrays, to a single Position() class for each entity, leading to memory allocations that murdered performance.

But then again, that's a problem you'd get without GC too, just maybe a bit less harsh/unpredictable.

Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by U1F984 on Friday September 17, 2021 @09:11AM (#28565053)
Yes, the original Java edition is still in Java. There's now a C++ edition called bedrock as well.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by tpxl on Friday September 17, 2021 @09:37AM (#28565329)
Yes, there are plenty of games written in Java, but afaik there are no big game engines written in it. I'd love to be proven wrong regarding this.