#1 2014-06-09 16:19:16

cleidsonbsilva
Member
Registered: 2014-06-09
Posts: 3

Performance Test

Hi Guys,

Im new to mORMot.
I did a test to compare performance between mORMot and DataSnap.
In the method, I am simple returning a "Hello World" string from server.

Running the Server and Client applications on localhost, mormot is 5x faster than DataSnap.
But, when the server is on another computer, in the same network or in a remote location, the DataSnap is faster than Mormot.
Can anyone explain to me this behavior ?
Or I am making something wrong ?

In this link, there is the source code for applications:
https://www.dropbox.com/s/ala3a7iqtgknn … P-LEAK.zip

Test form

Offline

#2 2014-06-09 16:21:00

cleidsonbsilva
Member
Registered: 2014-06-09
Posts: 3

Offline

#3 2014-06-09 16:53:52

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,604
Website

Re: Performance Test

Which version of Delphi are you using?
I was not able to compile the server on XE4 or XE6.

Some remarks:

0) did you use the latest 1.18 "unstable" revision from nightly zip?

1) you are using the WinSock server, which is not to be used on production.
Please do not set useHttpSocket but useHttpApiRegisteringURI, and run it only once as administrator to register the URI (once registered, you can run the service with normal user rights).

2) why did you use sicPerThread setting?
sicShared is enough in your case.

3) you are comparing apples and oranges.
The mORMot server, as you defined it, uses authentication, session handling, URI signature, over HTTP.
I'm not sure it is the same for DataSnap.

4) Please disable your anti-virus HTTP packet inspection on both client and server side for the applications: I suppose the big difference comes from it.
mORMot uses JSON over HTTP, so the anti-virus intercepts it, and usually slow down the process a lot.
Whereas DataSnap uses a proprietary format over IP, so may not be intercepted by the AntiVirus.
I've seen some AntiVirus to be incredibly slow when inspecting HTTP content, especially when the content is compressed (as it may be with mORMot).

5) for real tests, consider using concurrent tests, and some real process, more than a ping.
For concurrent tests, see http://robertocschneiders.wordpress.com … ity-tests/
For real test, including JSON marshalling and database process, over a network, with a lot of concurrent http://blog.synopse.info/post/2013/09/1 … -of-mORMot

Just try to implement a similar test to the latest link (inserting then reading some data in a database), using DataSnap + DBExpress or FireDAC in a SQLite3 database with 200 or 50000 concurrent clients, and we will start talking. smile

6) Please remove any VCL interaction within your test program - Memo1.Lines.Add(x) is not a good idea.

7) Thanks for sharing your experiments!

Offline

#4 2014-06-09 21:37:25

cleidsonbsilva
Member
Registered: 2014-06-09
Posts: 3

Re: Performance Test

Thank you for your repply.

Im using the 1.18 version.

I will review the project using your tips and post new results here.

Thank you.

Offline

Board footer

Powered by FluxBB