Service throttling issues in WCF hosted in Windows 7
My development environment is WCF 4 / IIS 7.5 / Windows 7 Professional. I have a WCF service with a single operation that sleeps for 2 seconds. My goal is to run 100 concurrent requests and ensure that all the requests complete within 2.1 seconds.
I started tinkering with service throttling. A service can have a service behavior which has throttling properties defined. So, I set the following parameters:
<serviceThrottling maxConcurrentInstances="100" maxConcurrentCalls="100" maxConcurrentSessions="100" />
I went into perfmon and check the ServiceModelService => TimeOutService => Instances counter. It was showing as 10.
I assumed that there was some problem with the processModel. So, in machine.config, I changed the processModel to:
<processModel autoConfig="false" minIOThreads="100" minWorkerThreads="100" maxIOThreads="100" maxWorkerThreads="100" />
In perfmon, the instances counter was showing as 10. So, I went and checked the .NET CLR LocksAndThreads => w3wp => Total logical threads. This counter was showing somewhere between 30 and 40. Again, very confusing.
After searching for more information, I found this forum post which suggests that Windows 7 has some limitations on performance tuning: http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/449c17ca-1518-49f7-a58e-c043f0751bce/ . I wish I had checked this post earlier!
Category : ASP.NET