开发者

Is it possible to tell IIS 7 to process the request queue in parallel?

Currently we are developing an ASMX, ASP 2.0, IIS 7 web service that does some calculations (and return a dynamically generated document) and will take approx. 60 seconds to run.

Since whe have a big machine with multiple cores and lots of RAM, I expected that IIS tries its best to route the requests that arrive in its requests queue to all available threads of the app pool's thread pool.

But we experience quiet the opposite:

When we issue requests to the ASMX web service URL from multiple different clients, the IIS seems to serially process these requests. I.e. request 1 arrives, is being processed, then request 2 is being processed, then request 3, etc.

Question:

Is it poss开发者_StackOverflowible (without changing the C# code of the web service) to configure IIS to process requests in parallel, if enough threads are available?

  • If yes: how should I do it?
  • It no: any workarounds/tips?


Make sure you have the "Maximum Worker process" for the application pool set to > 1 to enable the worker pool to become a Web Garden. By default each application pool is set to only use one process, which would cause requests to be queued.

You may also want to look at this article about using ASP.NET 2.0 in Integrated mode on IIS7

  1. ASP.NET threading settings are not used to control the request concurrency in Integrated mode

The minFreeThreads, minLocalRequestFreeThreads settings in the system.web/httpRuntime configuration section and the maxWorkerThreads setting in the processModel configuration section no longer control the threading mechanism used by ASP.NET. Instead, ASP.NET relies on the IIS thread pool and allows you to control the maximum number of concurrently executing requests by setting the MaxConcurrentRequestsPerCPU DWORD value (default is 12) located in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\2.0.50727.0 key. This setting is global and cannot be changed for individual application pools or applications. Workaround

A. To control the concurrency of your application, set the MaxConcurrentRequestsPerCPU setting.


Are you using session state in your web service? Requests to pages that use session state are serialized; maybe it's the same with your service.

ASP.NET and IIS normally process requests in parallel. If they're not, then something is preventing it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