3 ms·
So does this mean Shenandoah is not suitable for things like caching? Should this even mean I should avoid trying to re-use objects if possible?
by stingraycharles 8y ago
So does this mean Shenandoah is not suitable for things like caching? Should this even mean I should avoid trying to re-use objects if possible?
- unlogic 8y agoCompletely vice-versa, Shenandoah is much better for caching because it is NOT generational. [LRU] Caches go against generational hypothesis because the oldest elements are evicted first.
- jashmatthews 8y agoI understand what you mean, but wouldn't the majority of allocations still hapen during a request? For example, generational GC works really well with Elixir and Erlang caches.
- unlogic 8y ago> wouldn't the majority of allocations still happen during a request? Could you please clarify this question? Do you mean that if cached objects are a small part of the total allocation rate, then generation GCs work well with that?
- jashmatthews 8y agoExactly. Go explored a request oriented collector with explicit generational boundaries.
- unlogic 8y agoWell, if caching takes a small part of the overall workload, then you can't really say it's a "cache workload" or "cache-heavy workload", right? My answer meant that Shenandoah would work well in a program where cache occupies like 70-80% of the heap, and generational GCs might not. But surely, neither are going to break from a 1%-heap cache.