RO.Net vs RO Delphi performance

Hi,

it may, but you should test it under the real conditions and for your configuration.
RO Servers are easily interchangeable so you can perform such testing w/o any problems

For some reason, TROWinHttpServer is very slow compared to TROIndyHttpServer. I turned off Bin message compression, and for single thread, 1000 request,

TROWinHttpServer - 53 request per second
TROIndyHttpServer - 1000 request per second

The remote method is just Sum(A, B: Integer): Integer

it may depend on your OS:

according to https://social.msdn.microsoft.com/Forums/en-US/af2a40d4-b6a8-4244-bed1-12fa436f3d01/winhttp-of-windows-7-cannot-handle-http10-keepalive , KeepAlive doesn’t work as expected on Windows7

I can’t reproduce such difference (i.e. 20 times):
for Indy (KeepAlive=On) I have

Starting Sum test. 1000 repetitions
Test complete. 826ms. 1210,65 Req/Second. 0 Errors

for Indy (KeepAlive=Off) I have

Starting Sum test. 1000 repetitions
Test complete. 1031ms. 969,93 Req/Second. 0 Errors

for WinHttp:

Starting Sum test. 1000 repetitions
Test complete. 999ms. 1001,00 Req/Second. 0 Errors

Synapse:

Starting Sum test. 1000 repetitions
Test complete. 1029ms. 971,82 Req/Second. 0 Errors

Note: I’ve used Windows 7.

so these channels work almost the same in the same conditions (KeepAlive=Off)

@EvgenyK Thank you for looking into this.

I am using Windows 2016 Server, and Delphi Rio 10.3, and the results still show TROWinHttpServer is very slow (~50-60 request per seconds).

Do you use Delphi 10.3, or a different Delphi version?

I have tested with Delphi 10.2.3. I don’t think, that it will be different from 10.3

Would you mind giving me a copy of the server executable you tested, so I can test it on my side with Windows Server 2016? Thank you

Hi,

this is server from the MegaDemo Sample, so you can use standard client: MegaDemoServer.zip (1.9 MB)

@EvgenyK

Thank you again.

It is so strange - I run the test using the MegaDemo server, it is still very SLOW on Windows Server 2016. The SuperTCP and WinMessage are very fast as expected, in the range of 3000~3500 request/second, but the HTTP is very slow.

Don’t know why. Something is not right with Windows Sever 2016?

try to retest with another OS, like Windows 7, Windows 10 or another Windows Server 2016 pc.
issue can be with this specific pc

@EvgenyK

Thank you.

I did some additional tests:

  • Windows Server 2012 , HTTP speed as expected (~1000 request/second)

  • Windows 10, HTTP speed as expected (~1000 request/second)

  • Windows Server 2016, fresh installed VM, HTTP very slow (~50 requests/second)

  • Windows Server 2019, fresh installed VM, HTTP very slow (~50 requests/second)

Conclusion: Something is NOT right with Windows Server 2016/2019 that interfere with RO HTTP channel? Anyone encounters similar problem before?

It turned out - RO SDK (Delphi) HTTP channel/server performance hit, was caused by the default Firewall settings of Windows 2016/2019.

Turning off the firewall completely, the HTTP server (Delphi, Indy on Server side, Synapse on Client Side, with KeepLive On) could have up to 2500~3200 request/sec/thread. This is a very satisfying result - it is actually quite comparable to mORMot, though, mORMot is still faster (3500 request/sec/thread, with very good scalability of multiple threads). Maybe, sometime in future, we can use a “striped-off” version of mORMot as a new communication channel due to its superb performance.

Overall, RO SDK is still the best choice for Remote Methods, given its convenience and ease of use, and also the great support from RemObjects team.

P.S. I am using Delphi 10.3.3

2 Likes

Sorry. The solution was disable the firewall? I bet we must find a better (realistic) solution.