Performance issue with WCF service (hosted in IIS) being hit with 20 concurrent requests -


the problem: have wcf service i'm trying performance test jmeter , i've noticed service response times increase when more concurrent requests sent. first concurrent request returns in expected amount of time, each subsequent request takes increasing amount of time - last request can take double time of first.

here screenshot of run in jmeter: performance test results

the code: have stripped wcf service bare minimum, service method contains thread.sleep() simulate longer running process.

[servicecontract] public interface iavailabilityservice {   [operationcontract]   thing getsomething(request request) }      [servicebehavior(   instancecontextmode = instancecontextmode.percall,    addressfiltermode = addressfiltermode.any)] public class availabilityservice : iavailabilityservice {   public thing getsomething(request request)   {     thread.sleep(20000);     return new thing();   } } 

the service configured follows:

<?xml version="1.0"?> <configuration>   <system.servicemodel>     <services>       <service name="myservice.availabilityservice"                behaviorconfiguration="defaultservicebehavior">         <endpoint address=""                    binding="basichttpbinding"                   bindingconfiguration="bindingconfig"                   contract="myservice.iavailabilityservice" />       </service>           </services>     <behaviors>       <servicebehaviors>         <behavior name="defaultservicebehavior">                 <servicemetadata httpgetenabled="true"/>                 <servicedebug includeexceptiondetailinfaults="false"/>         </behavior>       </servicebehaviors>     </behaviors>     <bindings>       <basichttpbinding>         <binding name="bindingconfig">           <security mode="none">             <transport clientcredentialtype="none" />             <message establishsecuritycontext="false" />           </security>         </binding>       </basichttpbinding>     </bindings>   </system.servicemodel> </configuration> 

i have tried configuring service run other standard http bindings. have tried upping service throttling levels on binding configuration (though i'm sure 20 requests defaults should fine).

service set-up: service running in iis 6.1 on windows server 2008 r2 in .net 3.5. though have seen same behaviour on iis 7.

service trace: have turned on tracing , has revealed service takes around 20 seconds process each response, recieve bytes on connection has staggered start time reflects differences in time reported jmeter.

does suggest lag in service activation iis? can't concurrency issue in wcf expect last thread 20x execution of first.

thanks in advance

iain

update i've managed consistent response increasing number of worker processes in iis match number of concurrent requests want service handle (20) - making site web garden. though surprises me need in order consistent level of performance wcf.

i'll leave question open couple more days in case has better ideas.

this resolved upping number of worker processes app pool in iis. this blog post mentions, potentially long running processes in wcf have supported multiple worker processes.

there balancing act on web server ensure worker processes don't exceed machine ram , eat virtual memory, can slow processing down.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -