6 ms·
Of course you’re right and you really want to avoid getting to GC thrashing. IMO people still miss the old +UseGCOverheadLimit on the new GCs. That said trying
by NightMKoder 2y ago
Of course you’re right and you really want to avoid getting to GC thrashing. IMO people still miss the old +UseGCOverheadLimit on the new GCs.
That said trying to enforce overhead limits with RSS limits also won’t end well. Java doesn’t make guarantees around max allocated but unused heap space. You need something like this: https://github.com/bazelbuild/bazel/blob/10060cd638027975480ae56b5e38dd1a0991d49c/src/main/java/com/google/devtools/build/lib/runtime/MemoryPressureOptions.java#L87 https://github.com/bazelbuild/bazel/blob/10060cd638027975480... - but I have rarely seen something like that in production.