2009/11/19

Devoxx 2009: The not so Dark Art of Performance Tuning

19/11/2009, Kirk Pepperdine & Dan Hardiker
  • loadtest <> stresstest:
    • loadtest: test user experience
    • stresstest: find when the application breaks
  • performance anti-patterns & solutions:
    • lack of stress testing → introduce a stress test harness
      • repeatable test
      • control load
    • shot in the dark: fix ugly code
      • ugly code runs just fine
      • measure, don't guess!
  • Apache JMeter → root node: “Test Plan”
      • Thread Group
        • set looping / # threads
      • HTTP Request
        • → variables: ${var}
          • defeat cache
          • vary testdata
      • Timer child for think-time→ e.g. Uniform Random Timer
      • aggregate report
      • view results tree → captures data of requests: e.g. don't measure 404 errors
  • understand the environment, identify dominating consumer → look at the full system
    • actors: usage patterns
    • application
      • locks
      • external systems
    • jvm/os
      • memory
      • hardware management
      • tools e.g.:
        • vmstat on hpux
        • jps
        • jstack
        • visual vm (thread and heap dumps)
    • hardware
      • cpu
      • memory
      • disk I/O
      • network
  • response time budgets:
    • detail the time of the different components → add customizable time measures
      • database
      • application server
      • client
  • common problems, demo's:
    • poor response times, low cpu
      • thread pools
      • locks
      • VisualVM, thread dump + plugin thread dump analyzer, identify lock
Post a Comment