Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Java Performance Mistakes

20.959 Aufrufe

Veröffentlicht am

Too many database queries, too much data loaded into memory, overloaded html pages, bad architectural decisions, ...
These are all reasons why Java Applications are slow. In this presentation - first given at Boston Java Meetup - shows 6 real life examples on why Java-based Applications failed - and you may even heard about this in the news.

All examples and the technical details were captured using Dynatrace which is available as a 30 Day Free Trial - http://bit.ly/dttrial - with an option to extend it for another 180 Days in case you share some of your results with us

Veröffentlicht in: Ingenieurwesen, Software
  • I wanted to tell you about my experience with this breast enlargement guide. I'm 24 years old and I've spent pretty much my whole life wishing I had slightly larger breasts. I'm normally a size A, I'd love to be a size B, especially when I wear certain kinds of low cut tops. I have a good figure, and I like what I have, but every now and then I would like a little bit more. Well, it's actually working! There is a noticeable difference in the size of my breasts! It's only been 10 days, and they say that the true final results won't appear until about the 4-6 month time frame, but based on what I can see, there's definitely a difference. My breasts are standing out more, and they are fuller and rounder. Sometimes I am able to go out without a bra, now I can't. And I have a feeling that I might have to actually buy new bras if the growth continues. I'm looking forward to seeing how the next month goes. There might actually be a size B in my future! ✤✤✤ https://dwz1.cc/iZqgQnlK
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • boost your bust. increase your breast size by 2 cups, naturally and without surgery. ✱✱✱ https://t.cn/A6Li7BTH
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • Ich kann eine Website empfehlen. Er hat mir wirklich geholfen. ⇒ www.WritersHilfe.com ⇐ Zufrieden und beeindruckt.
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • Typical Example Of A Winning Week! [£746 Profit On DAY 1], ◆◆◆ https://bit.ly/30jWepO
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • See how I make over $7,293 a month from home doing REAL online jobs! ♣♣♣ http://scamcb.com/ezpayjobs/pdf
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier

