Tuesday 30 October 2012

MEMORY LEAKAGE IN WAS


     MEMORY LEAKAGE IN WAS  

----> Memory leakage issue is in Native code (Process logs) (or) 

          NativeStd.out, NativeStderr.log 

-----> For this issue  we need to get Heap Dump and analyse the dumps for any memory issues


-----> If we got any issue we need to ask developers to fix this issue/problem.


-----> For Temporary purpose we can increase Heap Dump.





Q)  What is the maximum heap size and how you are going to set maximum heap size ?



A) ----> The maximum heap size is depends on your ram memory
usually its 1/4th of ram size


----> Maximum heap size for 32 bit is 2GB and 64 bit is unlimited
                                 (OR)

Q)   if we give heap size value min=max at that time what are the advantages and disadvantages ?

A)   if Max heap = min heap then it takes a time for garbage collection .



Q) How to generate thread dump and heap dump ?

A)  kill -3 only heapdump
      kill -4 heapdump and java cores(thread dump)



HEAP DUMP : 

----> It is used when sufficient memory is not available for a new object

----> If generates dump of all live objects that are on the Java Heap.

----> By default we get OutOfMemoryErrors because of JVM  crashes. HeapDump is created in <Profileroot> directory when OutOfMemoryErrorException is thrown

-----> It shows all the information about referenced & unreferenced objects.
                                      (OR)

---->Memory allocated for a JVM Process where the application is deployed in order to load objects of the application into the memory.
----> Size depends on the objects of the application.



THREAD DUMP : 

----> It provides detailed information of all active JavaThreads.

----> It is used to know how many threads are there in ConnectionPool 

-----> How many threads are there in DeadLock state 

-----> If this deadlock threads will not cleared by administrator then we can raise a PROBLEM MANAGEMENT REPORT/RECORD and send it to IBM Engineers.



Q) How to generate the ThreadDmp?

A) There is two ways to generate thread dumps in linux

  1. kill -3 pid(process id of jvm) ,but the thing is you will get both heap dumps and thread dumps as one file. If you want to do individually then the following one


2. go to profile bin and execute command as WSADMIN then enter the below one
$ Admin Control invoke $JVM dump Threads(case sensitive )




Q)   How to generate a heap dump and what is the default location of heap dump and what is the format ?

A)   ---> Get the pid of the JVM (either from logs directory) or do a ps-ef |grep 
       ---> Then by using the pid   kill -3 
       ---> Heap dumps location generally in the logs folder.
       ---->Or you can change the location by getting into the admin console.


Q) How to enable automated Heap Dump in was ?

A)  STEP 1 : Click Servers > Application servers in the administrative console navigation tree.
      STEP 2 : Click server_name >Runtime Performance Advisor Configuration.
      STEP 3 : Click the Runtime tab.
      STEP 4 : Select the Enable automatic heap dump collection check box.
      STEP 5 :  Click OK.

0 comments:

Post a Comment