Well 5000 is just an arbitrary number to average the timing across. 10 is too small and throws up unpredictable effects, 1000000 takes too long to run. In this case 5000 gives nice repeatable results.
As the TCP and HTTP channels both run over sockets they could be implemented similarly, just with different control syntax and error handleling, however the different in performance indicates that they are not similarly. Also a test like this shows up interesting stats, especially to do with the [OneWay] calls. One implementation detail is that the client does not guarantee that the server will receive a [OneWay] call. In fact if there is no server running at all the [OneWay] calls will be lost, however because the client waits for an ACK or a timeout it is very very slow to make [OneWay] calls without a server running to receive them. Surely if the client does not guarantee to deliver the [OneWay] call (or preserve the ordering of calls) then it could delegate the sending to a worker thread and return immediately even before it has tried to send the call? ----- Original Message ----- I'm curious as to what your use case is for this. Do you need to send 5000 messages between two machines in less than 5 seconds? Why would you even care about the performance of http on a single machine? Are you thinking about using http to talk between app domains on a single machine? ----- Original Message ----- From: "Nicko Cadell" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 21, 2002 3:04 PM Subject: Re: A performace comparison between the TCP and HTTP remoting channels. > I have got some results from testing with the .NET framework 1.1 beta, both > in a native 1.1 environment and a mixed 1.0 and 1.1 environment. Note these > are all results from comparing TCP and HTTP remoting channels, not web > service, which also use HTTP transport, but are hosted in IIS. > > > Running locally on a .NET framework 1.1 beta > > >TestChannels -client > > Connecting to localhost > Testing TCP Channel > Done with RegularMethod batch! 3.688 > Done with RegularMethodReturn batch! 3.844 > Done with OneWay batch! 2.969 > DONE Testing TCP Channel > > Testing HTTP Channel > Done with RegularMethod batch! 13.219 > Done with RegularMethodReturn batch! 13.593 > Done with OneWay batch! 16.485 > DONE Testing HTTP Channel > > Interestingly here the TCP channel and the HTTP channel are slightly faster > than under 1.0. The [OneWay] TCP channel has made great improvements and is > now faster than the regular method (as it should be). But the HTTP channel's > [OneWay] method is going backwards, now it is not only slower under 1.1 than > it was under 1.0, but it is now slower than the regular methods. > > > > Running with a client on a .NET framework 1.1 beta and the server running on > a .NET framework 1.0 sp2. > > >TestChannels -client=hebe > > Connecting to hebe > Testing TCP Channel > Done with RegularMethod batch! 3.093 > Done with RegularMethodReturn batch! 3.266 > Done with OneWay batch! 11.421 > DONE Testing TCP Channel > > Testing HTTP Channel > Done with RegularMethod batch! 10.578 > Done with RegularMethodReturn batch! 10.906 > Done with OneWay batch! 4.422 > DONE Testing HTTP Channel > > Again the across machine version of the tests runs faster than the local > across process tests, however the results are more pronounced. The HTTP > channel is nearly 3 seconds faster than locally on the same machine. > > The TCP [OneWay] call is still slow 2.9 seconds locally => 11.4 seconds > across the network, but at least it is not the 86.3 seconds it used to take! > The HTTP [OneWay] methods are running twice as fast in this combination as > previously in a 1.0 to 1.0 networked config. > > > Running with the client on .NET framework 1.0 sp2 and the server running on > .NET framework 1.1 beta. > > >TestChannels.exe -client=cupid > > Connecting to cupid > Testing TCP Channel > Done with RegularMethod batch! 3.766 > Done with RegularMethodReturn batch! 3.984 > Done with OneWay batch! 8.203 > DONE Testing TCP Channel > > Testing HTTP Channel > Done with RegularMethod batch! 11.829 > Done with RegularMethodReturn batch! 12.421 > Done with OneWay batch! 9.688 > DONE Testing HTTP Channel > > With the client running on the old 1.0 framework we loose some of our speed > shown above. However the [OneWay] methods are again showing interesting > results. The TCP channel methods are faster! But the HTTP methods are > slower! > > It looks like the 1.1 framework will make some positive speedups to the > remoting layer, but what is going on with those OneWay methods? > You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.