on ‎2011 Mar 11 7:34 AM
hello gurus,
we have currently a few memory problems with our netweaver AS Java. Once a week our server dies because of "return code 666: out of memory". We are using a netweaver AS Java 640 on an Windows 2003 x64 Server. It is a dedicated machine with 16 GB Ram. The memory settings in the JVM are:
-Xms4096M
-Xmx4096M
-Xss2M
-XX:+DisableExplicitGC
-XX:+PrintGCDetails
-XX:+PrintGCTimeStamps
-XX:+UseParNewGC
-XX:+UseTLAB
-XX:CodeCacheMinimumFreeSpace 2M
-XX:CompilerThreadStackSize 4096
-XX:MaxNewSize 682m
-XX:MaxPermSize 2048m
-XX:NewSize 682m
-XX:PermSize 2048m
-XX:ReservedCodeCacheSize 64M
-XX:SoftRefLRUPolicyMSPerMB 1
-XX:SurvivorRatio 2
-XX:TargetSurvivorRatio 90
We are running our b2b Shop on this server. I don´t know if the 4 GB are enough Memory for Java since we have 16 GB available within our machine. But I´d like to know if i can just increase the Heap Size to 8GB or more.
I´m looking forward to hear your recommendations.
best regards
Tobias
Request clarification before answering.
hello Sunny,
did you read the note? I don´t think so.
This note recomments 2 GB Heap...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Instead of increasing the heap size, it is advisable to create additional server node to get better availability and to reduce impact of GC time on response time. There is no JVM setting to avoid memory leaks, it can be fixed only by fixing the culprit Java code. You can find out the culprit class by heap dump analysis. The quick work around would be to update your JDK to the latest available as per SAP note 723909. Since the parameters you specified indicates that you are using SUN JDK, the latest version is 1.4.2_29.
Dear Tobias,
Unless you are using a BI server, 4GB ram on the server is too high. If the values of the heap are on the higher side, then this can lead to more garbage collection as well.
If the heap is not enough, please do increase it as per your need (max. 3G). Then add more server nodes / instances on the server. The rule of thumb for number of server nodes for SUN JavaVM with 2 GB Heap each will be
#ServerNodes = (AvailableMemory / 2.5 GB)
A cluster restart will be needed after addition of the server node. If you face the error again, kindly check the below link to generate the heap dump.
SAP Note No. 1004255- How to create a full HPROF heap dump of J2EE Engine
There is no side effect of this parameter; it will however write a heap dump, so make sure that here is enough free space
on the server. Even if the free space is less, it will not harm the server in any manner; just the dump written
will not be complete. This will hinder the analysis.
More details are available here:
http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/
f0a5d007-a35f-2a10-da9f-99245623edda&overridelayout=true
http://www.sdn.sap.com/irj/sdn/wiki?path=/display/java/
JavaMemoryAnalysis
http://www.ibm.com/developerworks/java/jdk/tools/mat.html
This should help you identify the memory leak.
Regards,
hemanth
It´s a dedicated machine with 16 GB Ram. Max Heap of the JVM Settings is 4 GB.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As per your details, you have 4GB of RAM for this server and where as you have allocated 4GB to heap space which is not good. 4 GB of RAM is very less and you should increase the RAM.
As you have only 4GB of RAM available on the server, so you cannot allocate 8GB of RAM. Check SAP note 723909 for more information.
Thanks
Sunny
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
JVM settings alone cannot prevent memory leaks. However, JVM settings can influence the timeframe in which memory problems can arise. In a dedicated NetWeaver AS Java system with 16 GB of physical memory, using a 4 GB Java heap is relatively conservative. If there is sufficient memory available in your operating system, then in that case, you can go ahead and try increasing the heap size to 6-8 GB. However, a recurring out-of-memory condition indicates a likely heap or off-heap memory leak rather than simply insufficient heap size. Analyzing GC logs to verify whether old generation memory is reclaimed after a Full GC and capturing heap dumps to identify retained objects are essential steps. Proper diagnosis and fixing the underlying cause is more effective than relying solely on JVM memory tuning to avoid memory leaks. For a deeper understanding of common signs of a Java memory leak, identifying memory leaks by analyzing a heap dump, check out this blog, From Symptoms to Solutions: Troubleshooting Java Memory Leaks & OutOfMemoryError.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.