Thursday, July 17, 2008

Finetune ColdFusion Server Performance

Let me just put across some terminologies before I present my thoughts on improving/fine tuning the ColdFusion Server performance.

Request Wait Time
The number of milliseconds that a request was waiting in the queue before starting to execute.

Requests Running
The number of request currently under execution by server.

Request Execution Time
The number of milliseconds that a request took to execute on server.

Requests Queued
The number of queued requests that are waiting to be processed.

Keeping all the above terms in consideration the Response time could roughly be calculated as below...

HTTP Response time / PageLoad Time = "Webserver trip time for Browser and Application Server" + "Request Wait Time" + "HTTP Request Execution Time on Application Server"

Now, Before we move on let us know what different kind of requests ColdFusion server can handle.

What Kind of Requests can ColdFusion Server accept via HTTP ?

Currently with ColdFusion8, it accepts 4 kinds of requests via HTTP
1. CFML Template requests
2. Flash Remoting requests
3. WebService requests
4. CFC function requests

Each of the above 4 type of HTTP requests can be moderated for simultaneous request execution from "CFAdmin->ServerSettings->Request Tuning". So Next question here could be asked is, What should be the limit for each one of the above 4 ?

It depends, what kind of Applications are deployed on the ColdFusion server. One need to find out, which of the above 4 techniques are hugely used in the deployed Applications.

--> Traditionally ColdFusion Application generally uses CFML template Requests, so in this case increase the CFML template request accordingly.

--> With Flex/AIR technologies gaining momentum, a lot many Flash Remoting Calls could be coming into the server, so in this case it would make sense to increase the Flash Remoting Request Limit.

--> Likewise, if your application is hugely using CF WebService / CFC function requests then it would make sense to increase "webservice" and "CFC" request limits respectively.

ColdFusion uses JRun as underlying J2EE application server to run on. Here JRun is the master server which can control the simultaneous request execution limit. So Coldfusion has to respect this limit in order to moderate the simultaneous running request for the above 4 types of HTTP request, Meaning....... "Maximum number of running JRun threads Limit must be, greater than Simultaneous ( CFML Template + Flash Remoting + WebService + CFC ) Limits"
For example say,

CFML Template requests --> 20
Flash Remoting requests --> 20
WebService requests --> 10
CFC function requests --> 20
Total --> 70

so, "Maximum number of running JRUN threads" must be greater than 70. If the value "Maximum Run Threads" is changed, then ColdFusion server needs to be restarted for the change to take effect

By how much we should/can increase the Request limits or What should be the threshold for Request Limits ? OR How to do the performance fine tuning for ColdFusion server ?

There is no standard formula to determine the thresholds. It depends on the machine/hardware capabilities on which the ColdFusion is deployed. Powerful the hardware(processor and memory), higher could be the threshold for each of those request limits. So how do you determine it?....It could be done by a trial and error method as mentioned below.

--> If the "Sum of (CFML+Flash+webService+CFC) Requests Running" value nearly matches the value of the "Maximum number of running JRUN threads" property, and also if the Requests Queued is large, and IF CPU USAGE IS LOW, you can increase the threshold for "CFML,Flash,webservice,CFC" and accordingly for "Maximum number of running JRUN threads".

Try this method starting with lower threshold values and keep increasing them until CPU usage is not underutilized. you would be able to determine the ideal load handling capabilities of your hardware by trying this method.

Note: The value of the "Maximum Running Run Threads" can significantly influence the scalability of your Web applications and the performance of your server.

So this trial and error approach to determine the threshold should be first tried on a similar configuration machine in development environment and then once you get your ideal threshold, same can be applied to ColdFusion server in production.

Ideally, the "Requests Queued" should remain close to zero; however, they can vary under varying loads (depending on the application) while the server still provides good performance.

If these numbers vary too much from their expected range, you might want to take Server Monitoring help to find out which portion of your code is taking too much time and accordingly might want to rewrite that portion of code to make it efficient.

If the queue size and wait time increases, or if the queue limit is reached, browser displays the HTTP error message "500/Server Too Busy".


Anonymous said...

Hey, I'm glad to see you blogging. It's great to get insight from people "on the inside". :)

Keep up the good info.

John Bliss said...

Sorry: where do I set "Maximum number of running JRun threads Limit?"

Jayesh Viradiya said...

HI Bliss,
This setting could be accessed on the "CFAdministrator > Server Settings > Request Tuning > JRun Master Request Limits"

mike said...

south carolina prison inmate search
green county jail
interagency access pass
cfs ii
inmate lookup rikers
kentucky department of corrections inmate search
blue mouse theater
corrections jobs
carbon auto theft 2
san bernardino sheriff department
find a inmate
san diego inmate search

Archie Pavia said...

It is very informative. i like your blog very much it's a great to comment on your way. Thanks a lot for the informative article. -- EMERSON THEATER

