Relatively simple TCP and HTTP performance in WCF

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

When using WCF, in order to better debugging, I choose the HTTP protocol for data transmission. Recent projects have high requirement for performance, so I changed to using TCP protocol. And the performance of the two were a simple test. The following is the result of the test:

Environmental Science:

CPU: E5800 3.20GHz+3.19GHz

RAM: 7.97GB

64 bit OS, 64 bit processor

The server, client deployment of data transmission test in this machine. The following scenario testing:

1.1000 requests, each request transmission 1 objects, each object 80 attributes:

Average time: 6.2s HTTP.

TCP usually takes about 3.9s:.

Conclusion: using TCP to connect, can save the performance when establishing the connection of consumption. For a lot of connection, relative HTTP can improve performance significantly.

2.100 requests, each request transmission 500 objects, each object 80 attributes:

Average time: 19S HTTP.

TCP usually takes about 18S:.


When using a single connection to transfer large amounts of data, speed mainly depends on the data serialization and transmission speed of the network, because Http is based on TCP for transmission, so the role of small.


Since the first use of the network, there is a firewall and other uncertain factors, cause data distortion. Second times in the local time, as a result of the database access, may also lead to data distortion. So the above conclusion total memory data based on the local environment, data transmission test.

There have been various performance tests. Often too lazy to the most direct test, but used directly in the application environment for testing. Because of many uncertain factors: server, network, database, causing data often distortion, and had to be excluded for various reasons, finally still have to use the most direct and pure approach to data test. The loss outweighs the gain´╝ü

To be done after the performance test, it must be careful, think good pure test case, before the test preparation of formal, test code directly, this is actually the most time-saving.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Ian at November 13, 2013 - 6:52 PM