2011-10-27 7 views
5

3分ごとに約500人のクライアントがWCFサービスを利用しています。 lsass.exeプロセスは、サービスがオンのときにCPUの95%を使用しています。
私はテストを行い、クライアントがコールするたびに、lsass CPUの割合は約7程度に上昇します。だから私は何百人が同時にコールを送信しているときにサーバがなぜコールが遅くなっているのか理解しています。
私が理解できないことは、なぜlsassはまったく使われているのでしょうか?私は、カスタム・バインディングを使って、WSHttpBindingから、メッセージ・レベルのセキュリティー(証明書を使用)を使用しています。 Percall/ConcurrencyはPerCall/Singleです(私は2つの組み合わせをほとんど変更せずに試しましたが)。IIS6でホストされています。
私の推測では、すべての呼び出しでlsassが証明書をチェックしています。どうにかしてCPUが大量にかかるのですか?私はそれを減らすことができるいくつかの方法はありますか?私は、人々がWCFサービスをはるかに大きな数にスケールアップしたことを知っています。だから私は間違っているのですか?セキュリティでWCFスケーリングを理解できない/ lsass.exe CPU%がなぜそれほど高いのですか?

P.S.いくつかの余分な情報:私のトレース持っていると、通常は記録されますまず最初に

<TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Warning"> 
    <TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.Activation.WebHostNoCBTSupport.aspx</TraceIdentifier> 
     <Description>Extended protection is not supported or not enabled on this platform. Please install the appropriate patch and enable it if you want extendedProtection support for https with windows authentication.</Description> 
     <AppDomain>/LM/W3SVC/920256058/Root/WCFServices/smt-7-129642078492968750</AppDomain> 
     <Source>System.ServiceModel.Activation.MetabaseSettingsIis6/17731154</Source> 
</TraceRecord> 

され、たくさんのもあります:

http://msdn.microsoft.com/en-US/library/System.ServiceModel.Security.SecuritySessionDemuxFailure.aspx 
The incoming message is not part of an existing security session. 

<ExceptionType>System.ServiceModel.Security.SecurityNegotiationException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType> 
<Message>Cannot find the negotiation state for the context 'uuid-4caa56ff-3d38-4905-9151-ce12acdd676c-6778'.</Message> 

<NegotiationTokenAuthenticator>System.ServiceModel.Security.TlsnegoTokenAuthenticator</NegotiationTokenAuthenticator> 
<AuthenticatorListenUri>http://myserviceendpoint</AuthenticatorListenUri> 
<Exception>System.ServiceModel.Security.SecurityNegotiationException: Cannot find the negotiation state for the context 'uuid-4caa56ff-3d38-4905-9151-ce12acdd676c-6778'.at System.ServiceModel.Security.NegotiationTokenAuthenticator`1.ProcessRequestCore(Message request) at System.ServiceModel.Security.NegotiationTokenAuthenticator`1.NegotiationHost.NegotiationSyncInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp;amp; outputs)</Exception> 

私のIISログはフルですサービスの設定:主に最後の2

編集

200 0 64 
500 0 64 
200 0 1236 
500 0 1236 

のリットル

<?xml version="1.0"?> 
<configuration> 
    <configSections> 
    <section name="dataConfiguration"  type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings,  Microsoft.Practices.EnterpriseLibrary.Data"/> 
    </configSections> 
    <connectionStrings> 
    <add name="conString" connectionString="Data Source=source1;Failover  Partner=source2;database=myDatabase;Integrated Security=false;uid=userName;pwd=password"  providerName="System.Data.SqlClient"/> 
    </connectionStrings> 
    <dataConfiguration defaultDatabase="conString"/> 
    <system.web> 
    <compilation debug="true" targetFramework="4.0"/> 
    <authorization> 
     <allow users="?"/> 
    </authorization> 
    </system.web> 

    <system.serviceModel> 
    <services> 
     <service name="ServiceLibrary.Service"> 
     <endpoint address="ws" binding="wsHttpBinding"  bindingConfiguration="WSHttpBinding_IService" 
      name="WSHttpEndpoint_IService"  contract="ServiceLibrary.IService" /> 
     <endpoint address="cs1" binding="customBinding"  bindingConfiguration="CustomBinding_IService" 
      name="CustomEndpoint_IService"  contract="ServiceLibrary.IService" /> 
     <endpoint address="basic" binding="basicHttpBinding"  name="BasicHttpEndpoint_IService" 
      contract="ServiceLibrary.IService" /> 
     <endpoint address="mex" binding="mexHttpBinding" 
      contract="IMetadataExchange" /> 
     </service> 
    </services> 
    <bindings> 
     <wsHttpBinding> 
     <binding name="WSHttpBinding_IService" 
      maxBufferPoolSize="524288" maxReceivedMessageSize="1048576"> 
      <readerQuotas maxDepth="32" maxStringContentLength="65536" maxArrayLength="16384" 
       maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
      <security mode="Message"> 
      <message clientCredentialType="Certificate" negotiateServiceCredential="true" 
       algorithmSuite="Default" /> 
      </security> 
     </binding> 
     </wsHttpBinding> 
     <customBinding> 
     <binding name="CustomBinding_IService"> 
      <transactionFlow /> 
      <security authenticationMode="SecureConversation"  messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"> 
      <localServiceSettings maxClockSkew="00:10:00" maxPendingSessions="102400" /> 
      <localClientSettings maxClockSkew="00:10:00" /> 
      <secureConversationBootstrap authenticationMode="MutualSslNegotiated"  messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10" /> 
      </security> 
      <textMessageEncoding> 
      <readerQuotas maxDepth="32" maxStringContentLength="65536" maxArrayLength="16384"  maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
      </textMessageEncoding> 
      <httpTransport maxBufferSize="1048576" maxReceivedMessageSize="1048576" /> 
     </binding> 
     </customBinding> 
    </bindings> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior> 
      <serviceCredentials> 
      <serviceCertificate findValue="CN=[domain]" storeLocation="LocalMachine"  storeName="TrustedPeople" /> 
      <clientCertificate> 
       <authentication revocationMode="NoCheck" certificateValidationMode="PeerTrust"  /> 
      </clientCertificate> 
      </serviceCredentials> 
      <serviceThrottling maxConcurrentCalls="1000" maxConcurrentSessions="1000"  maxConcurrentInstances="1000" /> 
      <serviceMetadata httpGetEnabled="true"/> 
      <serviceDebug includeExceptionDetailInFaults="false"/> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/> 
    </system.serviceModel> 
</configuration> 

クライアントはすべてCustomBindingを使用しています。しかし、問題はまだWSバインディングで発生します。実際、私はCustomBindingを使って、サービスが保留中のセッションを使い果たしていた問題を解決しました。

+0

サービスの設定も表示します。 –

答えて

0

だから、多かれ少なかれ、すべてのことをやり直しました。私の問題は、すべてのクライアントが一度に電話をかけようとしていて、サーバーが過負荷になってしまったということでした。私はすべての着信トラフィックを拒否するようにIISアプリケーションを設定し、最終的にすべての接続が可能になるまでIPグループを徐々に追加しました。

Lsassは依然として大量のCPUを使用していますが、これは受け入れられません。私は何百ものクライアントがいるので、より高速で、lsassが狂ってしまうことのない、別のセキュリティ方法(証明書以外)を見つける必要があります。

関連する問題