IIS 6/IIS 7 for ColdFusion 9: Increasing the Number of Worker Threads

While using IIS6 for ColdFusion 9 (or ColdFusion 9.0.1), owing to heavy load, if you encounter performance issues, you may increase the number of worker threads.

  1. Go to the directory cf_root\runtime\lib\wsconfig\1.
    Note: In multiserver scenarios, the location is  jrun_root/lib/wsconfig/1. 1 indicates a single IIS website. If you have configured multiple IIS websites, the number can change accordingly.
  2. Open the file jrun_iis6_wildcard.ini (jrun_iis7_wildcard.ini if you use IIS 7).
  3. Uncomment maxworkerthreads=25.
    Note: By default, maxworkerthreads is commented.
  4. Change the value to 50 (maxworkerthreads=50) from the default value of 25.
  5. Restart IIS 6/IIS 7.

Note: The Maximum number of Simultaneous Template requests (Admin > Server Settings > Request Tunings > Request Limits) must also be increased accordingly.

5 Responses to IIS 6/IIS 7 for ColdFusion 9: Increasing the Number of Worker Threads

  1. Great tip. A couple of clarifications, and questions.

    First, there’s a mistake above: that directory indication in line 1 should have runtime\lib\wsconfig. (It’s missing \lib.) Also, it’s presuming installation of CF Std or Enterprise Server mode. If one is running CF Enterprise Multiserver (multiple instances), that location would be jrun_root\lib\wsconfig\1.

    Also, that \1 is presuming that there is only one IIS web site configured to talk to CF. If one had multiple sites, there would be multiple numbered directories. Can anyone clarify if the change would need to be made in each? I’d assume so.

    Also, what if one is using IIS 7 with CF9? Does that change this recommendation?

    And where the suggestion is made to make it 50, it’s not clear: should it not be at least >= the Simult requests setting?

    Finally, what is the default value is it remains uncommented? Even if you can’t answer all these questions, answers to any of them would be appreciated.

  2. Sanojkumar K C says:

    Thanks Charlie for the comments.
    I’ve updated the blog based on your queries.

  3. Can you clarify whether this is an issue on CF 8? Or is it really only an issue on 9?

    Also, with respect to IIS 7, does it matter if we are running in IIS 6 compatibility mode or not?

    Finally, since this entry was written before CF 9.0.1, which added formal support for IIS 7, is there any difference since then? Thanks.

    • Sanoj says:

      Charlie,
      – This is specific to the interaction between ColdFusion 9/ColdFusion 9.0.1 and IIS 7.

      – I’m sorry, not sure about the IIS 6 compatibility mode .

      – No, there are no changes after ColdFusion 9.

  4. Thanks, Sanoj, for your updates above. (It’s a real shame this blog software doesn’t email us when here are new comments on an entry where we’ve commented. I didn’t see this for a few months after you wrote.)

    Here’s one more observation: it still (in my mind, inappropriately) suggests setting a value for the maxworkerthreads and then “The Maximum number of Simultaneous Template requests…must also be increased accordingly”. It seems that’s backwards.

    The point for readers is that the setting here (maxworkerthreads) should be set to at least that max simultaneous requests, right?

    Also, you refer to 50, and that is indeed the value of the max number of simultaneous requests for a Standard deployment of CF. But for an Enterprise deployment (whether Server or Multiserver mode), the default is 10, and then one can also separately set the number of flash remoting, web service, and http-based CFC function requests (these are greyed out in Standard).

    In that case, though, then it would seem not quite accurate to suggest that the maxworkerthreads value should be set to the value of max simultaneous requests. Instead, it should be set to at least the sum of all those request type max values. As a shortcut, note one may that the value of the number of jrun threads (which, as the Admin page indicates, should itself be set to the sum of the simult, flash remoting, and http-based CFC function requests). Would you agree?