Performance Tuning ColdFusion Before the JVM - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

Performance Tuning ColdFusion Before the JVM

Description:

Review memory utilization with VisualVM and the VisualGC plug-in. ... Green line = Total CPU utilization. Red line = Kernel / System usage ... – PowerPoint PPT presentation

Number of Views:212
Avg rating:3.0/5.0
Slides: 34
Provided by: Liz266
Category:

less

Transcript and Presenter's Notes

Title: Performance Tuning ColdFusion Before the JVM


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
Dont 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
  • XXHeapDumpOnOutOfMemoryError
  • VisualVM (Applications -gt 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
  • -Xrunhprofcputimes,cutoff0
  • View metrics -gt Method Call Count
  • View metrics -gt Call Graph Tree (CPU)
  • Identify lingering objects (memory leaks)
  • -Xrunhprofheapall,cutoff0
  • View metrics -gt 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, its 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_at_alagad.com
  • (888) Alagad4 ext 369
  • Override11 (twitter)
Write a Comment
User Comments (0)
About PowerShow.com