1 / 33

Performance Tuning ColdFusion Before the JVM

Performance Tuning ColdFusion Before the JVM. Chris Peterson. Chris Peterson. Started ColdFusion development with version 4.5 express Background in SQL and network administration Started working full time for Alagad in January 2009. Objective.

Download Presentation

Performance Tuning ColdFusion Before the JVM

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Performance Tuning ColdFusionBefore the JVM Chris Peterson

  2. Chris Peterson • Started ColdFusion development with version 4.5 express • Background in SQL and network administration • Started working full time for Alagad in January 2009

  3. Objective Discuss a holistic approach to identifying performance issues with ColdFusion applications, using a variety of tools and server observation.

  4. Don’t waste time JVM tuning a lemon

  5. Identify the dominant consumer • Listen to what your server is trying to tell you. • Enable slow page logging. • Obtain and Analyze a heap dump. • Review memory utilization with VisualVM and the VisualGC plug-in. • Investigate method calls with HPJmeter • Capture a SQL trace during peak production site load.

  6. Listen to what your server is trying to tell you

  7. Reading the CPU graph • Green line = Total CPU utilization • Red line = Kernel / System usage • Green – Red = Application CPU usage • High kernel usage is often indicative of an I/O issue. • Waiting on I/O means your application code is not executing.

  8. Enable slow page logging • Enable slow page logging • Process the server.log file with findslow.cfm (at www.cfcode.net) to get a report on the most-often used slow templates.

  9. Obtain and analyze a heap dump • Obtain a heap dump • –XX:+HeapDumpOnOutOfMemoryError • VisualVM (Applications -> Heap Dump) • Review the heap dump in Netbeans or VisualVM

  10. VisualVM heap dump

  11. VisualVM Heap Dump (continued)

  12. VisualVM and VisualGC • Increase in ‘heap size after full GC’ each time is indicative of a memory leak.

  13. VisualGC output

  14. Review methods with HPJmeter • Capture method invocation data • -Xrunhprof:cpu=times,cutoff=0 • View metrics -> Method Call Count • View metrics -> Call Graph Tree (CPU) • Identify lingering objects (memory leaks) • -Xrunhprof:heap=all,cutoff=0 • View metrics -> Residual Objects (Count)

  15. Example of HPJmeter method count list

  16. HPJmeter Residual Objects (count)

  17. Example of HPJmeter Call Graph Tree

  18. Its not always about the code • Network latency • Overloaded disk resources • Poorly configured database • Web server configuration

  19. Identify Network Issues • Identify overloaded nic with task manager. • Identify host issues with ping or pathping. • Identify network connections with netstat –a, or using Free Extended Task Manager. • More detailed investigation can be done with managed routers, or tools like WireShark (formerly Ethereal) to capture and analyze all network traffic.

  20. Wireshark – packet listing

  21. Wireshark – packet detail

  22. Ports Open – Free Extended Task Manager

  23. Identify Overloaded Disk Resources

  24. Identify a poorly configured database • Capture a .trc file using SQL profiler with the ‘tuning’ profile selected • Run your .trc file through the database tuning advisor (available on SQL Standard or higher) and quickly locate database slow-downs, and even implement recommended fixes.

  25. Configure your SQL capture

  26. SQL trace in progress

  27. Starting the tuning advisor

  28. Tuning advisor in progress

  29. Database Tuning Advisor results

  30. In the end, it’s really all about user perception • Enable gzip compression of static site assets. • Combine CSS and JS files for faster loading. • Enable expiration tags for images, CSS, and javascript files for a future date. • Use a tool like ySlow to identify user-side issues. http://developer.yahoo.com/yslow/ • Testing with tools like Jmeter can help you get a better user perspective on site performance. http://jakarta.apache.org/jmeter/

  31. Review • Your Coldfusion server does not work in a vacuum. • Identify your dominant consumer first, and address each until acceptable performance is achieved. • Its not always about the code. • User perception is the final word in web site performance measurement.

  32. Links • VisualVM - https://visualvm.dev.java.net/download.html(visualGC available in the plugin center) • Netbeans - http://www.netbeans.org/downloads/index.html • HPJmeter – http://www.hp.com/java • Free Extended Task Manager - http://www.extensoft.com/

  33. Questions? • Chris Peterson, Server Engineer • Alagad, Inc. • http://www.alagad.com/ • cpeterson@alagad.com • (888) Alagad4 ext 369 • Override11 (twitter)

More Related