.NET Framework Developer Center >
.NET Development Forums
>
Windows Communication Foundation
>
Performance WCF vs .NET remoting
Performance WCF vs .NET remoting
- Hi all,
I did a small experiment to compare .NET remoting with WCF , just to see what it would mean performance-wise when switching technology to WCF.
The test was carried out on one PC, a client app (console app) talking to a server app (console app). I build it against WinFx February CTP. The endpoint on the server exposes a single interface with one method with a nearly empty implementation (just increasing a counter). In all the test cases, in the client I first created the proxy to the server and made one initial call , to be sure to measure the pure calls. I then made 10,000 calls to the server and measured the average round-trip time per call.
Using netTcpProfile (binary encoding, tcp transport)
Performance .NET remoting
Average time per call: 0.562892881637191 ms
Performance WCF
Average time per call: 0.869542916767355 ms
Using basicHttpProfile (text encoding, http transport)
Performance .NET remoting
Average time per call: 2.45831567978612 ms
Performance WCF
Average time per call: 1.9287044861847 ms
Can anybody tell me, why is netTcpProfile for WCF performing worse?
Answers
Hi Steve,
thanks for the hint you gave. I tested again but now with changed settings for the default
netTcpBinding. With security disabled I get:
Average time per call: 0.562812564166675 ms
So similar to .NET remoting. Thanks again!
ron.
All Replies
- Since you're testing on-box, the cost of the call path is likely dominated almost entirely by serialization. You didn't say what you're passing to or returning from your methods, so it's hard for me to speak to these numbers. Also, the per-call overhead for HTTP seems really high to me. A flat one-second-per-call tax for HTTP on-box seems costlier than it should be.
If you'd like to follow up with me offline, send me email [smaine(at)microsoft.com] and we can drill into this.
-steve - It was pointed out to me offline that these numbers were in milli-seconds, not seconds. Makes much more sense that way :)
Anyhow, the additional overhead in the TCP case is likely caused by transport security. WCF's NetTcpBinding is secure out of the box, while Remoting's isn't.
-steve Hi Steve,
thanks for the hint you gave. I tested again but now with changed settings for the default
netTcpBinding. With security disabled I get:
Average time per call: 0.562812564166675 ms
So similar to .NET remoting. Thanks again!
ron.
How can WCF and remoting have approx. the same result?
As far as I know WCF always use SOAP messages (although you can use tcp/binary binding) and soap messages large in size, remoting does not have this limitation.
Any ideas or am i missing something?
Ronen.


