How Mail Delivery Threads Get Allocated

ColdFusion MX 6.1 Enterprise supports multiple mail delivery threads, the number of desired threads is specified in the ColdFusion Administrator. This number is not a pre-allocated pool, rather, it is the maximum that ColdFusion may allocate if needed, and ColdFusion will not always allocate the maximum number of threads. When there is mail to be delivered ColdFusion will get a message count, and then allocate a thread for every 10 messages in the queue. So, if you have 300 messages in your queue, ColdFusion will allocate a maximum of 30 threads (if the maximum is set to 30 or higher). And if you have 12 messages then a maximum of 2 threads will be allocated. ColdFusion does not allocate a thread for every message, that would be overkill, there is a point of diminishing returns as allocating and freeing threads takes time and resources too. There is system overhead with each thread allocated, but it is minimal and only exists while mail is being delivered. As such, you can safely raise the maximum thread count (from the default 10) if so desired.

Leave a Reply