title: WCF not using all cores with Visual Studio 2010 Load Testing
body: <p>I've developed a WCF service, and I'm testing it for performance using Visual Studio 2010 Load Testing infrastructure. I have a Quad Core Intel Q6600 on my desktop and, for now, the WCF is hosted on a console application for testing purpose. While executing the tests, I have 1 core at 100%, and the other 3 between 25 to 60%. The HostApplication.exe process for only brief instances passes 25%, and I don't know why. Why isn't WCF spreading the calls to the other cores, so that I don't have a CPU bottleneck? Shouldn't I have the HostApplication.exe spread over more than 1 core, limited at 25%?<br>
  I have configures VS2010 Load Testing with 25 users, and they are calling 2 methods. On the service implementation of the Methods I use, I have the following configured for ServiceBehaviour:</p>
  
  <pre><code>  [ServiceBehavior(TransactionIsolationLevel = System.Transactions.IsolationLevel.ReadCommitted, 
      InstanceContextMode=InstanceContextMode.PerCall, ConcurrencyMode=ConcurrencyMode.Multiple, ReleaseServiceInstanceOnTransactionComplete=false)]
  </code></pre>
  
  <p>I've also defined the serviceThrottling behaviour for the service. Below is my app.config:</p>
  
  <pre><code>  &lt;system.serviceModel&gt;
        &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" /&gt;
          &lt;bindings&gt;
              &lt;basicHttpBinding&gt;
                  &lt;binding name="SimpleBinding" /&gt;
              &lt;/basicHttpBinding&gt;
              &lt;netTcpBinding&gt;
                &lt;binding name="DefaultTCPBinding" closeTimeout="01:00:00" receiveTimeout="01:00:00"
                      sendTimeout="01:00:00" transactionFlow="true" transactionProtocol="OleTransactions"
                      maxBufferSize="5242880" maxReceivedMessageSize="5242880"&gt;
                  &lt;reliableSession inactivityTimeout="01:00:00" /&gt;
                &lt;/binding&gt;
              &lt;/netTcpBinding&gt;
              &lt;webHttpBinding&gt;
                  &lt;binding name="ScriptBindig" crossDomainScriptAccessEnabled="true" /&gt;
              &lt;/webHttpBinding&gt;
          &lt;/bindings&gt;
          &lt;behaviors&gt;
                &lt;endpointBehaviors&gt;
                      &lt;behavior name="WebScriptBehavior"&gt;
                            &lt;enableWebScript /&gt;
                      &lt;/behavior&gt;
                &lt;/endpointBehaviors&gt;
                &lt;serviceBehaviors&gt;
                      &lt;behavior name="MetadataBehavior"&gt;
                            &lt;serviceMetadata httpGetEnabled="true" httpGetBinding="webHttpBinding"
                                  httpGetBindingConfiguration="" /&gt;
                            &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
                            &lt;serviceThrottling maxConcurrentCalls="64" maxConcurrentSessions="400"
                                  maxConcurrentInstances="464" /&gt;
                      &lt;/behavior&gt;
                &lt;/serviceBehaviors&gt;
          &lt;/behaviors&gt;
          &lt;services&gt;
                &lt;service behaviorConfiguration="MetadataBehavior" name="Implementation.TestingAppImplementation"&gt;
                      &lt;endpoint address="" binding="netTcpBinding" bindingConfiguration="DefaultTCPBinding"
                            name="TestingAppTCPEndpoint" contract="Interfaces.ITestingApp" /&gt;
                      &lt;endpoint address="mex" binding="mexHttpBinding" bindingConfiguration=""
                            name="TestingAppMex" contract="IMetadataExchange" /&gt;
                      &lt;endpoint address="ws" behaviorConfiguration="" binding="basicHttpBinding"
                            bindingConfiguration="SimpleBinding" name="TestingApp" contract="Interfaces.ITestingApp" /&gt;
                      &lt;host&gt;
                            &lt;baseAddresses&gt;
                                  &lt;add baseAddress="net.tcp://desk01:9878/TestingAppService" /&gt;
                                  &lt;add baseAddress="http://desk01:9876/TestingAppService/" /&gt;
                            &lt;/baseAddresses&gt;
                      &lt;/host&gt;
                &lt;/service&gt;
          &lt;/services&gt;
      &lt;diagnostics&gt;
        &lt;messageLogging logEntireMessage="true"
                        logMalformedMessages="true"
                        logMessagesAtTransportLevel="true" /&gt;
      &lt;/diagnostics&gt;
    &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>Tks so much for any help. <strong>ANY advice</strong> would be greatly appreciated.</p>