SteveBrad said...

It's always my pleasure to read this type of stuff.I am very much interested in these types of topics and it's my habit to read this.
Generic Viagra
Buy Generic Viagra

Unknown said...

Thank you for the great article I did enjoyed reading it, I will be sure to
bookmark your blog and definitely will come back from again.
I want to encourage that you continue your great job, have a good day

north london business oppotunities
london business group

Unknown said...

Nice article you got here. It would be great to read more about this theme. The only thing it would also be great to see on this blog is some pictures of any gizmos.

feather flag
flag banner
custom flag banners

Unknown said...

Thank you for the great article I did enjoyed reading it, I will be sure to
bookmark your blog and definitely will come back from again.
I want to encourage that you continue your great job, have a good day

north london business oppotunities
london business group
london nwtworking groups
london business networking

Unknown said...
This comment has been removed by the author.
Unknown said...

It is great to observe somebody put enough craze towards a matter. I'm thankful that I stumbled upon this process. I am lucky I used the time to read on past the 1st paragraph. You have got a whole lot to say, very much to offer. I really hope guys understand this and look into your page.

safety deposit box
bank safety deposit boxes
mailbox post
residential mailboxes
gold bar for sale

Unknown said...

I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading what you all have to say

real estate law
how to buy a house
first time home buyer programs

golf stayz said...

Your article is extremely impressive. I never considered that it was feasible to
accomplish something like that until after I looked over your post .

فروشگاه کتاب
فروش کتاب
خرید کتاب
خرید اینترنتی کتاب
فروش اینترنتی کتاب
خرید کتاب اینترنتی
فروشگاه اینترنتی کتاب
فروش کتاب اینترنتی

Unknown said...

Nice post. It would be great to read more about this theme .

safe investment
forex investment
managed accounts
forex managed account
managed account
forex managed
pamm account

Anonymous said...

If you're getting ready to complete your thesis at a university, selecting a top quality piece of writing service is important to your success. Thesis piece of writing could be best essay writing service a sensitive project and may be appointed to the highest service supplier you'll notice. The subsequent article offers a straightforward method for locating a top quality thesis piece of writing service on-line.

foride88 said...

Without theory for a minute time moreover you can demand help with article. The piece columnists working with these associations merge their experience and authority with their understanding so they can make a quality paper for you. professional essay writing services

Anonymous said...

The bank thought is sometimes typically your being assured that or perhaps a account. Merely embody for your press on a spree at the side of your proof of revenue, your most up-to-date ancient typical commonplace bank affirmation so you current state icon we have a tendency to tend to. N. or even passport. the actual Salary payday loans day and Size loan could be a fantastic product in addition to product and services which will permits quite few persons daily. Anytime emergencies occur, glimpse notice people.

Unknown said...

Are you enduring verifiable earnings? If you happen to taken care of straightaway on the style facet any doubt therefore you'll each the of those troubles then you'll be eligible for obtaining some fairly chanced on Mortgage apply u. s. of America day money enhancements. For people who have obtaining some fairly bank-account the item can modify you to contain u. s. of America all debit obligations from the thought simply just merely simply just in case a investigate happens. Or maybe, simply just merely simply just in case you select on payday loans direct lender , you'll visit our entire firm most adjacent a personal and you'll facilitate to create your register funds. Monthly a personal could take however you would like that have investigated obtaining been prepared.

Unknown said...

Subsequent, demand level of privacy web site to verify likely immediate lenders. Using the services of a principal financial car title loans montgomery institution cash advance is very simple. People only have to focus on some essential particulars that will promise you are working with any legitimate business.

marko said...

Per questo motivo hanno esitato a ottenere diagnosticata e scoprire che cosa sta causando la sterilità. Le donne da un lato odio dover sentire che non possono concepire, mentre gli uomini trovano che sia un segno di debolezza, se sono sterili in quanto sono di solito associati alla mascolinità. Erezione 60 anni

marko said...

Se vi capita di visitare una scuola di lingua inglese, è necessario soffiare una buona quantità di denaro per l'apprendimento e alcune volte si finisce per imparare la parte peggiore. Il modo migliore per imparare l'inglese è attraverso il supporto online, che è più facile e di fiducia; non c'è bisogno di spendere soldi solo per l'apprendimento attraverso on-line. cv in inglese per agenzie londra

Unknown said...

This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again.For more information please visit our website..

Oracle Fusion Training Institute

alicetaylor123 said...

We are really grateful for your blog post. You will find a lot of approaches after visiting your post. Great work.


Susan said...

As I website owner I believe the content material here is very superb, thanks for your efforts. 192.168.l.254 is mostly used by modern routers such as Linksys switches, 2Wire routers, TP-Link routers Alcatel ADSL Modems, Thompson ADSL routers, Westell ADSL Modems, 3Com routers, ADSL billions of router, SRW2023 and many more.