https://x.com/shipilev/status/1970805877545505108
Aleksey Shipilëv @shipilev Timings get way better for any AOT mode when there are only a few available cores to run JIT in background. Once aggressive JIT compiler starts to compete with the application, it hurts a lot, and residency graphs are a mess. There are 2-3x wins, though. Oh man.
https://x.com/shipilev/status/1970948423710015888
Aleksey Shipilëv @shipilev Yeah, OpenJDK default compiler sizing policy is something like "log(N) * log(log(N)), but tiered policy also has a lot of feedback, including compiler load.
#ifdef _LP64
// Turn on ergonomic compiler count selection
if (FLAG_IS_DEFAULT(CICompilerCountPerCPU) && FLAG_IS_DEFAULT(CICompilerCount)) {
FLAG_SET_DEFAULT(CICompilerCountPerCPU, true);
}
if (CICompilerCountPerCPU) {
// Simple log n seems to grow too slowly for tiered, try something faster: log n * log log n
int log_cpu = log2i(os::active_processor_count());
int loglog_cpu = log2i(MAX2(log_cpu, 1));
count = MAX2(log_cpu * loglog_cpu * 3 / 2, min_count);
// Make sure there is enough space in the code cache to hold all the compiler buffers
size_t c1_size = 0;