Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Low Hanging Fruits In J EE Performance


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Low Hanging Fruits In J EE Performance

  1. 1. Low Hanging Fruits in Optimizing J EE Performance Alois Reitbauer, dyna Trace Software
  2. 2. 1 n . . . Servlet Threads CPU 1 n . . . DB Conn. What‘s inside ?
  3. 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. 4. What contributes to overall performance? Network Rendering Serialization Memory Usage Database Access
  5. 5. Remoting
  6. 6. Application Developers View Remote Communication How it works Client Application Stub Serialization Client Infrastructure Server Application Facade Deserialisation Server Infrastructure Networking Networking
  7. 7. Remote Communication What can go wrong
  8. 8. Avoid Protocol Overhead Reduce Interactions Create Data Locality Adjust Interfaces
  9. 9. Database
  10. 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. 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. 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 ….
  13. 13. Web/AJAX
  14. 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. 15. Caching on the Web Clients Server Cache per Client Server providing Caching Information Proxy Cache for Many Clients Serverside Data Cache
  16. 16. Reduce Files Use Caching Headers Compress Content Reduce State Date Expires E-Tag .js, css, png, …
  17. 17. Memory
  18. 18. Memory Management What can go wrong Short Lived Object in Tenured Space Large Temporary Object Complex Object Model
  19. 19. GC Configuration
  20. 20. Optimize Allocations Reduce Session Size Minimize GC Impact
  21. 21. Mail Blog AloisReitbauer Twitter