Tips for tuning Cold Fusion

Posted on 2006-05-10
Last Modified: 2013-12-24
I am running ColdFusion MX  Version  7,0,1,116466 Standard Edition on a Windows 2003 server.  We primarily use it as a reporting and charting tool that queries a SQL 2000 server also running Windows 2003.  The CF queries are pretty large, can anyone suggest tweaks to the default configuration to fully maximize the server's hardware potential.  Below is our current config.


General Settings  
Simultaneous request limit  50    
Timeout requests  No    
Request Time Limit  90 seconds  
Use UUID for CFToken  No    
Enable Whitespace Management  Yes    
Missing Template Handler    
Site-wide Error Handler    
Enable HTTP status codes  Yes    
Enable Global Script Protection  Yes    
Default CFForm ScriptSrc Directory  /CFIDE/scripts/    
Maximum size of post data  500 MB  
Maximum number of report threads  10    
Request Throttle Threshold  2 MB  
Request Throttle Memory  200 MB  
Template cache size  1024 templates  
Enable trusted cache  No    
Cached query limit  100  
Save Class Files  Yes    
Cache web server paths  No  
Client Variable Settings  
Default client variable store  Cookie    
Purge Interval  1 hours 7 minutes    
Client Stores  
Type  COOKIE    
Description  Client based text file.    
Purge data after time limit  Yes    
Time limit  10 days  
Disable global updates  No    
Type  REGISTRY    
Description  System registry.    
Purge data after time limit  Yes    
Time limit  90 days  
Disable global updates  No    
Memory Variables  
J2EE Sessions  No    
Application Variables  
Enable Application Variables  Yes    
Default Timeout  0,2,0,0    
Maximum Timeout  0,4,0,0    
Session Variables
Enable session variables  Yes    
Default Timeout  0,2,0,0    
Maximum Timeout  0,2,0,0    
ColdFusion Mappings  
/CFIDE    C:\Inetpub\wwwroot\CFIDE    
/gateway    C:\CFusionMX7\gateway\cfc    
Mail Connection Settings  
Default Server Port  2525    
Connection Timeout  60 seconds  
Spool Interval  15 seconds  
Mail Delivery Threads  10    
Maintain Connection to Mail Server  No    
Messages Spooled to Memory  50000    
Default CFMail Charset  UTF-8    

Java and JVM  
Java virtual machine path  C:/CFusionMX7/runtime/jre    
Initial memory size  MB  
Maximum memory size  512 MB  
Class path  -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{application.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/cfform/jars    
JVM arguments  -server -XX:MaxPermSize=128m -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib    

Debugging Settings  
Enable debugging  No    
Enable Robust Exception Information  Yes    
Display format  classic.cfm    
Execution times  Yes    
Execution time format  summary    
Execution time highlight threshold  250 ms  
Database activity  Yes    
Exception information  Yes    
Tracing information  Yes    
Timer Information  No    
Variables  Yes    
Application  No    
CGI  Yes    
Client  Yes    
Cookie  Yes    
Form  Yes    
Request  No    
Server  No    
Session  Yes    
URL  Yes    
Debugging IP Addresses  
Debugging IP Address Restrictions    
Logging Settings  
Log directory  C:\CFusionMX7\logs    
Maximum file size  5000 kb  
Maximum number of archives  10    
Log slow pages  No    
Slow page time limit  30 seconds  
Log CORBA calls  No    
Log scheduled tasks  No    
Question by:mnmorency
    LVL 35

    Accepted Solution

    If you parameterize your queries then they will be mostly cahched and run faster.  If there are no parameters at all from user input then cache the whole query.
    LVL 3

    Assisted Solution

    if the sql in the same machine it will be LOT faster.
    also can break it into a few smaller query will also help
    and increase in memmory will increase SQL server speed a lot

    hope can help
    LVL 35

    Expert Comment

    If it is on the same machine then it is worse security.  Don't do that if you can help it.

    Also do NOT break into smaller queries - the overhead is in connecting to the database server - NOT in the number of records being processed.

    Author Comment

    Both machines are on a GB switch and Windows network monitoring (task manager) shows low utilization.  All CF pages and queries seem slow, any other suggestions for improvement?
    LVL 35

    Expert Comment

    Youneed to rung some tests to determine what is causing the slowness.  For example you can turn on debug output on the cf page and see which portion of the page is taking the time up.
    LVL 12

    Assisted Solution


    Unfortunately there is not a one size fits all answer any of us can give you, only hints on wht to change. Becuase code, hardware, data load, network infrastructure, JVM settings can all play a part in performance its really up to you to do your load testing and tweak settings until you get everything set up properly.

    From you information above I can say this:

    Your simultaneous requests as a rule of thumb should be 4-6 per CPU
    Move your client variable store to a database
    Tune your maxpermsize of the JVM to suit your RAM, bear in mind that you have other programs and an operating system there too.
    If you are using a dual processor box, try -XX:+UseParallelGC in the JVM args.

    You have given us the CF and JVM setup, and asked "to fully maximize the server's hardware" but given us no information on what hardwar you have. RAM, CPU and speed, clustered???

    For lots more info check out the pdf at

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
    Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now