News for hackers. Stuff that matters.

mangokiwi

Re:Implementing a safe garbage collector in Rust on Friday April 29, 2022 @11:12PM (#31213040)
You might be interested to learn about the MMTk [1, 2] project which aspires to be a language agnostic library for garbage collection. It was used by the LXR authors [3] to develop a GC that beat production OpenJDK 11 collectors in throughput and latency. I believe they have work on a bunch of bindings to other VMs underway as well such as V8 (JavaScript), MRI (Ruby), Julia, GHC (Haskell), and PyPy (Python)!

[1]: https://www.mmtk.io/

[2]: https://github.com/mmtk/

[3]: https://users.cecs.anu.edu.au/~steveb/pubs/papers/lxr-pldi-2...

Re:Low-Latency, High-Throughput Garbage Collection [pdf] on Tuesday April 26, 2022 @11:11AM (#31168460)
> In fairness they obviously cannot benchmark against unreleased versions of ZGC, but equally, I was expecting/hoping to see benchmarks run at allocation rates that ZGC/Shenandoah are actually rated for today. What they're mostly proving here is that you need generational collection to handle high throughputs on allocation heavy benchmarks like lusearch, rather than anything special about LXR specifically.

They evaluate over a diverse range of 17 benchmarks, though only 4 latency benchmarks. Would have been nice to have more latency benchmarks, I agree.

> It mentions LXR will provide "sufficient responsiveness" without concurrent evacuation, but the whole reason ZGC/Shenandoah were developed was because for some use cases G1 level pause times - even though they're usually quite low - were not considered sufficient.

Right. At the cost of a significantly larger heap size though. Memory is cheap nowadays, yes, but large datacenters want to reduce their (electricity/power) running costs, and so if we can reach similar (or _slightly_ worse) latency requirements (and the paper demonstrates that low pause times do not necessarily translate to low latency) while using less memory, I think that in-of-itself is quite appealing. Also do note that, as mentioned in the paper, LXR is has not seen the benefit of years of tuning and tweaks that production collectors have.

I am quite excited by this new GC and hope to see further work done to improve its performance.

Re:Low-Latency, High-Throughput Garbage Collection [pdf] on Tuesday April 26, 2022 @11:01AM (#31168313)
Seems like OpenJDK _may_ be interested [1]?

[1]: https://twitter.com/rkennke/status/1518552419000627202

Re:Low-Latency, High-Throughput Garbage Collection [pdf] on Tuesday April 26, 2022 @10:12AM (#31167693)
Well, the framework they use (mmtk: https://github.com/mmtk/mmtk-core), is language runtime agnostic. They just used Java because Java is one of the most mature and well-research managed languages. If you make a port for C#/.net (assuming all the required features are implemented), you could pretty much use the same GC.