views:

991

answers:

2

In ColdFusion, under Request Tuning in the administrator, how do I determine what is an optimal number (or at least a good guess) for the Maximum Number of Simultaneous Template Requests?

Environment:
CF8 Standard
IIS 6
Win2k3
SQL2k5 on a separate box

+4  A: 

The way of finding the right number of requests is load testing. That is, measuring changes in throughput under load when you vary the request number. Any significant change would require retesting. But I suspect most folks are going to baulk at that amount of work.

I think a good rule of thumb is about 8 threads per CPU (core).

In terms of efficiency, the lower the thread count (up to a point) the less swapping will be going on as the CPU processes your requests. If your pages execute very quickly then a lower number of requests is optimal.

If you have longer running requests, and especially if you have requests that are waiting on third-parties (like a database) then increasing the number of working threads will improve your throughput. That is, if your CPU is not tied up processing stuff you can afford to have more simultaneous requests working on the tasks at hand.

Although its a little bit dated, many of the principles on request tuning in Grant Straker's book on CF Performance & Troubleshooting would be worthwhile.

modius
I've found that my apps do best with about 12 threads per CPU, but I whole-heartedly agree that the only way to find what works best is to load test.
Adam Tuttle
A: 

I would say at least 8 per core, not per CPU. And I think 8 is a little low given modern CPU cores, I would say at least 12.

The bottom line is that every application is different; and even moreso because every application lives in a different environment. The only way to get optimal results is to *start* with a rule of thumb like 8 or 12 per cpu/core, and load test and tweak to what works best.
Adam Tuttle