Java Performance Mistakes

  1. Java Performance: Biggest Mistakes - More on http://blog.dynatrace.com - Dynatrace Free Trial: http://bit.ly/dttrial Andreas Grabner - @grabnerandi 1 @Dynatrace
  2. And this is where I am from 2 @Dynatrace
  3. 3 @Dynatrace
  4. 4 @Dynatrace
  5. Can you tell my age by looking at my first computer? 5 @Dynatrace
  6. That’s why I ended up talking about performance 6 @Dynatrace
  7. Nobody wants this … 7 @Dynatrace
  8. 8 @Dynatrace
  9. Nor this … 9 @Dynatrace
  10. 10 @Dynatrace
  11. As it leads to this … 11 @Dynatrace
  12. The “War Room” Facebook – December 2012 12 @Dynatrace
  13. And potentially to this … 13 @Dynatrace
  14. 14 @Dynatrace
  15. And this … 15 @Dynatrace
  16. 16 @Dynatrace
  17. And that’s why Business doesn’t like it either … 17 @Dynatrace
  18. YES we know this 80%Dev Time in Bug Fixing $60B Defect Costs BUT ~80% of problems caused by ~20% patterns 18 @Dynatrace
  19. 6 Situations on WHY this happened, HOW to avoid it 19 @Dynatrace
  20. 20 @Dynatrace
  21. “Blindly” (Re)use Existing Components 21 @Dynatrace
  22. Requirement: We need a report 22 @Dynatrace
  23. Using Hibernate results in 4k+ SQL Statements to display 3 items! Hibernate Executes 4k+ Statements Individual Execution VERY FAST But Total SUM takes 6s 23 @Dynatrace
  24. 24 @Dynatrace
  25. Not every Architect makes good decisions 25 @Dynatrace
  26. Project: Online Room Reservation System • Symptoms • HTML takes between 60 and 120s to render • High GC Time • Assumptions • Bad GC Tuning • Probably bad Database Performance as rendering was simple 26 @Dynatrace
  27. Developers built own monitoring void roomreservationReport(int roomid) { long startTime = System.currentTimeMillis(); Object data = loadDataForRoom(roomid); long dataLoadTime = System.currentTimeMillis() - startTime; generateReport(data, roomid); 27 @Dynatrace } Result: Avg. Data Load Time: 45s! DB Tool says: Avg. SQL Query: <1ms!
  28. #1: Loading too much data 24889! Calls to the Database API! High CPU and High Memory Usage to keep all data in Memory 28 @Dynatrace
  29. #2: On individual connections 12444! individual connections Classical N+1 Query Problem Individual SQL really <1ms 29 @Dynatrace
  30. #3: Putting all data in temp Hashtable Lots of time spent in Hashtable.get Called from their Entity Objects 30 @Dynatrace
  31. Lesson Learned • Custom Measuring • Was impacted by Garbage Collection • Just measured overall time but not # SQL Executions void roomreservationReport(int roomid) { long startTime = System.currentTimeMillis(); Object data = loadDataForRoom(roomid); long dataLoadTime = System.currentTimeMillis() - startTime; generateReport(data, roomid); } • Learn SQL and don’t use Hashtables as Workaround 31 @Dynatrace
  32. 32 @Dynatrace
  33. Implementation Flaws 33 @Dynatrace
  34. Business Impact requires Action! 34 @Dynatrace
  35. Solution: Cache to the RESCUE!! 35 @Dynatrace
  36. Implementation and Rollout Implemented InMemory Cache Worked well in Load Testing 36 @Dynatrace
  37. Result: Out of Memory Crashes!! Still crashes Fixed Version Deployed Problem fixed! 37 @Dynatrace
  38. 38 @Dynatrace
  39. Disconnected Teams 39 @Dynatrace
  40. “Teamwork” between Dev and Ops SEV1 Problem in Production Need access to log files Where are they? Can’t get them Need to increase log level Can’t do! Can’t change config files in prod! 40 @Dynatrace
  41. Solution: Implement a Custom “On Demand” Remote Logger 41 @Dynatrace
  42. Implementation and Rollout Implemented Custom Logger Worked well in Load Testing 42 @Dynatrace
  43. What happened? ~ 1Mio Lock Exceptions in 30 mins 43 @Dynatrace
  44. Root Cause: A special WebSphere Setting! Log Service provides a synchronized log file across Log Service provides a synchronized ALL JVMs log file across ALL JVMs 44 @Dynatrace
  45. 45 @Dynatrace
  46. “Deployment” Gone Bad! 46 @Dynatrace
  47. Test Environment Production Environment 8x slower 3x more SQL 47 @Dynatrace
  48. Test Environment Production Environment Hibernate, Hibernate, Classloading, XML – The Key Classloading, XML – The Key Hotspots I/O for Web Requests Hotspots doesn’t even show up! That’s Normal: Having I/O for Web Request as main contributor 48 @Dynatrace
  49. Top Contributor Class.getInterfaces Called from Hibernates FieldInterceptionHelper These calls all originate form thousands of calls to find item by code 49 @Dynatrace
  50. Top Methods related to XML Processing Classloading is triggered through CustomMonnkey and the Xalan CustomMonkey and the Xalan Parser 50 @Dynatrace
  51. 51 @Dynatrace
  52. #Push without a Plan 52 @Dynatrace
  53. Mobile Landing Page of Super Bowl Ad 434 Resources in total on that page: 230 JPEGs, 75 PNGs, 50 GIFs, … Total size of ~ 20MB 53 @Dynatrace
  54. Fifa.com during Worldcup http://apmblog.compuware.com/2014/05/21/is-the-fifa-world-cup-website-ready-for-the-tournament/ 54 @Dynatrace
  55. Waiting for Bug Reports 55 @Dynatrace
  56. Look behind the scenes 56 @Dynatrace
  57. 57 @Dynatrace
  58. Performance Clinic: Bring Your Own App When: Thursday, December 18th Lunch Session: NOON – 3PM After Work Session: 4PM – 7PM Where: Dynatrace Office 404 Wyman Street, Waltham Register: http://bit.ly/onlineperfclinic 58 @Dynatrace
  59. Quick Demo 59 @Dynatrace
  60. 30 Days Dynatrace Free Trial • Get it here: http://bit.ly/dttrial • YouTube Tutorials: http://bit.ly/dttutorials • Live Q&A Sessions: http://bit.ly/onlineperfclinic • Contact me: agrabner@dynatrace.com - @grabnerandi •Special Offer: • SaaS VIP Program: http://bit.ly/dtaasvip 60 @Dynatrace
  61. Andreas Grabner Dynatrace Developer Advocate @grabnerandi http://blog.dynatrace.com 61 @Dynatrace

×