Hacker News new | ask | show | jobs
by kazinator 1142 days ago
Looks like they wanted to configure a much larger heap than they needed just in case, but then to have the system pretend it doesn't exist, and do GC cycles at a much lower threshold. I'm surprised SBCL doesn't have parameters to be just tuned that way; if not, that could be upstreamed.

Going longer between garbage collection cycles could be worse in terms of caching and paging. Marking the live objects allocated in that generation is about the same, since that doesn't grow, but there is more garbage to visit and sweep. Sweeping a smaller memory area more frequently is going to be faster than sweeping a larger area less frequently, from the point or view of caches and TLB.

(Regarding my remark about live objects; with larger collection cycles, they could be spread in a wider VM footprint, even if their quantity doesn't grow. The image has a kind of "GC working set"; longer intervals mean that there is a longer working set. The data being transformed cycles through more memory locations.)