Presentation is loading. Please wait.

Presentation is loading. Please wait.

Www.cfunited.com Performance Tuning ColdFusion Before the JVM Chris Peterson.

Similar presentations


Presentation on theme: "Www.cfunited.com Performance Tuning ColdFusion Before the JVM Chris Peterson."— Presentation transcript:

1 www.cfunited.com Performance Tuning ColdFusion Before the JVM Chris Peterson

2 2www.cfunited.com Chris Peterson A.Started ColdFusion development with version 4.5 express B.Background in SQL and network administration C.Started working full time for Alagad in January 2009

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

4 4www.cfunited.com Don’t waste time JVM tuning a lemon

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

6 6www.cfunited.com Listen to what your server is trying to tell you

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

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

9 9www.cfunited.com Obtain and analyze a heap dump A.Obtain a heap dump  –XX:+HeapDumpOnOutOfMemoryError  VisualVM (Applications -> Heap Dump) B.Review the heap dump in Netbeans or VisualVM

10 10www.cfunited.com VisualVM heap dump

11 11www.cfunited.com VisualVM Heap Dump (continued)

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

13 13www.cfunited.com VisualGC output

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

15 15www.cfunited.com Example of HPJmeter method count list

16 16www.cfunited.com HPJmeter Residual Objects (count)

17 17www.cfunited.com Example of HPJmeter Call Graph Tree

18 18www.cfunited.com Its not always about the code A.Network latency B.Overloaded disk resources C.Poorly configured database D.Web server configuration

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

20 20www.cfunited.com Wireshark – packet listing

21 21www.cfunited.com Wireshark – packet detail

22 22www.cfunited.com Ports Open – Free Extended Task Manager

23 23www.cfunited.com Identify Overloaded Disk Resources

24 24www.cfunited.com Identify a poorly configured database A.Capture a.trc file using SQL profiler with the ‘tuning’ profile selected B.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 25www.cfunited.com Configure your SQL capture

26 26www.cfunited.com SQL trace in progress

27 27www.cfunited.com Starting the tuning advisor

28 28www.cfunited.com Tuning advisor in progress

29 29www.cfunited.com Database Tuning Advisor results

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

31 31www.cfunited.com ReviewReview A.Your Coldfusion server does not work in a vacuum. B.Identify your dominant consumer first, and address each until acceptable performance is achieved. C.Its not always about the code. D.User perception is the final word in web site performance measurement.

32 32www.cfunited.com LinksLinks A.VisualVM - https://visualvm.dev.java.net/download.html (visualGC available in the plugin center) https://visualvm.dev.java.net/download.html B.Netbeans - http://www.netbeans.org/downloads/index.ht ml http://www.netbeans.org/downloads/index.ht ml C.HPJmeter – http://www.hp.com/javahttp://www.hp.com/java D.Free Extended Task Manager - http://www.extensoft.com/ http://www.extensoft.com/

33 33www.cfunited.com Questions?Questions? A.Chris Peterson, Server Engineer B.Alagad, Inc. C.http://www.alagad.com/http://www.alagad.com/ D.cpeterson@alagad.comcpeterson@alagad.com E.(888) Alagad4 ext 369 F.Override11 (twitter)


Download ppt "Www.cfunited.com Performance Tuning ColdFusion Before the JVM Chris Peterson."

Similar presentations


Ads by Google