11 ms·
related: the Immix inspired parallel-mark-region GC developed by Hayley Patton got merged recently into SBCL (https://github.com/sbcl/sbcl/commit/40276b25370f2a
by vindarel 3y ago
related: the Immix inspired parallel-mark-region GC developed by Hayley Patton got merged recently into SBCL (https://github.com/sbcl/sbcl/commit/40276b25370f2af1e1870d3b55d62846543a5b47 https://github.com/sbcl/sbcl/commit/40276b25370f2af1e1870d3b...).
https://github.com/sbcl/sbcl/blob/master/doc/internals-notes/mark-region https://github.com/sbcl/sbcl/blob/master/doc/internals-notes...
https://applied-langua.ge/~hayley/swcl-gc.pdf https://applied-langua.ge/~hayley/swcl-gc.pdf
build with
./make.sh --without-gencgc --with-mark-region-gc (on x86-64/Linux and x86-64/macOS only at the moment).
- the-smug-one 3y ago>Kandria, a commercial game written in Common Lisp [14 ], is used in a more complex benchmark. The game uses a mixture of object-oriented code and numerical code with unboxed arrays. The game is configured identically to the retail version, using a 4GB heap. We played the same part of the game for a few minutes with each collector configuration10, and record the distribution of how long it takes to produce each frame (frame times), and the distribution of pause times in the kandria benchmark. That's a fun benchmark to have. Seems like gencgc is better than the new GC anyway wrt pause times? >Very few objects survive garbage collection in Kandria, with less than a megabyte surviving out of a 200 megabyte nursery. From this sentence I'm going to guess that Kandria performs a lot of per-frame allocations. Having a bump-pointer arena for this which is reset per-frame would probably be quite nice. The Acknowledgements section is crazy haha, with mentions such as Cliff Click (OG Hotspot JIT compiler architect) and Larry Masinter (Xerox PARC Interlisp) along with the nice SBCL and Kandria devs.
- deleted 3y ago[deleted]
- hayley-patton 3y ago> That's a fun benchmark to have. Seems like gencgc is better than the new GC anyway wrt pause times? At that time the GC didn't compact, and so much time was wasted scavenging and sweeping the old objects. Old objects aren't contiguous due to not moving objects, though we try to avoid reading from the heap; we only twiddle metadata tables when sweeping and only read objects that we must scan for old->new references while scavenging. Here that wasn't sufficient: > As a result, scavenging took 2.9 milliseconds on average, tracing took 1.9 milliseconds, and sweeping took 1.6 milliseconds. Ideally scavenging and sweeping would take much less time than tracing. I think it should behave better now with compaction, but haven't benchmarked; and my approach to benchmarking Kandria is pretty sloppy in any case. > Having a bump-pointer arena for this which is reset per-frame would probably be quite nice. Indeed SBCL has support for arenas (though AIUI no stable user-facing interface at the moment), but it still takes some effort to work out what goes in the arena, and the current interface in SBCL also requires all libraries to know about arenas which isn't great for retrofitting. > The Acknowledgements section is crazy haha, with mentions such as Cliff Click (OG Hotspot JIT compiler architect) and Larry Masinter (Xerox PARC Interlisp) along with the nice SBCL and Kandria devs. I can't take much of the blame for much of the design; much of it was collaborated in the #lispcafe channel on Libera, which ostensibly is the "off topic" channel. Well. Also worth mentioning that Cliff Click also worked on parallel/concurrent GC and other parallel algorithms, so he was most helpful with interpreting the performance of this GC.
- lispm 3y agovery cool!
- fud101 3y agowhy dont we have a hn discussion on this? way more interesting than some ancient GC imho.