8201495: [Zero] Reduce limits of max heap size for boot JDK on s390 (original) (raw)
Volker Simonis volker.simonis at gmail.com
Mon Apr 16 10:01:07 UTC 2018
- Previous message (by thread): 8201495: [Zero] Reduce limits of max heap size for boot JDK on s390
- Next message (by thread): 8201495: [Zero] Reduce limits of max heap size for boot JDK on s390
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Apr 16, 2018 at 11:30 AM, Severin Gehwolf <sgehwolf at redhat.com> wrote:
Hi Andrew,
On Mon, 2018-04-16 at 09:47 +0100, Andrew Haley wrote: On 04/13/2018 02:40 PM, Severin Gehwolf wrote: > ++ /usr/bin/tee /builddir/build/BUILD/java-9-openjdk-9.0.4.12-5.openjdk9.el7.s390/openjdk/build/jdk/modules/java.base/the.java.basebatch.log > ++ /usr/bin/tee /builddir/build/BUILD/java-9-openjdk-9.0.4.12-5.openjdk9.el7.s390/openjdk/build/jdk/modules/java.base/the.java.basebatch.log > Error occurred during initialization of VM > Could not reserve enough space for 1048576KB object heap
What is the root cause of this? Is it that the system on which the build runs cannot allocate all that memory? Does not have that much memory? The configure code in JDK 9+ has this: JVMHEAPLIMIT32="1024" # Running a 64 bit JVM allows for and requires a bigger heap JVMHEAPLIMIT64="1600" STACKSIZE32=768 STACKSIZE64=1536 JVMHEAPLIMITGLOBAL=
expr $MEMORYSIZE / 2
if test "$JVMHEAPLIMITGLOBAL" -lt "$JVMHEAPLIMIT32"; then JVMHEAPLIMIT32=$JVMHEAPLIMITGLOBAL fi if test "$JVMHEAPLIMITGLOBAL" -lt "$JVMHEAPLIMIT64"; then JVMHEAPLIMIT64=$JVMHEAPLIMITGLOBAL fi if test "$JVMHEAPLIMITGLOBAL" -lt "512"; then JVMHEAPLIMIT32=512 JVMHEAPLIMIT64=512 fi if test "x$BOOTJDKBITS" = "x32"; then STACKSIZE=$STACKSIZE32 JVMMAXHEAP=$JVMHEAPLIMIT32 else STACKSIZE=$STACKSIZE64 JVMMAXHEAP=$JVMHEAPLIMIT64 fi Here's my reasoning: If I read this right then -Xmx will be bound above by 1/2 the hardware memory size. The set heap limit for that build was 1024M. It then follows that 1024M was less than 1/2 the hardware memory. Yet, it still failed to allocate required memory. So to answer your question: It looks like it was that the system wasn't able to allocate that much memory at the time.
Where do you get the "Before:" output from your initial mail:
Before: checking flags for bootcycle boot jdk java command for big workloads... -Xms64M -Xmx998M -XX:ThreadStackSize=768
with '-Xmx998M' if JVM_HEAP_LIMIT_32 was "1024" before your change ?
Those builds run on systems I don't have access to, though. What's more, I don't have access to the build logs of that failed build any longer. From a successful s390 build with that patch I see:
$ grep 'Memory limit' build.log * Memory limit: 5906 MB This seems suspiciously high for 32 bit (or 31 bit in this case). Maybe it gets the hardware memory size of the 64bit host system? We know this runs in mock chroots on s390x boxes. Thanks, Severin
- Previous message (by thread): 8201495: [Zero] Reduce limits of max heap size for boot JDK on s390
- Next message (by thread): 8201495: [Zero] Reduce limits of max heap size for boot JDK on s390
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]