SlideShare a Scribd company logo
Low Hanging Fruits in Optimizing J EE Performance Alois Reitbauer,  dyna Trace Software
1 n . . . Servlet Threads CPU 1 n . . . DB Conn. What‘s inside ?
a sample application architecture … …  and common performance pitfalls O/R Access Rendering State Handling Latency Data Volume Comm. Behavior JavaScript Data Volume Comm. Behavior Memory and GC Memory and GC
What contributes to  overall performance? Network Rendering Serialization Memory Usage Database Access
Remoting
Application Developers View Remote Communication How it  works Client Application Stub Serialization Client Infrastructure Server Application Facade Deserialisation Server Infrastructure Networking Networking
Remote Communication What can go  wrong
Avoid Protocol Overhead Reduce Interactions Create Data Locality Adjust Interfaces
Database
… looking  inside  Database Access Application Code Connection   Pool Connection Result Set Application SQL TCP/IP Database O/R   Mapping Layer Caching Layer Statement Connection Prepared Statement Prepared Statement . . .
Caching  in the DB Layer Persistence Framework JDBC Layer Database Execution Plan Cache Prepared Statement Cache Cross Session Cache Session Caches Query Cache(s)
Reduce DB Calls Tune Loading Behavior Optimize for caching Define Proper Entities select  …  from  a,b,c select  …  from  b,c,a …  join fetch ….
Web/AJAX
Web and AJAX What can go  wrong Browser Server JavaScript Performance HTML Rendering Many AJAX/HTTP calls High Latency High Datavolume Thread-/ Connectionpools Network Database Access WebService/ Backend Calls Browser Browser
Caching  on the Web Clients Server Cache per Client Server providing Caching Information Proxy Cache for Many Clients Serverside  Data Cache
Reduce Files Use Caching Headers Compress Content Reduce State Date Expires E-Tag .js, css, png, …
Memory
Memory Management What can go  wrong Short Lived Object  in Tenured Space Large Temporary Object Complex Object Model
GC Configuration
Optimize Allocations Reduce Session Size Minimize GC Impact
alois.reitbauer@dynatrace.com  Mail blog.dynatrace.com  Blog AloisReitbauer  Twitter

More Related Content

Low Hanging Fruits In J EE Performance

  • 1. Low Hanging Fruits in Optimizing J EE Performance Alois Reitbauer, dyna Trace Software
  • 2. 1 n . . . Servlet Threads CPU 1 n . . . DB Conn. What‘s inside ?
  • 3. a sample application architecture … … and common performance pitfalls O/R Access Rendering State Handling Latency Data Volume Comm. Behavior JavaScript Data Volume Comm. Behavior Memory and GC Memory and GC
  • 4. What contributes to overall performance? Network Rendering Serialization Memory Usage Database Access
  • 6. Application Developers View Remote Communication How it works Client Application Stub Serialization Client Infrastructure Server Application Facade Deserialisation Server Infrastructure Networking Networking
  • 8. Avoid Protocol Overhead Reduce Interactions Create Data Locality Adjust Interfaces
  • 10. … looking inside Database Access Application Code Connection Pool Connection Result Set Application SQL TCP/IP Database O/R Mapping Layer Caching Layer Statement Connection Prepared Statement Prepared Statement . . .
  • 11. Caching in the DB Layer Persistence Framework JDBC Layer Database Execution Plan Cache Prepared Statement Cache Cross Session Cache Session Caches Query Cache(s)
  • 12. Reduce DB Calls Tune Loading Behavior Optimize for caching Define Proper Entities select … from a,b,c select … from b,c,a … join fetch ….
  • 14. Web and AJAX What can go wrong Browser Server JavaScript Performance HTML Rendering Many AJAX/HTTP calls High Latency High Datavolume Thread-/ Connectionpools Network Database Access WebService/ Backend Calls Browser Browser
  • 15. Caching on the Web Clients Server Cache per Client Server providing Caching Information Proxy Cache for Many Clients Serverside Data Cache
  • 16. Reduce Files Use Caching Headers Compress Content Reduce State Date Expires E-Tag .js, css, png, …
  • 18. Memory Management What can go wrong Short Lived Object in Tenured Space Large Temporary Object Complex Object Model
  • 20. Optimize Allocations Reduce Session Size Minimize GC Impact
  • 21. alois.reitbauer@dynatrace.com Mail blog.dynatrace.com Blog AloisReitbauer Twitter