際際滷

際際滷Share a Scribd company logo
You got an OutofMemoryException,
            now what?
           Andres Olarte
           Nick Rodriguez




4/16/10
Iden%fying	
 the	
 problem	
 

    Memory	
 related	
 problems	
 
    Performance	
 issues	
 
    Stability	
 issues	
 
    Frontend	
 vs.	
 backend	
 issues	
 
    Tools	
 to	
 examine	
 the	
 system	
 
             JMX	
 
             Logs	
 


4/16/10
Crea%ng	
 a	
 baseline	
 

    Simula%ng	
 tra鍖c	
 
             Using	
 access	
 logs	
 as	
 test	
 base	
 
    Examining	
 the	
 memory	
 usage	
 
    Crea%ng	
 reproducible	
 tests	
 
             Tools	
 for	
 the	
 job	
 
             Comparing	
 results	
 




4/16/10
Understanding	
 the	
 System	
 

    Java	
 memory	
 management	
 
             Garbage	
 collec%on	
 
    Memory	
 u%liza%on	
 in	
 dotCMS	
 
    Database	
 usage	
 in	
 dotCMS	
 
    Common	
 boKlenecks	
 




4/16/10
Memory	
 issues	
 

    JVM	
 memory	
 con鍖gura%on	
 
    Cache	
 con鍖gura%on	
 
             Regions	
 and	
 their	
 sizes	
 
             Time	
 to	
 live	
 
    Per	
 request	
 memory	
 usage	
 
    Per	
 session	
 memory	
 usage	
 



4/16/10
Performance	
 issues	
 

    Per	
 page	
 performance	
 
    System-足wide	
 performance	
 
             Garbage	
 collec%on	
 
             hKp	
 vs	
 hKps	
 
    Resource	
 u%liza%on	
 
             Database	
 connec%ons	
 
             Client	
 connec%ons	
 



4/16/10
Best	
 prac%ces	
 

    Assign	
 as	
 much	
 memory	
 as	
 possible	
 
    Use	
 as	
 liKle	
 memory	
 as	
 possible	
 
    Limit	
 the	
 amount	
 of	
 data	
 used	
 per	
 page	
 
    If	
 benchmarking,	
 change	
 one	
 variable	
 at	
 a	
 
      %me	
 	
 




4/16/10
Thank you!!




4/16/10

More Related Content

Out ofmemory

  • 1. You got an OutofMemoryException, now what? Andres Olarte Nick Rodriguez 4/16/10
  • 2. Iden%fying the problem Memory related problems Performance issues Stability issues Frontend vs. backend issues Tools to examine the system JMX Logs 4/16/10
  • 3. Crea%ng a baseline Simula%ng tra鍖c Using access logs as test base Examining the memory usage Crea%ng reproducible tests Tools for the job Comparing results 4/16/10
  • 4. Understanding the System Java memory management Garbage collec%on Memory u%liza%on in dotCMS Database usage in dotCMS Common boKlenecks 4/16/10
  • 5. Memory issues JVM memory con鍖gura%on Cache con鍖gura%on Regions and their sizes Time to live Per request memory usage Per session memory usage 4/16/10
  • 6. Performance issues Per page performance System-足wide performance Garbage collec%on hKp vs hKps Resource u%liza%on Database connec%ons Client connec%ons 4/16/10
  • 7. Best prac%ces Assign as much memory as possible Use as liKle memory as possible Limit the amount of data used per page If benchmarking, change one variable at a %me 4/16/10