How should I initially set request tuning for CF 9 Enterprise w 16G Ram?

Posted on 2009-12-22
Last Modified: 2013-12-24
I am setting up a new 64bit Win 2008 server with 16G of RAM, also CF Enterprise 9.

This is my first time with 64 bit windows and enterprise CF (64bit also).  I'd like some recommendations for the initial request tuning, with the understanding that adjustments will need to be made as time goes on, based on usage.  The current request settings are included in an attached screenshot.

Our application produces many pdfs, Excel worksheets and other export formats for reports and is sometimes database intensive, but is not exclusively so.  In addition, a frequent task the application must do is to produce static maps for inclusion into the pdf documents.  For these tasks, the server must wait for the map server to generate images for inclusion into the pdf document.

I won't be able to afford to hire out to do load testing, so would like to start with a best guess as to how the CF server should be configured.

SEE basic info for server and CF in attached screenshots.
Question by:akibasho
    LVL 9

    Expert Comment

    It's bascially impossible to just throw out a 'best guess' based on the information you have provided - however, I can throw some suggestions your way.  Tuning an application server is much like tuning a car - you may start with some template fuel mapping... but depending on how, where, and who is doing the driving... they usually need to 'evolve' over time.

    For many of these settings - it's entirely dependent on how your application is configured and what demands are placed on it (and from where).  For example, are you doing a great deal of AJAX implementations in your application?  If so then you will want to increase the Max Web Service requests or CFC Function requests value - on the other hand, if you are doing none of these and do not even have remotely accessable CFC's or WS's - then you could even cut them down to 4-5 from the 30 default.  I would definitely increase the queued and running JRun threads value - but not by too much at first.  See if making them 150 and 1500 gives you a better level of performance with PDF generation.  At first I'd stick with the 1:10 ratio... but since you will have potential queueing demands due to the external mapping server requirement... you might want to try a higher one (maybe 150/3000) and see if that helps much.

    The simultaneous user requests deals more with server load... if the server is doing a great deal of work behind the scenes, but you still only actually have 100 users hitting the server at any one time.. then 30 is probably overkill - however since your server can process as many as 16 concurrent threads (in hardware at least, not counting OS overhead, etc..) you could probably set this value as high as 64 or 128 and still be in good shape - unless the server is also pulling double duty as a SQL server or something... in which case, limiting it to 16 might be better.

    Also, in my experience at least, I've found that the tuning settings of CF are generally less impactful than tuning the host OS to better allocate it's resources.  Since you're running Windows - make sure that the site settings are tuned to optimal for your deployment/organization.  Try elevating the process level of the ColdFusion Web Server service to a higher priority.  Also if your server has more than one major application it needs to deal with - try dedicating cores to each and see if that helps.  (On that last one, I'm not sure if that's still helpful in 2008/R2 - I know it was a big help back in the Server2000 days).

    I would definitely (in your case) try upping the Report threads to 16, 24, 32 - and see if you get a big improvement in PDF creation speeds.  If you aren't using CFTHREAD - then changing it won't matter, but if you are, try making it 16 or even 64 - I think the defaults are assuming a dual single-core CPU server - so it's expecting 20 as a max because it's 10X the number of physically simultaneous threads that the server can handle.  Yours can handle 16 or close to it, so potentially you could set it to 160 and see the same performance that the default settings would show on a dual P3 server (if it were clocked at the same 2.4GHz that your Xeons run at of course!).

    I find the key to successful tuning is usually making small incremental changes and then examing a singular metric.  If you are looking to increase a particular reports speed... then time it 5X - take the average - then change a setting you think should improve it.  If it gets faster, try a little more - if it gets slower, try a little less - if nothing happens at all... then set it back to default and think about what other bottlenecks may exist to it's creation.

    If the biggest problem is waiting for maps - upgrading that may provide 200% more improvement than would even be possible with 200 hours of tuning on your CF server.  I've spent hours and hours trying to figure out how to make a slow server faster via software settings - only to discover that the CF-to-SQL network connection was accidentally plugged into a 100MBit port instead of a GBE port.

    Sorry that this doesn't really help you all that much, but I can't really hope to make a good suggestion without knowing all of the code that is going to be run, how often each section of it runs and for how many users, how congested the datacenter backbones are, what other competing network services are running concurrently, etc. etc..

    I would make one final recommendation - tuning the CF server is about .00001% as important and impactful as tuing you application code.  If there is any possibility to write your code in a way that processes faster or avoids unnecessary dependency on external resources - then fixing and optimizing that will DEFINITELY make a marked improvement that the users will see... server tuning it pretty much only a last ditch effort to squeeze those last few ROI dollars out before the next hardware acquisition.  IMHO of course - others will see things differently perhaps.

    Accepted Solution

    The code is already optimized, and I have decided to just monitor the server resources based on peak usage times, and adjust accordingly.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    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…
    Article by: kevp75
    Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
    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…
    This video discusses moving either the default database or any database to a new volume.

    758 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

    11 Experts available now in Live!

    Get 1:1 Help Now