|
|
|
|
|
by freedom-fries
870 days ago
|
|
GC pauses are dependent on the code and its workload so general benchmarking is rarely useful. You can have a code that works really nicely with GC at a given throughput and request pattern, but not at all at a different load profile. Minor implementation change can also dramatically alter the GC workload. A generic work-queue, where one thread is enqueuing tasks (allocating memory) and another is consuming them and deallocating memory can make it hard for GC to do its work, while minor changes so that queue is fixed-sized and does not allocate can dramatically change the GC workload. Even really simple optimizations where the `enqueue` may just copy to its queue-owned buffers can make allocations happen exclusively from TLAB with bump allocation which are essentially no-ops for GC & the allocator. Generic benchmarking happens but is more the domain of GC developers, and not very useful for developers – because usually, your workload is different from mine. |
|