It's all about the answers!

Ask a question

JVM Option CLM 4.0.6 -Xgc:preferredHeapBase=0x100000000


Rene Meyer (42913134) | asked Mar 07 '14, 6:53 a.m.
JAZZ DEVELOPER
Hello,

I just upgraded a RRC 4.0.3 test system of a client to 4.0.6.
It is a 8GB W2008R2 64bit Machine. With the old Tomcat Service definition we had no problem to start the JVM.
Without removing the following parameter I could not start the service:
-Xgc:preferredHeapBase=0x100000000
The rest of the parameters are standard from the info center:
http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0m6/topic/com.ibm.jazz.install.doc/topics/t_run_rqm64_win_service.html
I found a good explanation for that parameter in the following forum thread/Infocenter:
https://jazz.net/forum/questions/95675/was-8004-does-not-start-after-entering-generic-jvm-arguments-clm-40
http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/topic/com.ibm.java.doc.diagnostics.60/diag/understanding/mm_compressed_references.html
So I think removing it should have no side effects on the plain server functionality?
Best Regards,
René

Accepted answer


permanent link
Krzysztof Kaźmierczyk (7.3k34391) | answered Mar 07 '14, 7:19 a.m.
Hi Rene,
Do you have any error message when in Tomcat log when starting the server with this parameter?
As far as I remember this option is necessary when you are setting heap size to more than 1.5G on Windows. What is your heap size in tomcat service console set?
It is really strange that you have such issue. I would recommend you opening new PMR for confirming your configuration with the support.
Rene Meyer selected this answer as the correct answer

Comments
Rene Meyer commented Mar 19 '14, 7:21 a.m.
JAZZ DEVELOPER

Hello Krzysztof,
thank your for you answer.I only got the standard service errors logs and JVM errors when not enough memory is available. After I removed the parameter I could start the Tomcat service. There is no other SW running and we only changed from 4.0.3 to 4.0.6. There is also enough free memory available. As soon I'm back at the client I can get some logs.
René

2 other answers



permanent link
Rene Meyer (42913134) | answered Mar 26 '14, 8:43 a.m.
JAZZ DEVELOPER
Hello,
I got the same error when using the mentioned option on vanilla VM 8GB RAM Windows 2008 SR2 Image with CLM 4.0.6.
JVMJ9VM015W Initialization error for library j9gc24(2): Failed to instantiate heap; 4G requested
After removing the -Xgc:preferredHeapBase=0x100000000 option I can run the service.

When I understood the following article correctly is the option not useful if the JVM heap is set >=4GB.
http://www-01.ibm.com/support/docview.wss?uid=swg21660890
Starting with Java 626 SR6 and Java 70 SR5, and later, the JVM will determine if the Java heap will fit comfortably in the lower 4GB. If it is too large, the JVM will automatically allocate the Java heap above the 4GB mark (APAR IV37797).

However, in earlier Java 626 and Java 70 versions, if the Java heap can not fit in the lower 4GB, a NOOM will occur. To avoid this problem, the generic JVM argument -Xgc:preferredHeapBase=<address> can be used to ensure the Java heap is allocated above the 4GB address space. This will leave more room for the Class Pointer and Monitor/Lock memory.


    Example:
    -Xgc:preferredHeapBase=0x100000000

    This will locate the Java heap starting at the 4GB mark thus leaving the lower 4GB for the other processes.


Another way to ensure that the heap is allocated above the 4GB mark is to set a maximum heap size equal to or greater than 4GB. For example -Xmx4G will ensure that the heap will have to be allocated above the 4GB mark.


So the last statement indicates that this option is superfluous when -Xmx is 4G or more?

Best Regards,
René

permanent link
Adam Wereszczynski (9281932) | answered Mar 19 '14, 7:00 a.m.
edited Mar 19 '14, 7:01 a.m.
Hi Rene,

Are you running other software on your server?
As documented, this command makes sure that the starting address of the heap size is at 4GB.
If other software already reserved memory there, the allocation of the Java heap may fail.

This is needed to utilize compressed refs better by shifting all memory addresses and truncating zeros.
I do not understand this fully, but I think that following things may be happening after removing this parameter:
a) Heap is allocated below 4GB. This means that the effective size of the heap is smaller (from actual base heap address to 4GB) and you may see out of memory issues.
b) If you're not getting OOMs, then maybe WAS was smart enough to either disable compressed references feature (heap can now reside in a contiguous area that includes the 4GB mark) or put the Heap above 4GB mark anyway.

As Krzysztof said, if you run into problems don't hesitate and open a PMR.

Comments
Rene Meyer commented Mar 19 '14, 7:35 a.m.
JAZZ DEVELOPER

Hello Adam,

thank you for your answer no other SW is running. The only difference is 4.0.6 vs. 4.0.3 before. The heap was set to 4GB as before. There is a good article on the parameter here:
http://www-01.ibm.com/support/docview.wss?uid=swg21660890
I will play around with the parameters described there.
Best Regards,
René


Your answer


Register or to post your answer.