8316418: containers/docker/TestMemoryWithCgroupV1.java get OOM killed with Parallel GC

Reviewed-by: shade
This commit is contained in:
Severin Gehwolf 2023-09-22 08:12:51 +00:00
parent 343cc0ce2b
commit 7352bb9105

@ -77,6 +77,7 @@ public class TestMemoryWithCgroupV1 {
Common.logNewTestCase("Test print_container_info()");
DockerRunOptions opts = Common.newOpts(imageName, "PrintContainerInfo").addJavaOpts("-XshowSettings:system");
opts.addDockerOpts("--cpus", "4"); // Avoid OOM kill on many-core systems
opts.addDockerOpts("--memory", dockerMemLimit, "--memory-swappiness", "0", "--memory-swap", dockerSwapMemLimit);
Common.addWhiteBoxOpts(opts);
@ -104,6 +105,7 @@ public class TestMemoryWithCgroupV1 {
String swappiness, String expectedSwap) throws Exception {
Common.logNewTestCase("Check OperatingSystemMXBean");
DockerRunOptions opts = Common.newOpts(imageName, "CheckOperatingSystemMXBean")
.addDockerOpts("--cpus", "4") // Avoid OOM kill on many-core systems
.addDockerOpts(
"--memory", memoryAllocation,
"--memory-swappiness", swappiness,