News for hackers. Stuff that matters.
Re:Next Generation Out of Band Garbage Collection by spullara on Saturday November 02, 2024 @08:33PM (#42030318)
All the other virtual machines that support GC need to look at the JVM's ZGC and Shenandoah. Sub-millisecond pause times with terabyte heaps.
Re:Next Generation Out of Band Garbage Collection by bob1029 on Saturday November 02, 2024 @11:36PM (#42031002)
I think we should be careful when correlating heap size with how long the collection should take.

Also, I really want ZGC in .NET runtime, but I don't think I'll ever get support for it first party. There's some kind of principled ideologue holdout situation going on over at Microsoft. Every time I get into it with one of their engineers I'm sent to some impotent "please may I have a temporary GC exemption" API. All I want is it to do nothing. How hard is it to just not clean up the goddamn garbage? Give me a registry flag + env variable + cli arg all required at the same time if you're so worried someone might trip over it.

Re:Next Generation Out of Band Garbage Collection by reubenbond on Sunday November 03, 2024 @01:24AM (#42031313)
Would GC.TryStartNoGCRegion work for you? https://learn.microsoft.com/en-us/dotnet/api/system.gc.tryst...
Re:Next Generation Out of Band Garbage Collection by neonsunset on Sunday November 03, 2024 @06:57AM (#42032553)
ZGC does not stand for zero. It stands for Z Garbage Collector. It's a next-generation GC implementation for OpenJDK that focuses on low pause time while supporting very large heap sizes. It does not "not collect garbage".

You could try using https://github.com/kkokosa/UpsilonGC and seeing if it still works.

At the end of the day for anything performance-related you can just write code with manual memory management with RAII patterns via IDisposable on structs and get code that performs closely to C++ or Rust. It's also necessary to understand if this is a good idea at all - most of the time you do want to just rely on GC.

Re:Next Generation Out of Band Garbage Collection by bob1029 on Sunday November 03, 2024 @07:08AM (#42032602)
> ZGC does not stand for zero. It stands for Z Garbage Collector.

Apologies - I was attempting to referring to "absolutely no" garbage collection path. I was thinking of Epsilon [0].

> It's also necessary to understand if this is a good idea at all - most of the time you do want to just rely on GC.

Assume we are building a cruise missile flight computer. I have enough ram for ~100 hours of flight if we never clean up any allocations. I only have enough fuel for 8 hours of flight on a good day. Why do I still need a garbage collector? All I need is a garbage generator. The terminal ballistics and warhead are the "out of band" aspects in this arrangement.

> You could try using https://github.com/kkokosa/UpsilonGC and seeing if it still works.

I've spent weeks on this exact thing. I cannot get it to work. This gets me back to the first party support aspect.

[0] https://openjdk.org/jeps/318

Re:Next Generation Out of Band Garbage Collection by algorithmsRcool on Saturday November 02, 2024 @11:31PM (#42030977)
How much of a throughput penalty do those options incur on the application?
Re:Next Generation Out of Band Garbage Collection by spullara on Sunday November 03, 2024 @12:20AM (#42031136)
I think it only affects throughput at the limit at the 5% level. All the portfolio companies that implemented it got a net increase in performance as they avoid redlining their servers.
Re:Next Generation Out of Band Garbage Collection by oorza on Saturday November 02, 2024 @10:49PM (#42030861)
C4 still smokes them both, doesn't it?
Re:Next Generation Out of Band Garbage Collection by spullara on Sunday November 03, 2024 @04:07AM (#42031960)
hard to smoke sub-millisecond pauses but there may be other axes where it is better. it used to be that people thought azul was better because it was generational but now zgc is as well. my guess is that c4 doesn't have enough of an edge at this point but happy to see benchmarks that prove otherwise.
Re:Next Generation Out of Band Garbage Collection by byroot on Sunday November 03, 2024 @03:09AM (#42031793)
We're actually hoping to get mmtK included in Ruby to be able to use more advanced GCs. Medium term we hope to use Immix: https://bugs.ruby-lang.org/issues/20860

And yes, we're aware of ZGC &co https://www.eightbitraptor.com/presentations/RubyKaigi2023-m...

Re:Next Generation Out of Band Garbage Collection by bitbckt on Sunday November 03, 2024 @03:49PM (#42036000)
Amazing to see this happening. I wrote the non-moving Immix collector at Twitter for our Ruby runtime, Kiji.

Good luck!