In the previous post I have described group of WCF performance binding test which we did. This post contains results and comparison of various scenarios and bindings.
Influence of message size
Following picture shows the operation execution time in dependence on the message size. For this test NetTcpBinding has been used without message security and reliable session (blue) and BasicHttpBinding with no security session (red).
Next diagram shows more precisely the same result by smaller messages sizes.
Following table shows values represented in diagrams:
| | 20 B | 1 kB | 10 kB | 100 kB | 625 kB | 6 MB | 17 MB | 20 MB | 40 MB |
NetTcp | | 1,18 | 1,09 | 1,19 | 2,05 | 8,93 | 69,9 | 188,7 | 209,3 | 412 |
basicHttp | | 1,22 | 0,99 | 1,24 | 2,41 | 15,43 | 240 | 270 | 309,6 | 616,2 |
We have also tried to determine if there is some meaningful correlation between shown values which would describe this function like:
time = f (message size)
Unfortunately, this function is not linear one!
Following configuration has been used:
<binding name="NetTcpNoAnythingBinding_ISampleService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard" listenBacklog="10"
maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="10"
maxReceivedMessageSize="6553600">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="16384"
maxBytesPerRead="6553600" maxNameTableCharCount="16384" />
<reliableSession ordered="false" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="None">
</security>
</binding>
NetTcp and BasicHttp bindings (no reliable sessions and no security session) have very similar transfer rate up to 10 kB message size!
Influence of reliable session and message size
In this test I compared all session capable bindings. Note that in all four tests message security has been enabled. That means that all messages have been encrypted in all tests shown below.
How much WCF-trace does slow down message transfer?
You will sometimes have to enable tracing in production. In this case you might ask yourself, how much will the WCF trace slow down the performance. Following diagram shows result:
How much WCF trace does slow down message transfer?
Following diagram shows the influence of Fiddler. In this test all messages have been transferred to Fiddler-Proxy and then to service.
Buffering, Streaming and MTOM
BasicHttp-Buffered:
trasferMode=Buffered.
DoWork(string)
BasicHttp-Streamed:
trasferMode=Streamed.
DoWork(string)
BasicHttp-Streamed Contract
trasferMode=Streamed.
PushStream(Stream)
Mtom:
messageEncoding=Streamed.
PutData(byte[])
Exact binding configuration can be found in this post.
You will notice that streaming of data in this diagram does not indicate the best performance as expected. Even more, the working space of the IIS pool which host the streaming service is much higher than in a case of buffering. This is due the fact that IIS is buffering the date although WCF is doing streaming.
The version WCF in .NET 4.5 should fix this issue.
All Test results in one Table
Posted
Oct 26 2011, 01:29 AM
by
Damir Dobric