在Windows 7环境中,我有一个有趣的WCF问题......它是slooooooow。Windows 7上的WCF性能
该服务是自托管的,在控制台应用程序中运行。
运行在Vista环境中的相同代码在大约1/3时间内运行。
服务器配置:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="Logging.Services.LoggerServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceThrottling maxConcurrentCalls="10000" maxConcurrentSessions="1000" maxConcurrentInstances="1000" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<netTcpBinding>
<binding name="nettcp" maxBufferSize="524288" maxConnections="1000" maxReceivedMessageSize="524288">
<security mode="None">
<transport clientCredentialType="None" protectionLevel="None" />
<message clientCredentialType="None" />
</security>
</binding>
</netTcpBinding>
</bindings>
<services>
<service behaviorConfiguration="Logging.Services.LoggerServiceBehavior" name="Logging.Services.LoggerService">
<endpoint address="" binding="netTcpBinding" bindingConfiguration="nettcp"
name="tcp" contract="Logging.Services.Contracts.ILogger" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:8001/LoggerService" />
<add baseAddress="http://localhost:8002/LoggerService" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
客户端配置:
<netTcpBinding>
<binding name="tcp" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false"
transferMode="Buffered" transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288"
maxBufferSize="524288" maxConnections="10" maxReceivedMessageSize="524288">
<readerQuotas maxDepth="32" maxStringContentLength="524288" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="None">
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows" />
</security>
</binding>
</netTcpBinding>
和
<endpoint address="net.tcp://localhost:8001/LoggerService" binding="netTcpBinding"
bindingConfiguration="tcp" contract="LoggerLogService.ILogger"
name="tcp" />
我读的地方,有人用类似的问题,运行NOD32不得不把HTTP检查关闭,我做了没有效果。我完全禁用NOD,但没有运气。
任何想法?
在此先感谢!
可能考虑将您的原始帖子标记为删除。 – 2009-11-12 16:07:49