WCF Binding Performance comparison–Part 2

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

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).

image

Next diagram shows more precisely  the same result by smaller messages sizes.

image

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.

image

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:
image

 

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.
image

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.

image

All Test results in one Table

image


Posted Oct 26 2011, 01:29 AM by Damir Dobric
Filed under:

Comments

michael freidgeim wrote re: WCF Binding Performance comparison–Part 2
on 08-24-2012 21:32

Have you done any comparison with transactions?

Would you have results similar to reliable session?

michael freidgeim wrote re: WCF Binding Performance comparison–Part 2
on 08-24-2012 21:47

In which units are all your results? In milliseconds?

Is it correct that the major factor is security, that increase the time of processing in more than 10 times for all message sizes?

developers.de is a .Net Community Blog powered by daenet GmbH.