This content has been marked as final. Show 14 replies
Jeethi George wrote:Seems to me a uneccessary lot of memory to MaxPermSize. MaxPermSize is used to hold reflective data of the VM itself such as class objects and method objects. I would prefer more common setting like that.
Mechine have a memory of 4 GB
can set the memory like
JAVA Memory arguments: -Xms256m -Xmx1024m -XX:MaxPermSize=2048m
JAVA Memory arguments: -Xms256m -Xmx2048m -XX:MaxPermSize=512m
I see two possible causes of your problem.
1) Bad memory setting -Xmx512m can be exhausted in bigger app pretty quick. Setting to -Xmx2048m should help.
2) Some memory leak. Memory usage is rising and after a while get maximum. Setting to -Xmx2048m should help in that way, you will get OOM less often, let say each 5 hours for example.
But you should absolutely use some memory monitoring tool. There a lot of them. You can use for example jconsole, which is a part of JDK or weblogic logs contains GC usage, you can parse them and see what is going on.
does it work ?
Jeethi George wrote:Monitoring tools impact performance little bit, you can turn it off, if your app will be ok.
does it make any impact on performance
But if your app is failing each few hours, frankly, performance is not problem for you now.
First of all, try to set JAVA Memory arguments: -Xms256m -Xmx2048m -XX:MaxPermSize=512m. And report what happened.
Jeethi George wrote:Which jre do you exactly use?
while changing to
-Xms256m -Xmx2048m -XX:MaxPermSize=512m.
server suddenly exits
-Xms256m -Xmx1024m -XX:MaxPermSize=512m.so how is app doing? Do you get OOM? Check Server > Monitoring > Performance to see actual free heap memory.
Does memory usage rise or is there enaugh memory? Btw, how many users are using app in one moment?
The Setting you have provided is wrong ...that is the reason you are getting OutOfMemory in Heap.
Your Setting is (As you have mentioned in your very first post): JAVA Memory arguments: -Xms256m -Xmx512m -XX:MaxPermSize=512m
Just a Bit Explaination:
(OS Level)Process Size = [ Java Heap (+) Native Space (+) (2-3% OS related Memory) ]
PermSize : It's a Netive Memory Area Outside of the Heap, Where ClassLoading kind of things happens. In an operating System like Windows Default Process Size is 2GB (2048MB) default (It doesnt matter How much RAM do u have 2GB or 4GB or more)...until we dont change it by setting OS level parameter to increase the process size..Usually in OS like Solaris/Linux we get 4GB process size as well.
Now Lets take the default Process Size=2GB (Windows), Now As you have set the -Xmx512M, we can assume that rest of the memory 1536 Mb is available for Native codes.
(ProcessSize - HeapSize) = [Native (+) (2-3% OS related Memory)]
2048 MB - 512 MB = 1536 MB
MaxPermSize = (MaxHeapSize/3) ----Very Special Cases
MaxPermSize = (MaxHeapSize/4) ----Recommended
In your Case -Xmx and -XX:MaxPermSize bith are same ....That is the reason you are getting the OutOfMemory Error in Heap.
We should increase/tune the MaxPermSize when we deploy a very large application (like a WebApplication which uses many JSPs, or PageFlows/Portal framework etc.) in our Server.
What should be the exact setting of these parameters depends on the Environment /Applications etc...
But Just try -Xmx1024m -Xms1024m -XX:MaxPermSize256m
Another recommendation for fine tuning always keep (Xmx MaxHeapSize & Xms InitialHeapSize same).
http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)