Speaking of garbage collectors, I had a thought the other day, wondering if performance could have a huge linear speed up if the graph of object pointers was stored compactly in memory, separated from the rest of an application's memory. The object graph could be stored in a succinct compressed format to reduce it's size as much as possible, compared to actual 64 bit pointers. Then the GC algorithm could crawl the gr…
This is a really cool idea. Just spitballing, but I suspect the issue would be that you now lose the objects locality when reading/following/writing references in conjunction with data. The GC algorithm will be crawling much less than your program will hopefully so it might be a net loss. Just speculation!
Epsilon: The JDK’s Do-Nothing Garbage Collector
61–70 of 77 posts
Re: Epsilon: The JDK’s Do-Nothing Garbage Collector
#62I think this article about Instagram turning off Python's garbage collecting is somewhat relevant and interesting: https://instagram-engineering.com/dismissing-python-garbage-...
Re: Epsilon: The JDK’s Do-Nothing Garbage Collector
#63Earlier quoted context omitted.
How do you envision compressing the graph? One thing you can do, if you know that all your objects will live in one arena, and the maximum size of that arena is https://wiki.openjdk.java.net/display/HotSpot/CompressedOops
Yes storing them as just smaller integers is a main thing. Frequently referenced pointers could also be given an even shorter coding, kind of like entropy coding.
Someone at RC suggested using succinct data structures and I spent a little while studying them, but they seemed to me like they'd have more niche-y properties than a more obvious approach would.
Re: Epsilon: The JDK’s Do-Nothing Garbage Collector
#64Speaking of garbage collectors, I had a thought the other day, wondering if performance could have a huge linear speed up if the graph of object pointers was stored compactly in memory, separated from the rest of an application's memory. The object graph could be stored in a succinct compressed format to reduce it's size as much as possible, compared to actual 64 bit pointers. Then the GC algorithm could crawl the gr…
Luajit does something vaguely like this: http://wiki.luajit.org/New-Garbage-Collector#arenas_block-ma... It doesn't need to access the actual data when sweeping.
Re: Epsilon: The JDK’s Do-Nothing Garbage Collector
#65JVM GC development has seen an upswing in the last few years, one of the most interesting new GCs are ZGC that show impressive numbers, delivers less than 10 ms pause times for any heap size, often than 1 ms for many applications, while having impressive throughput numbers. Another interesting adoption to the containerized world we live in is that GCs recently started to frequently return memory to the OS when not be…
Don't forget Shenandoah headed by G1's lead Christine Flood! I don't know enough to compare it to ZGC but it's an exciting time in Java's GC lineup.
Okay.
What JVM really really needs for performance is value types: a lot of GC problems will simply not exist with value types.
Project Valhalla started five (!) years ago, and they are still working on it.
JVM could also use multiple heaps per process (so multiple GCs could run independently not affecting other heap execution and GC). There were talks about it years ago, but nobody is working on it AFAIU.
Re: Epsilon: The JDK’s Do-Nothing Garbage Collector
#66Earlier quoted context omitted.
Don't forget Shenandoah headed by G1's lead Christine Flood! I don't know enough to compare it to ZGC but it's an exciting time in Java's GC lineup.
They promised low latency in G1, then they promised low latency in Shenandoah, now they promised it in ZGC. Okay. What JVM really really needs for performance is value types: a lot of GC problems will simply not exist with value types. Project Valhalla started five (!) years ago, and they are still working on it. JVM could also use multiple heaps per process (so multiple GCs could run independently not affecting othe…
ZGC and Shenandoah are Oracle and Redhat's respective projects with similar goals. I like the options and activies around GC all personally.
Re: Epsilon: The JDK’s Do-Nothing Garbage Collector
#67See also Raymond Chen: https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98... - who quotes the story of a piece of embedded software which accepted leaking since it would be used in the runtime of a missile.
Re: Epsilon: The JDK’s Do-Nothing Garbage Collector
#68Related: I ran some benchmarks for all GCs in OpenJDK 12 some time ago: https://github.com/ixy-languages/ixy-languages/blob/master/J... Epsilon tied on speed but lost to Shenandoah on latency because never freeing memory isn't ideal either, even if you never run out of memory.
It’s something I do all the time in C++.
Re: Epsilon: The JDK’s Do-Nothing Garbage Collector
#69Speaking of garbage collectors, I had a thought the other day, wondering if performance could have a huge linear speed up if the graph of object pointers was stored compactly in memory, separated from the rest of an application's memory. The object graph could be stored in a succinct compressed format to reduce it's size as much as possible, compared to actual 64 bit pointers. Then the GC algorithm could crawl the gr…
This is a really cool idea. Just spitballing, but I suspect the issue would be that you now lose the objects locality when reading/following/writing references in conjunction with data. The GC algorithm will be crawling much less than your program will hopefully so it might be a net loss. Just speculation!
Re: Epsilon: The JDK’s Do-Nothing Garbage Collector
#70Earlier quoted context omitted.
GC is not the bottleneck in Clojure startup time. There has been a fair bit written about it. You can use GraalVM to build fast startup Clojure binaries.
CDS and AppCDS, along with jlink, are also great for this.