diff --git a/src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp b/src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp index acbe76f946153c5d163f514b8e02bd561fa16c01..55bbdd6d7889964b7a2e1035e4e82d1cb154d5e4 100644 --- a/src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp +++ b/src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp @@ -224,6 +224,12 @@ void PSOldGen::expand(size_t bytes) { const size_t alignment = virtual_space()->alignment(); size_t aligned_bytes = align_size_up(bytes, alignment); size_t aligned_expand_bytes = align_size_up(MinHeapDeltaBytes, alignment); + + if (UseNUMA) { + // With NUMA we use round-robin page allocation for the old gen. Expand by at least + // providing a page per lgroup. Alignment is larger or equal to the page size. + aligned_expand_bytes = MAX2(aligned_expand_bytes, alignment * os::numa_get_groups_num()); + } if (aligned_bytes == 0){ // The alignment caused the number of bytes to wrap. An expand_by(0) will // return true with the implication that and expansion was done when it diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments.cpp index 498e4e9d29a2c9edda7a18222041f61057f94c42..89e3262830bef61e6a9160b06899340be460d09b 100644 --- a/src/share/vm/runtime/arguments.cpp +++ b/src/share/vm/runtime/arguments.cpp @@ -1423,6 +1423,11 @@ void Arguments::set_parallel_gc_flags() { } } } + if (UseNUMA) { + if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) { + FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M); + } + } } void Arguments::set_g1_gc_flags() {